Jun 20, 2009

Using an USB-Stick via FritzBox with Linux (Debian)

First you have to configure the FritzBox to allow access via network to the usb storage. This has to be done via the web-interface http://fritz.box:

You can choose read-only or read/write. The important thing is to mark the checkbox activate USB-network-storage.
On your linux machine you have to install the package smbfs. This can be done on debian (or ubuntu) with the following command:
apt-get install smbfs
After that you can mount the network drive with
/usr/bin/smbmount //fritz.box/SanDisk-CruzerMicro-01 /media/fritz.box -o password=
Note: The string after //fritz.box/ has to match the string inside the FTP configuration (look at the screenshot abouve). For the password you have add your password or just nothing, if you have set no password ;-)
To umount the network drive use this command:
/bin/umount /media/fritz.box
If you want to get this drive mounted everytime you enter the directory /mnt/fritz.box, you need autofs (apt-get install autofs). Add the file /etc/auto.media with the line:
fritz.box -fstype=smbfs,umask=000 ://fritz.box/SanDisk-CruzerMicro-01
and this line into /etc/auto.master:
/mnt /etc/auto.media --timeout=3
after that restart autofs:
/etc/init.d/autofs restart
and each time you enter /mnt/fritz.box, you see the content of your usb stick...

Jun 14, 2009

Dan Brown's Angels & Demons at CERN.ch

CERN launched a website for answering questions about the movie Angels&Demons (german title Illuminati): http://angelsanddemons.cern.ch

and why do i post this on my blog?
Because the ATLAS detector, where i did my thesis, was part of the movie!!! Including the control room...

Jun 6, 2009

Linux-Kernel: CFQ-Scheduling and ionice...

Everyone, who uses computers, has experienced a hanging system. Sometimes this is due to high cpu usage, but often it is due to i/o contention.
Now with Linux 2.6 kernels there is this parameter "elevator":
elevator= [IOSCHED]
Format: {"anticipatory" | "cfq" | "deadline" | "noop"}
See Documentation/block/as-iosched.txt and
Documentation/block/deadline-iosched.txt for details.
Choosing CFQ solve this problem, if you aware of ionice. With ionice i/o can be prioritized using classes.
For example:
ionice -c3 myprogram
The only problem is, that ps or top does not support this ionice parameter. So you have to ask for each process the ioniceness via ionice -p PID:
$ ionice -p 6344
none: prio 0