‘df’ command VS ‘du’ command

October 28th, 2006

On a mail server, I had a strange problem on ext3 partition. When I saw output of ‘df’ command, partition was Use% at 95% (size of 8 Go) but only 2 Go if I use ‘du’ command. And I have only 15.000 files on this partition according “find | wc -l” hack (then no block-size problem). Solution is in Linux ext3 FAQ :

The standard cause for this is some user process keeping a deleted file open. When this happens, the space is not visible via ‘du’, since the file is no longer visible in the directory tree. However, the space is still used by the file until it is deallocated, and that can only happen once the last process which has the file open either closes its file descriptor to the file, or the process exits. You can use the lsof program to try to find which process is keeping an open file. Usually it’s some log file, or some large data base file which gets rotated out, but some older process are still keeping the log file open.

Then I discovered ghost files with :

# lsof | grep “(deleted)”

In my case, an amavis daemon didn’t close an old and big log file.
I closed this process and now ‘df’ command say me Use% at 20%.

Then ‘df’ command win ;-)
End of alert.

TCP window scaling in kernel 2.6.17

July 17th, 2006

I had a strange problem: TCP freeze after HTTP GET with particular web sites (but no problem for HTTP HEAD for example) when I use machines with 2.6.17 Linux (Debian) kernel. I find why. Use of TCP window scaling changes in 2.6.17 and some broken routers don’t like this. Here is interesting discussion about use of TCP window scaling.

For my problem, fast (and bad) work around is:

echo 0 > /proc/sys/net/ipv4/tcp_default_win_scale

or even:

echo 0 > /proc/sys/net/ipv4/tcp_window_scaling

OTP on Debian system

May 20th, 2006

When you are not in your secure hacklab, and you login on your Debian systems (laptop, remote server), it’s not secure to enter your very private password (”please, could you see ceiling” is not a secure way).

Then you could use OTP (One Time Password) way.
On Debian system, do this :

# (apt-get|aptitude) install opie-server

Add pam_opie.so in your PAM info. For example, in pam.d/ssh (or pam.d/common-auth for all your pam.d/foo), modify to have :

auth sufficient pam_unix.so
auth sufficient pam_opie.so
auth required pam_deny.so

Your systeam is now ready for OTP.

To use it, log you and :

$ opiepasswd -f -c
(You must choose a secret pass phrase to generate your OTP)

Generate 10 passwords for example :

$ opiekey -n 10 497 ab1234
(Enter your secret pass phrase)

In this example, 497 is your current seq number and ab1234 is your seed. You could known them with opieinfo command (only if /etc/opiekeys is chmod 644).

Print your 10 passwords (with your printer or you hand if you are paranoiac) and you could use them. For example, OTP login :

homer login : jdoe
Password : [enter]
otp-md5 497 ab1234 ext, Response : [enter your OTP number 497][enter]
Welcome !!
jdoe@homer:~$

Conférence sur Samba

May 10th, 2006

À l’occasion de la Journée Méditerranéenne des Logiciels Libres (JM2L), j’ai fait une présentation d’une heure sur Samba. Vous pouvez retrouvez les slides (format PDF, 1.3 Mo) que j’ai projeté et surtout la vidéo de ma présentation (format OGG, 633 Mo) ; vous pouvez même la télécharger par BitTorrent.

À cette occasion, je tiens à préciser que mon HOWTO SAMBA est obsolète (il date de 2 ou 3 ans). J’espère pouvoir prendre le temps de le mettre à jour dans les prochains mois.

Realtek network cards with VIA chipset !

March 18th, 2006

At work, we have cheap network cards for tests.
From the last command, cards are announced to be classic Realtek RTL8139D chip.

Strange realtek card

But when I put in Linux 2.(4|6) systems, I discover curious lspci message :

Ethernet controller: VIA Technologies, Inc. VT6105 [Rhine-III] (rev 86)
Subsystem: VIA Technologies, Inc.: Unknown device 0105

And with pci-id 1106:3106 (rev 86), I found on PCI IDs database the reference :

3106  VT6105 [Rhine-III]
1186 1403  DFE-530TX rev C

On Linux, this chipset seems to be a VIA Rhine chipset and it works fine with via-rhine Linux driver. On Windows XP, card is recognized as Realtek card and works with Realtek driver. On OpenBSD, card works with vr driver…

MAC address confirms me that is Realtek card : http://www.coffer.com/mac_find/?string=00%3AE0%3A4C
Then I have VIA chipsets marked as Realtek Chipsets !
Perhaps a factory error…

rm my laptop’s tail

February 26th, 2006

Continuation of my “So fragile Acer Aspire laptop” and My laptop has … a tail (not the user command) adventures.

An other problem with my laptop : my precedent repairs was not quite solid and I must start again solderings in CNRS laboratories. To have a solid connector, I saw protection for padlock :

bye of pseudo-protection

And I fix a real connector (not an Acer one) :

my new connector

I hope that is the end of the story of my laptop’s connector.

My laptop has … a tail (not the user command)

January 16th, 2006

Continuation of my “So fragile Acer Aspire laptop” adventures.

Despite new solderings, I have again a problem with my connector for AC adaptor. To have peace, I replace this connector with a new one. But it must be out of my laptop ! After some solderings, my computer have a tail :

tail -f my-acer-latop

Thanks again to Maxime Keller and CNRS laboratories.

Présentation sur IPv6 au PLUG

November 28th, 2005

Suite à une présentation succinte sur IPv6 au cours de la réunion du PLUG de novembre 2005, voici les slides que j’ai utilisé :

Slides PLUG IPv6 - 984 Ko (format PDF)

Import PPT dans OpenOffice

November 25th, 2005

À l’occasion d’un petit déjeuner professionnel organisé par Evolix, j’étais chargé d’afficher plusieurs sortes de slides dont certains au format PPT (PowerPoint) sur OpenOffice.org version 2. Ces slides comportaient plusieurs animations plus ou moins complexes.

L’utilisation d’un de ces slides PPT importés dans ooImpress a provoqué une lenteur excessive (jusqu’à 40 secondes pour certaines pages). Ceci est gênant car on risque de penser qu’OpenOffice est bloqué alors que ce n’est pas (vraiment) le cas. Cette lenteur persiste si le document est exporté en ODP : certains effets PPT semblent donc être mals traduits par l’import PPT d’OpenOffice.

Mais on ne peut pas blâmer OpenOffice : en effet, le format PPT est propriétaire et fermé ce qui empêche d’autres logiciels de le lire parfaitement. On constate donc encore une fois l’importance d’utiliser des formats ouverts afin d’avoir une interopératibilité pour ses documents.

Ajout : je ne suis apparemment pas le seul à avoir remarqué ce genre de problème : Bug 54676 , Bug 57767

So fragile Acer Aspire laptop

October 24th, 2005

I have a 2 year-old Acer Aspire laptop with Debian Linux installed.

Modern hardware have now chipsets with millions of capacitors. But finish is not perfect. For example, my laptop have a very bad connector for AC adapter. This connector have fragile solderings then during 4 weeks, I must branch my AC adapter in particulars position to have a connection ! After this, connector was broken and my laptop must be down…

Broken connector

My only solution was a complete dismantling and precise solderings. Thanks to Maxime Keller and CNRS laboratories.

CNRS solderings