My new toys!

Here are my new training toys 🙂

cisco 4507, 7200
cisco 5300, pix firewall, callmanager

You can easily distinguish:
Cisco 4507, Cisco 7206VXR, Cisco 7825-I1 Media Convergence Server,Cisco PIX 525,Cisco 3725

more about them when I start setting up…especially the 7825-I1 🙂 was moved! has moved to a new (and hopefully better) hosting provider. Thnx a lot to Dinos, Global Networks and for kindly hosting

This blog will soon move to a subdomain of…stay tuned!

jabberd2 starttls client problems

I’ve recently setup another jabberd2 installation. This time I had option, in c2s.xml , enabled. Unfortunately this created a ton of problems with clients other than gaim…Users using clients like exodus, miranda and psi for example had problems with that and could not login. Is it SO hard for programmers to write secure code ? Is it so hard to implement starttls ?

yahoo’s expired certificate screenshots

such a shame for such a big company…

was it so difficult to replace the cert a bit earlier ?

Yahoo changed today it’s certificate with another one… => not found

I’ve upgraded my mysql from 4.0.X to 4.1.X…and some progs gave me errors that they could not start because they couldn’t find they proper mysql library…
The solution is to download a mysql package called MySQL-shared-compat. Unfortunately it only comes as an rpm…but..for us gentoo users there’s a nice solution to installing it.

Go download one of those rpms and then:

