Fri May  6 00:27:23 CEST 2005

Torsmo coolness


Fiddling with torsmo on vera, my mediabox. For those of you who
dont know what torsmo is (http://torsmo.sourceforge.net),
its a system monitor, similar in function to gkrellm, but with two
major differences - it places itself directly on the X buffer
(windowless and transparent background) and its text based. See
for cool screenshots. Among other stuff, it can show cpu temperature,
network traffic, disk access, number of processes, etc. The cool thing
is that you can attach any home-grown script/binary which can output text to
the monitor, and it happily shows this info together with the regular output. 

On vera, I use it as a rudimentary clock and a new mail check for
Anna and myself. The mailchecker is a simple perl hack which formats
an NFS mounted file (from mailserver)  which contains the number of
files in the ~/.maildir/new directory. This file is in turn
regularly updated by a root cronjob which runs a script which does the following: 
# Checks number of new email for each specified user
# params: valid whitespace separated usernames

for n in $@ ; do
if [ -d /home/$n ] ; then
nr=$(\ls -1 /home/$n/.maildir/new | \wc -l)
\echo ${n} $nr
The result, which is outputted to stdout, is redirected to the file (described above) which is read by the perl script which is called by torsmo. Nifty eh? I use gkrellm on my other boxes, but on vera, which is weak, I dont want to waste resources on graphical thingimajigs... so I found torsmo to be an excellent solution. --