Blind and deaf

Being a deputy netadmin is often no fun at all. People can't distinguish network and system administration and thus call me whenever they have (or believe to have) trouble of any sort with their own PC. Most of the time, they complain that their machine is not reacting or only very sluggishly. I'm always tempted to say 'well, why don't you go and fuck check yourself', but that wouldn't help anyway. So I walk to their office, call up the task manager and close the program that has crashed. In previous times, I've tried to explain how to do that (I mean, come on, a five years old could do it), but I've given up. People very much prefer to be blind and deaf even if it's concerning the most important tool of their trade ...

I'm kind of the antithesis to those users: I prefer to get all information about the system I'm working on in the most direct way possible. When I found gkrellm in 1999, I was thrilled. Having all this information right there on the desktop truly intrigued me. I was sold and used it since.

Recently, however, gkrellm disappointed me in several respects. First of all, it crashed on me about once per day. I don't really care if that occurred due to the base package or one of its addons, it's the total which counts. Second, gkrellm has not evolved one bit since I've started to use it. Many plugins are not developed actively anymore. Even the themes are from another time, a forgone century. And hell, are they ugly. 😞

Being disappointed with gkrellm had the inevitable consequence that I had to look into conky, the other popular system monitor for Linux. I did that and ... well, judge for yourself.

Update: I removed the links to the conkys below since they are outdated. From version 1.10, conky requires Lua syntax, and I have added one of my current conkys instead.

Desktop Conky is on the right. Bottom left: mocp on urxvt. Font is Terminal, size 8. Another urxvt hides in the bushes to the right.

Conky, Desktop

DesktopWindows 7 with PrismHUD. 😏

Conky, Desktop, Windows

Mini Note the battery indication. 😉

Conky, Mini

Closed better than Open

Do you protest? Well, let me assure you, it's a special situation. One involving the acoustics of headphones. 😉

My Sennheiser HD 590 provide a truly satisfactory sound experience. They're also comfortable to wear, and I had really nothing to complain. But other people had, since these headphones are (acoustically) open. So, the entire neighborhood has to listen to your favorites ...

To avoid any further irritations, 😉 I aquired an AKG K272, closed headphones of some reputation. The sound is less transparent, less "airy" when compared to the HD 590, but it also has a more solid bass. Altogether, I like that sound as much as the previous one. And I tell you: everybody else here is outright ecstatic about the complete lack of parasitic acoustic disturbances. 😉

Move the cache

Naturally, last week I wanted to upgrade the Mini to the freshly relased, new and shining Ubuntu 10.04. There was just one small problem: the Mini's SSD is simply too small to hold all packages required for the upgrade. But wait: couldn't we change the default location of all these packages from '/var/cache/apt/archives' to some place with more storage capacity, such as, e.g., an USB stick or a SD card? Oh yes, and its very easy to accomplish.

For a permanent change (such as required for an upgrade), issue the following command (the directory 'archives' should exist, of course):

echo "dir::cache::archives /media/foo/archives;" >> /etc/apt/apt.conf

Temporarily, apt-get itself can redirect the cache with the parameter -o:

apt-get -o dir::cache::archives=/media/foo/archives install bar

After that, it took only a

update-manager -d

to initiate the upgrade. Went without a hitch, except that I didn't have any window decorations anymore (I had to select compiz as window manager again), and the few things I always change:

gconftool-2 -s -t bool /apps/update-notifier/auto_launch false
gconftool-2 -s -t bool /apps/indicator-session/suppress_logout_restart_shutdown true
gdm gconftool-2 -s -t bool /desktop/gnome/sound/event_sounds false
gdm gconftool-2 -s -t bool /apps/gdm/simple-greeter/disable_user_list true
gconftool-2 -s -t string /apps/metacity/general/button_layout ":minimize,maximize,close"

Ok, the last one is new: it puts the buttons in the window decoration to the right (place).

I've also upgraded my 8.04 LTS server to 10.04 LTS with a simple

do-release-upgrade -d

All services continued to function.

Simplicity rules

Good news, everyone: today (and rather late) I've discovered that KuickShow has indeed been ported to KDE4, contrary to initial rumours and creeping suspicions. Aaaah, that's so much better! Gwenview might be interesting for users who only want a red eye correction, but it certainly doesn't meet my needs.

And my needs are truly very humble. I want the image to open immediately and without any borders, menus or further ado (in KDE, get rid of the borders via 'Advanced/Special Application Settings'). I also want to be able to rapidly adjust brightness, contrast and gamma of a given picture, which in kuickshow is as easy as pressing b, c, and g (plus shift to reverse the action).