rpm2targz MySQL-shared-compat-4.0.25-0.i386.rpm
tar zxvf MySQL-shared-compat-4.0.25-0.i386.tar.gz
cp ./usr/lib/*.so.* /usr/lib/

and you are done…all progs continue to work just like before.

gentoo “broken” world file

Yesterday, I did an “eix xpad” and I saw that there were newer versions than I had installed…That was weird because I daily do my “emerge -uDav world”. That was not the first time though such a thing had happened. So I opened my “/var/lib/portage/world” file and started checking for some of my packages that should be in there, like gimp, k3b, etc. There were just not there.
What I did was copy the world file to the root dir and then “regenworld”. Magically around 40(!!) new packages appeared inside the world file.
“emerge -uDav world” gave me aroung 20 packages to upgrade. Then I did an “revdep-rebuild” and my system is rocking again 🙂
I still don’t have an explanation of why did this happen…why weren’t these packages inside the world file…possibly broken emerge commands…but why ?

flawless fbsplash

I’ve recently faced some problems with my fbsplash installation during a kernel upgrade. Until kernel linux-2.6.11-gentoo-r9 I had no problems at all…when I tried upgrading to linux-2.6.11-gentoo-r11 I had kernel messages all over my splash screen…

The solution was not quite obvious…I re-read the fbsplash HOWTO and I started checking out everything it says…
I ended up changing my lilo.conf to something that looks like this:

image = /boot/bzImage-2611-r11
root = /dev/hda6
label = G2.6.11-r11
append=”gentoo=nodevfs,video=radeonfb:ywrap,1024×768-32@85 splash=silent,fadein,theme:KillBillTux-Yellow quiet CONSOLE=/dev/tty1″
initrd = /boot/fbsplash-killbill-1024×768
read-only # read-only for checking

along with a nice re-emerging of splashutils.
Then it came to me…why have the bootsplash in the default runlevel and not on boot ? so I could get my bootsplash from the very beggining…like some modern distros like Ubuntu does.

rc-update add splash boot

And I thought that would be enough…wrong! Read again fool!

As the splash script requires ‘local’ to be run first, adding splash to runlevel BOOT will force local to execute earlier, which may cause some problems, eg. when you are using some web services in local (eg. ntp)

now what ? What if we create another “local” named local2 and put all our previous commands there ?

cp /etc/conf.d/local.start /etc/conf.d/local2.start
cp /etc/conf.d/local.stop /etc/conf.d/local2.stop
cp /etc/init.d/local /etc/init.d/local2

then edit /etc/init.d/local2 and change all occurances of local with local2
then it’s time for:

rc-update add local2 default

and…drums rolling…. it works!

collectd ebuild part2 – the rejection

my collectd ebuild that I had posted to was tagged as a duplicate of even though it was created after mine…anyway 🙂

I might try to build an ebuild on something else someday 🙂

HOWTO extract rar files with rox

What’s easier than a single click extraction of rar files through rox ?

  • vi /usr/local/bin/urar
  • and paste inside:

    cd `dirname “$@”`
    unrar x -y `basename “$@”`
    mkdir “unrar done”

  • chmod +x /usr/local/bin/urar
  • then right click on a rar file…go to customize menu and drop /usr/local/bin/urar to the new window that appears.

    Now when you right click on a rar file you will see on the menu “urar”…just click it and you will have your rar files extracted to the current dir. It’s easy to modify the previous script to extract the files to a new dir if you want. It will also create a dir named “unrar done” to notify you when the process has finished.

    What needs fixing ?

  • Passworded rar files
  • some fancier method of telling us the extraction process is over instead of a mkdir…maybe with a small pygtk program to make it open a small “notice” on the current X display ?
  • collectd ebuild

    Last night I decided to create a gentoo ebuild for collectd. It’s the first ebuild I create…so bare with my errors…

    The ebuild is here:

    To emerge it follow these simple steps:

  • add PORTDIR_OVERLAY=”/usr/local/portage/” to your /etc/make.conf
  • mkdir -p /usr/local/portage/sys-apps/collectd/files
  • download the ebuild and put it inside /usr/local/portage/sys-apps/collectd/
  • download the rest attachments and put them inside /usr/local/portage/sys-apps/collectd/files/
  • cd /usr/local/portage/sys-apps/collectd/ ; ebuild collectd-2.1.0.ebuild digest
  • emerge collectd
  • I think the ebuild is not “stable” yet…it has only been tested on 2-3 x86 machines so I’ve added the ~x86 keyword for it…

    Feedback is more than welcome…thanks!

    collectd multiple sensor patch

    Collectd is a very nice program that runs in the background and gathers statistics about various kind of stuff like cpu load , disk activity, memory ,fan speed, temperatures, etc, and then puts them all in nice rrd files. It even has a set of scripts to create the graphs. I had only one problem though, but it was fixable.

    Collectd includes sensor.h from lm_sensor package that contains all the functions about your working temperature/fan sensors. It works fine if you only use 1 sensor. But I use 2!

    Adapter: ISA adapter
    CPU core: +1.78 V (min = +1.66 V, max = +1.84 V)
    DDRAM: +1.31 V (min = +1.17 V, max = +1.33 V)
    3v3 I/O: +3.22 V (min = +3.14 V, max = +3.47 V)
    +5V: +5.09 V (min = +4.76 V, max = +5.26 V)
    +12V: +12.42 V (min = +11.39 V, max = +12.61 V)
    -12V: -11.47 V (min = -7.17 V, max = -16.76 V)
    -5V: -4.03 V (min = -2.48 V, max = -10.02 V)
    Stdby: +5.09 V (min = +4.76 V, max = +5.26 V)
    CPU Fan: 4166 RPM (min = 1599 RPM, div = 4)
    BOX Fan: 1506 RPM (min = 897 RPM, div = 8 )
    IT87 T°: +37°C (low = +15°C, high = +55°C) sensor = thermistor

    Adapter: SMBus Via Pro adapter at 5000
    LM90 T°: +47°C (low = +15°C, high = +60°C)
    Athlon T°:
    +53.5°C (low = +15.0°C, high = +70.0°C)
    LM90 Crit: +70°C (hyst = +60°C)
    CPU Crit: +80°C (hyst = +70°C)

    As you can see I use both it87 and lm90 to get correct results. Collectd creates its rrd databases inside /var/lib/collectd. The sensor rrd file it creates are in the form:


    That means it can’t distinguish the different chipsets and overwrites the values if you have 2 chipsets. What I did was patch collectd to rename the rrd files in order to include the sensor name as well. I now have:


    The patch is here: Collectd-multi-sensor.patch.gz
    Just apply the patch inside the src dir , recompile and install.

    I am in doubt whether I should contact the author or not about this simple patch…anyway…If you use collectd and have more than 1 sensor running…tell me if it works for you…



    A great graffiti group…that’s art….

    I think this is my favorite:

    No more classical Trigonometry? Here comes Rational Trigonometry

    At least that’s what an australian academic, Dr Norman Wildberger, says. He says he managed to rewrite the classic geometry theorems and formulas without using trigonometric functions. His book might be worth a look.
    From his introduction:

    Rational trigonometry
    The new form of trigonometry developed here is called rational trigonometry, to distinguish it from classical trigonometry, the latter involving cos θ, sin θ and the many trigonometric relations currently taught to students. An essential point of rational trigonometry is that quadrance and spread, not distance and angle, are the right concepts for metrical geometry (i.e. a geometry in which measurement is involved).
    Quadrance and spread are quadratic quantities, while distance and angle are almost, but not quite, linear ones. The quadratic view is more general and powerful. At some level, this is known by many mathematicians. When this insight is put firmly into practice, as it is here, a new foundation for mathematics and mathematics education arises which simplifies Euclidean and non-Euclidean geometries, changes our understanding of algebraic geometry, and often simplifies difficult practical problems.
    Quadrance measures the separation of points, and spread measures the separation of
    lines. It turns out that

    quadrance = (distance)^2
    spread = ( sin (angle))^2

    although the actual definitions used in this text are independent of distance, angle and the trigonometric functions. They are ultimately very simple, based on finite arithmetic and algebra as taught in schools.

    no more cosθ and sinθ ? One thing’s for sure…he will be strictly judged by millions of mathematicians for every word he’s written…math people are crazy people and they don’t like others playing smart on them…

    good luck to Dr Wildberger…

    crude script for sfv checking

    Most of the times, when I download something and there’s an sfv file available I check the files against the sfv. That saves me from a lot of trouble later on…
    What I wanted though, was to have the sfv check program create a dir inside each folder it checks that would include the details from the sfv scanning. That way you can instantly know whether what you have downloaded 1 week ago is ok, or there are bad files inside, or missing files. I sometimes used to check what I downloaded against the sfv file but I forgot to move it to my “complete” folder. So I made a VERY crude script that does exactly what I want. It uses pure-sfv (which I think is a bit faster than all the others I’ve tested) and then parses the output to create a dir that looks like this:

    [ 49 OK, 0 BAD, 0 MISSING, OUT OF 49 ]

    Here’s the script…

    THEOLDDIR=`ls -1 | grep "MISSING, OUT OF"` ; rm -rf "$THEOLDDIR"
    ACTION=`pure-sfv *.sfv | egrep "different CRC|Tested|No such file" > check.tst`
    THEBADONES=`grep different check.tst`
    THEMISSONES=`grep "No such file" check.tst`
    LINECOUNT=`wc -l check.tst | cut -d" " -f 1`
    OKFILES=`tail -n1 check.tst | cut -d" " -f5 | cut -d"," -f1 `
    BADFILES=`tail -n1 check.tst | cut -d" " -f7 | cut -d"," -f1 `
    MISSFILES=`tail -n1 check.tst | cut -d" " -f9`
    while read line ;do
    BADIS=`echo $line | cut -d" " -f 1`
    if [ $BADIS != "Tested" ]; then
    if [ -e $BADIS ]; then
    mv $BADIS $BADIS.bad
    touch $BADIS.missing
    done < check.tst
    echo "$THEBADONES"
    echo "$THEMISSONES"


    and yes I know the code sucks. If you don’t like it don’t use it.

    HOWTO mount iso images with rox

    1) create the file

    echo "Mounting $1"
    ln -sf "$1" $STR
    mount /mnt/image

    then chmod +x and put it in your /usr/bin/ directory

    2) edit your /etc/fstab file and add an entry that looks like this:

    /tmp/iso_image_link /mnt/image iso9660 ro,noauto,user,loop 0 0

    3) open up rox and find a .iso file. Right click on it and go to File/Set Run Action. Then type there: "$@"

    Now when you click on an iso file inside rox that will call which creates a symlink from the file you want to mount to /tmp/iso_image_link. This way the “name” of the iso is always the same (/tmp/iso_image_link). The entry on the fstab file sets a static mount point for the iso images.

    This way you can mount dynamically named iso images through the /tmp/iso_image_link symlink.