Sutff about my job and comments about personal activities. Take a look to the first idea.

Wednesday, December 20, 2006

root-lvm

Hi, I've found an issue regarding root-lvm, at boot, lvm writes some files in /etc/lvmconf, /etc/lvmtab, /etc/lvmtab.d at boot in initrd and if lvm dont find enough space in ramdisk, it will not be able start up and never get root filesystem mounted... So you need to make a bigger ramdisk for initrd

It's a small summary of the problem case it's 4:00 am in the morning....

Friday, December 08, 2006

New job

Finally, I go a job as a system administrator for a large company with RHEL servers... I've seen a few problems with performance, kernel ops and programs dying with no apparent reason, so I think there should news about fixes or workarounds about it...

I'm currently having issues with IBM SDD (Subsystem Device Drivers) probably due I've not read the complete manual... so expect news in the future

I'm having issues with root in lvm which is not recognized at kernel upgrade...

And many other minor things which could be interesting to digg inside in my free time

Tuesday, October 10, 2006

CPU Frequency

Intel pentium 4 has a cpufreq capability (p4-clockmod module) which can lower the frequency of the cpu... but what about using maximum speed when needed?
The kernel has it's own governors named "conservative", "ondemand", "powersave", "userspace" which let you dinamically change the frequency ( modules: cpufreq_conservative, cpufreq_ondemand, cpufreq_powersave, cpufreq_userspace)

cpufrequtils helps in configuring the max/min frequency and governor

cpufreq-info will give you the current governor and frequency without digging in sysfs

cpufreq-set will dinamically let you change the governor

$ cpufreq-set -g [ondemand|performance] 


You can control if nice process increment cpu frequency using
/sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load


sysfsutils helps configuring sysfs in /etc/sysfs.conf
devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load = 1


A useful reference is How to make firefox faster

Saturday, October 07, 2006

Debian available updates

At debian, there is a program named "apt-show-versions" which show the updates available... even tough I've a 2mbit dsl link I usually just upgrade the major/minor updates (no revisions), after having a list of 400 packages to update every 2 weeks and not even use some of them, I decided to give my script power a try... so I create a script to just list to avoid listing the revision updates and I got something like...
/usr/bin/apt-show-versions -u | sed -e 's/\([:alpha:]*\) .*from \([0-9]:\)*\([0-9.a-zA-Z~]\+\)\([0-9a-zA-Z.+-]*\)* to \([0-9]:\)*\([0-9.a-zA-Z~]\+\)\([0-9a-zA-Z.+-]*\)*/\1 \3 \6/' | awk '{ if ( $2 != $3 ) print $1, "upgradable from", $2, "to", $3 }'

looks like hell but works, so use it if you like...

Friday, September 22, 2006

vmware @ 64-bit host

I not a fan of 64-bit technology, besides at work we have 4 64-bit hosts and only two of them have a 64-bit OS... which both have vmware gsx...

As a sysadmin I need automation and vmware use a perl tool called vmware-cmd with 32bit library dependency. 64-bit host is not supported according with this official document and is a known issue which will probaby not be resolved cause gsx is to be replaced with vmware server and other technologies, besides vmware states that 64bit support is experimental for gsx

After being disappointing by the fact, I decided to use the gnu/linux power and looked for a hack in vmware forums and the procedure is the following...

Copy library and perl32 binary from 32bits-host to 64bits-host
host32# scp -rv /usr/lib/perl5/5.8.5/i386-linux-thread-multi host64:/usr/lib/perl5/5.8.5
host32# scp -r /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi host64:/usr/lib/perl5/site_perl/5.8.5
host32# scp /usr/bin/perl host64:/usr/bin/perl32

Edit /usr/bin/vmware-cmd to use perl32 and libraries
< #!/usr/bin/perl -w -Iblib/arch -Iblib/lib -I/usr/lib/perl5/5.6.0/i386-linux -I/usr/lib/perl5/5.6.0 -I. --- > #!/usr/bin/perl32 -w -Iblib/arch -Iblib/lib -I/usr/lib/perl5/5.6.0/i386-linux -I/usr/lib/perl5/5.8.5 -I/usr/lib/vmware/perl5/site_perl/5.005/i386-linux -I.