You should see the flabbergasted Windows users when the image magically transforms in front of their eyes without me performing any mouse acrobatics. 😄

Objective news

The media continue their unconcealed attempt to hype the ipad. Desperate as they are,
their statements get more and more ridiculous:

Werden wir Bücher auf dem iPad lesen? Ja, natürlich. Für das iPad hat Apple einen neuen Vertriebsweg für Bücher geschaffen.

As if E-book readers with a weight of less than 300 g, a battery life of one week and a display readable in bright sunlight would never have existed. 😄

Und, um es gleich zu sagen: Es ist die Zukunft. Punkt. Es gibt darüber gar keine Diskussion.

But of course! Certainly, no discussion! crazy bugger)

There is one (1) statement in the article, however, that I believe to unintentionally reveal the true motivation behind this campaign:

Für die Zeitungsbranche ist es vermutlich die letzte Möglichkeit, das Rad, das sie durch die kostenlosen Internetseiten zu weit gedreht hat, nochmals zurückzudrehen und Geld zu verdienen.

In this context, the ipad is nothing but a quantum of solace.

And look how desparate they are:


Amok Time

I'm administring a couple of small number crunchers at work. That's usually very little effort, as all of them run under Debian Squeeze and an occasional 'wajig dailyupgrade' is all what's needed to keep the system up to date. Furthermore, all users of these systems are knowledgeable, disciplined and cooperative. Errors, of course, are human. And shit happens. 😉

One of these knowledgeable, disciplined and cooperative users sent me an e-mail last night, stating that he's afraid that a program he wrote and started could cause ... ahem ...problems...

Indeed. It was eating up the available memory at an alarming rate. Of course, I've set a limit for a the memory a single process can possibly request. But at the same time, this program caused the kernel to spit out a lot of oopses and other warnings resulting in an even more alarming growth of the files in /var/log. Somehow, I didn't like the looks of it, and I thus tried to kill the associated processes.

Well, my user stated in his mail that he had tried that too, and wasn't successful despite being the owner. Being root, I couldn't kill his processes either. Mind you: the status of these processes was shown to be R, nor D or Z. The parent was init, by the way. Hmpf.

Well, then, I thought, let's reboot. 'Shutdown -r now' will teach this process who's the boss around here!

Nothing happened, though, and when looking, it became clear that my shutdown command went into immediate 'uninterruptible sleep' (status D). Almost all commands did, in fact. 'Sync', for example. 😄

The system was just so faithfully and naively waiting for something to happen, that nothing worked anymore. Except for the processes of my user causing a load of above 60...and a rapidly diminishing memory and harddisk space.

Fortunately, one can employ the magic sysrequest also without physical access to Alt+druck+B:

echo b > /proc/sysrq-trigger

Replace the b by an o when you want to halt the system. 😉

The dawn of a new age! (slightly hysterical, trembling voice)

Guess what the following, essentially literal quotations that I have taken from a single article are referring to:

Es ist völlig überflüssig - doch nach wenigen Minuten will man ohne es nicht mehr leben.

Als sei man vom Stummfilm aufs 3-D-Imax-Kino umgestiegen.

Das Display, mit seiner 1024-mal-768-Pixel-Auflösung, strahlt einen an wie eine Megawatt-Großbildprojektion.

Sein 1GHz-Chip sorgt dafür, dass hier alles enorm viel schneller flutscht als bei Rechnern mit 3 GHz DualCore.

Die rasante Prozessor-Geschwindigkeit kommt vor allem dem Browser zugute. Er drückt einem das Internet geradezu in die Hand - ein Gefühl, das einem kein Desktop-Computer geben kann.

Das phantastische High-Resolution-Display und die belastbare Batterie machen es zum tragbaren Kino.

Filme kommen viel frischer und brillanter daher als bisher, in einer Bildqualität, an die kein Rechner mit 30" Cinema-HD-Display herankommt.

Die dröge AIM-Liste wird da zum bildschirmfüllenden Spektakel.

3-D-Spiele reißen einen mehr mit als auf einem richtigen Computer. Sie kommen strahlender, heller, realer daher.

Der Sound ist vor allem mit Kopfhörern atemberaubend voll und tief, und mit Lautsprechern kann es das iPad mit jeder raumfüllenden Stereoanlage aufnehmen.

Can't guess? Let me help you. Here a few more attributes from the same article:

klar und plastisch
schöner und feinfühliger

Still not? Ok ... it doesn't have a USB port, nor an SD slot. It doesn't even have a camera, nor ... Oh, now you know, right? crazy bugger)


