Some statistics on linux-greek-users mailing list and forum.hellug.gr

Out of boredom I decided to parse the Linux-Greek-Users (LGU) archives and create some graphs. Then I wrote a few more oneliners to deduct some numbers out of the archives. These numbers may or may not mean anything to someone, it’s entirely up to the reader.. Since the archives contain some amount of spam (not too much though) one must take that into consideration as well while reading the numbers I extracted below…

First thing I did was to download the index file containing the links to the monthly archives since February 1997:
wget http://lists.hellug.gr/pipermail/linux-greek-users/

Then download each month’s archive:
for i in `grep date index.html | cut -d"\"" -f2`; do foo=`echo $i|cut -d"/" -f1`; wget http://lists.hellug.gr/pipermail/linux-greek-users/$i -O $foo-date.html ; done
(more…)

delete all empty directories using xargs

I was trying to figure out one 1-liner to delete all empty directories in a tree.
The following should do it’s job:
%find -type d -empty | xargs rm -rvf

BUT! While this works for directories with “regular” filenames, it doesn’t work when there are special characters inside the filename. Consider this for example:

%ls -1
test 1
test2
test _ 3
%find -type d -empty
./test 1
./test2
./test _ 3
%find -type d -empty | xargs rm -rvf
removed directory: `./test2'
%find -type d -empty
./test 1
./test _ 3

Only directory “test2” was deleted. To delete the rest of the directories when they contain “special” characters like whitespace and quotes one needs to modify the command like this:

%find -type d -empty -print0 | xargs -0 rm -rvf
removed directory: `./test 1'
removed directory: `./test _ 3 '

🙂

command exit status on zsh using RPROMPT

I’ve just updated by .zshrc so that I can get the exit status of commands on a “right prompt” using zsh’s RPROMPT variable. Exit status appears only if the value is non-zero.

Example usage:
zsh-rpropmpt-exit-codes

You can find my zshrc and more dot files that I use in my Pages/My dot files

Severely degraded harddisk performance on sata_sil by athcool

I am writing this post to provide some statistics on athcool + sata_sil usage. The results are horrible.

Athcool is a small utility, enabling/disabling Powersaving mode for AMD Athlon/Duron processors.
The homepage of the utility has a big fat warning as well:

WARNING: Depending on your motherboard and/or hardware components, enabling powersaving mode may cause:

* noisy or distorted sound playback
* a slowdown in harddisk performance
* system locks or instability

The Gentoo ebuild also has these warnings:

ewarn “WARNING: Depending on your motherboard and/or hardware components,”
ewarn “enabling powersaving mode may cause:”
ewarn ” * noisy or distorted sound playback”
ewarn ” * a slowdown in harddisk performance”
ewarn ” * system locks or unpredictable behavior”
ewarn ” * file system corruption”
ewarn “If you met those problems, you should not use athcool. Please use”
ewarn “athcool AT YOUR OWN RISK!”

Ignoring all these warning I was using athcool for years on my old desktop box filled with 2 IDE disks. Never had any real problem at all, except for a some performance loss. The problem appeared when I first used a sata disk on motherboard’s, Gigabyte GA-7VAXP-A Ulta, sata controller which uses the sata_sil module.
(more…)

How much can misconfigured wordpress plugins stall your server’s performance

A couple of days ago I’ve met a guy who has a high traffic blog about tech stuff. The guy was telling me that he has hosting problems and that his blog is getting slower and slower by the day. I’ve offered to help him by providing hosting for him in one of the servers that I administer. After making the transition from his old hosting to my server, which was not an easy thing to do due to latin1 to utf8 conversions that had to be made – it deserves a post of it’s own, I started to notice increased load on my server. Sure his blog had heavy traffic…but could it be that bad ?
(more…)

SSH Escape Characters

I am sure a LOT of people reading this blog use ssh in their everyday work/life/etc. I am not sure though how many of you have heard of ssh EscapeChar unless you’ve read the ssh_config file (and even if you have done so, did you pay any attention to it ?). So what can you do with EscapeChar ? not a lot, but certainly very usefull stuff.

My most frequent problem with ssh is sessions that sometimes they don’t end as they are supposed to. You logout from the remote system and you never get a prompt on yours because something has stuck somewhere, sometime. Wouldn’t you wish there was an escape sequence to end this suffering, like telnet’s ctrl+] ? Well there is! Just edit your client’s ssh config file (/etc/ssh/ssh_config for gentoo) and add to the end:
EscapeChar ~

now try ssh to a host and when you are in, try this: ~?. You will see a list of helpfull options. The solution to the previous described problem of stale connections is ~.
Dummy-safe: So to get it to escape press[alt gr] + [~] two times and then [.]
If that doesn’t work, try pushing Enter before “~”.

What’s also very helpfull is the ability to start/end portforwarding during an active ssh session! Say you have opened an ssh connection to a host and you now have to portforward a port, what do you do ? New ssh connection with -L/-R options ? nope! You just press ~C and do what you want from the ssh “command shell”.

enjoy!