Not too difficult considering that almost give up when I saw there was not support for 64-bit host

vim 7.0

I've to accept that the hidden geek besides me is dying....

The new vim features like "On the fly spell checking", "Open files in tabs" and "Undo Branches" keeps vim as the flexible text editor of all times.

Take a look at a visual walk through.

Wednesday, September 20, 2006

Squid power

I've to say that squid have a powerful regex capability and a flexible delay_pools feature.. and if both are used to decrease the bandwith of audio/video files you should get a performance improvement...

acl regex_progs url_regex -i \.rar$ \.msi$ \.bz2$ \.zip$ \.exe$ \.cab$
acl regex_progs url_regex -i zip\?.*$ exe\?.*$ rar\?.*$
acl regex_audio url_regex -i \.mp3$ \.avi$ \.mpeg$ \.mpg$ \.qt$ \.ram$
acl regex_audio url_regex -i \.mov$ \.flv$ \.wma$ \.asf$ \.wmv$ \.wav$
acl regex_audio url_regex -i mp3\?.*$ mpeg\?.*$ wma\?.*$ asf\?.*$ wmv\?.*$
acl regex_audio url_regex -i videodownload\? get_video\?

delay_pools 3

delay_class 1 2 # pool 1 is a class 2 pool
delay_class 2 2 # pool 2 is a class 2 pool
delay_class 3 2 # pool 3 is a class 2 pool

delay_access 1 allow all !regex_audio !regex_progs
delay_access 1 deny all
delay_access 2 allow all regex_progs
delay_access 2 deny all
delay_access 3 allow all

# Network is 50kbits and a bucket of 300KBytes
delay_parameters 1 -1/-1 6250/300000
# Network is 20kbits and a bucket of 300KBytes
delay_parameters 2 -1/-1 2500/300000
# Network is 2kbits and a bucket of 50KBytes
delay_parameters 3 -1/-1 250/50000

I don't agree with blocking content and I've to give service to 300 users with 1MB
P.D. The regex is just to give an idea of what can be done, beside they can be stripped a bit more.

Sunday, September 10, 2006

Samba virtual servers

At work I've set multiple samba personalities with virtual servers about a year ago... I've read many times about it and even set my machine for testing purpouses, unfortunatelly, there was a malfunction not recognizing or mixing shares between servers so I finally looked up at google groups and found a parameter called "smb ports" which should be set at smb.conf

Just to understand the protocol, I looked up the purpouse of 445 port of NBT and found a explanation at ntsecurity.nu which explains exactly the roll of 139 and 445 ports in the protocol.

I should say that samba docs are comprehensive and RTFM rule keeps working.

Friday, September 01, 2006

Administrating upgrades with Debian

I'm back from the lovely Utrecht... so posts will continue as usual

I have broken my debian a few times while doing an "upgrade" and a few weeks ago I found a package called apt-listbugs which is run before installing and reports open bugs of packages, and with the usage of apt-listchanges and reportbug I think I can get an even more stable etch/sid, I recomend reading upgrading unstable machines safely to understand a little more about it.

And I you just break it, read Rescuing systems using the Debian snapshot server to get back your old package which is no more in the official repository.

Thursday, August 24, 2006

me@utrecht

I've departing to Utrecht in a few hours I as a natural geek I've to say that the last thing I did was to update to a beta of blogger, so here I am.
I've read a few things about the city and I notice ecco shoe stores in the city, so I'll probably get at least new pair of shoe. I also found bike and walk roads and got amazed about them so probably I'll spend a day there.... and still no idea of what else should I do considering I'm only staying for a week.

RTFM

I have to say that use virtualization is part of my daily life and although not very confortable with the current solution named as "vmware gsx" I do like the idea of vmware-cmd which states that a "Power state" named "stuck" can be recovered with a "answer" command, I could say that it's trivial but not so simple to find out... take a look at RTFM

Sunday, August 20, 2006

Debian13th

Debian 13th birthday.... Congratulations debian13th