My Mini came with a VGA webcam for which I haven't had any use so far (In case you didn't notice, I'm not one of these twittering, facebooking and flickring social entities. Rather, I'm an antisocial encrypted-IRC type of guy. 😄 )

In the office, we talked about the use of webcams for security and surveillance, and wondered about available solutions for machines running Linux. I thus came across Motion, a software motion detector. Motion is very easy to use (at the command line), very configurable (with an editor), extensively documented and quite powerful.

For example, if one would plan to use Motion as a security solution, it would be critical that all pictures taken are forwarded in real time to a remote server. That'd be easily done: one would just have to edit ~/.motion/motion.conf:

on_picture_save scp -P xyz %f

Instead of xyz you'd have to use the actual port number, of course. 😉

Here's an example of Motion in action. It detected my cat en route to the bedroom. 😉


Some options I've used when taking this image were mentioned in Chris Page's blog.

Maximum spamicity

Now look at this mess:


cd ~/.Mail/Ham/cur
grep -ih "spamicity=" * | awk '{printf "%s\n", $4}' | cut -c11-15 | sort | tail -n 1

cd ~/.Mail/FalseNeg/cur
grep -ih "spamicity=" * | awk '{printf "%s\n", $4}' | cut -c11-15 | sort | tail -n 1

Eieieieieiei ... thats all wrong! Dammit. 😞 What can you do with that? Nothing, nothing at all. *sniff*

Update: All right then, let's pretend I'm an Erklärbär.

The spamreport conveys a clear message: while the number of spams I receive drops steadily and is now well below one per day, the recognition rate continues to decrease as well and is now at an inacceptable 67%. I've described the reasons for this development previously.

Apparently, the spamfilters of my mail providers are pretty good, and my own, local ones have only limited success in filtering the mails which have escaped the attention of the providers' filters. Bogofilter seems to struggle particularly hard: it contributes only 15% to the overall detection.

Being of the impatient type, I thought I could instantaneously improve the situation by decreasing the threshold of the spamicity with which a particular mail is classified as being spam. Right now, this threshold is set to 0.9.

In fact, the average spamicity as determined by the perl script spamstat (written, as usual, by haui) encouraged that idea: the average spamicity in one of my ham folders is 0.062, i.e., close to zero, while the one in the falseneg folder (where all spam messages end up which were not detected either by bogofilter or spamassassin) is significantly higher: 0.421. So, why not simply set the threshold to 0.4?

Well, because the only thing worse than false negatives are false positives. 😉 I haven't experienced any of the latter in more than two years, and I want to keep it that way. To avoid false positives, however, the maximum spamicity in my ham folders is more relevant than the average one.

It's not difficult to find this value. Here's how:

We first grep for the keyword "spamicity" in all messages. The switch -i ignores the case (capital or not), -h suppresses output of the file name. The result of this first command is a long list of lines which all look like that:

X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.1.7

The result is piped to awk, which just prints the fourth column of that line, i.e.,


This result in turn is piped to cut for selecting the 11th to 15th character, leaving


The resulting list of numbers with three decimal places is sorted in ascending order, and finally piped to tail to show the very last entry: the maximum spamicity. 😊

The unfortunate result I've obtained of course means that I can forget my original idea of simply decreasing the threshold. Instead I have to let my filters learn, a process requiring great patience.

Just for completeness, and since I've started with all this explaining, let me show you how to train both bogofilter and spamassassin by two example scripts:

bogoutil -w ~/.bogofilter .MSG_COUNT
cd /home/cobra/.Mail
nice find FalseNeg -type f -print | xargs bogofilter -vvv -s -B
nice find Ham -type f -print | xargs bogofilter -vvv -n -B
bogoutil -w ~/.bogofilter .MSG_COUNT
cd /home/cobra/.Mail
sa-learn --showdots --spam FalseNeg/*
sa-learn --showdots --ham Ham/*

Before running these scripts, don't forget to remove the markup from the mails included in the learning! That's easily accomplished by a custom filter in your e-mail client (here kmail):


Second best

The developer version of Chromium is now also available for Mandriva. Let's see what it can do against the latest Opera snapshot ...

Opera 10.52 Internal
363.6 ms +/- 3.0%
Chromium 5.0.339.0
431.4 ms +/- 2.9%
Midori 0.20
547.4 ms +/- 3.6%
Firefox 3.7a4pre
983.6 ms +/- 4.7%

Not much, as you can see. 😄

Oh, by the way: I've decided to only benchmark browsers which are able to beat the 1000 ms mark. Slower ones are ... well, they are boring! Let's see what IE 9 can do. 😏