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 šŸ™‚

void.gr was moved!

Void.gr has moved to a new (and hopefully better) hosting provider. Thnx a lot to Dinos, Global Networks and www.ghost.gr for kindly hosting void.gr.

This blog will soon move to a subdomain of void.grā€¦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 ?

*edit
Yahoo changed today itā€™s certificate with another oneā€¦

libmysqlclient.so.12 => 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 http://rpm.pbone.net/index.php3/stat/4/idpl/2144706/com/MySQL-shared-compat-4.0.25-0.i386.rpm.html 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! http://gentoo-wiki.com/HOWTO_fbsplash#Adding_Background_To_All_Consoles

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 bugs.gentoo.org was tagged as a duplicate of http://bugs.gentoo.org/show_bug.cgi?id=107076 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:

    #!/bin/bash
    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: http://bugs.gentoo.org/show_bug.cgi?id=107052

    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!

    it87-isa-0290
    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

    lm90-i2c-0-4c
    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:

    sensors-fan1.rrd
    sensors-fan2.rrd
    sensors-fan3.rrd
    sensors-temp1.rrd
    sensors-temp2.rrd
    sensors-temp3.rrd

    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:

    sensors-it87-fan1.rrd
    sensors-it87-fan2.rrd
    sensors-it87-fan3.rrd
    sensors-it87-temp1.rrd
    sensors-it87-temp2.rrd
    sensors-it87-temp3.rrd
    sensors-lm90-temp1.rrd
    sensors-lm90-temp2.rrd

    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ā€¦

    cheers!

    graffiti

    A great graffiti groupā€¦thatā€™s artā€¦.

    http://www.banksy.co.uk

    I think this is my favorite: http://www.banksy.co.uk/outdoors/images/newfullsize/trooper.jpg

    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ā€¦
    #!/bin/bash

    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
    else
    touch $BADIS.missing
    fi
    fi
    done < check.tst
    echo "$THEBADONES"
    echo "$THEMISSONES"
    echo "$OKFILES OK, $BADFILES BAD, $MISSFILES MISSING, OUT OF $[$OKFILES+$BADFILES+$MISSFILES]"
    mkdir -p "[ $OKFILES OK, $BADFILES BAD, $MISSFILES MISSING, OUT OF $[$OKFILES+$BADFILES+$MISSFILES] ]" ; rm -f check.tst

    USE IT AT YOUR OWN RISK!!! IT MAY DELETE ALL YOUR FILES. IT WONā€™T BE MY FAULT!

    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 mountiso.sh:

    #!/bin/bash
    STR="/tmp/iso_image_link"
    echo "Mounting $1"
    ln -sf "$1" $STR
    mount /mnt/image

    then chmod +x mountiso.sh 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:
    mountiso.sh "$@"

    Now when you click on an iso file inside rox that will call mountiso.sh 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.

    Enjoy.