News for February 2010

Monit test repository

I’ve been using monit to monitor the processes on my servers for several years now. During this time I’ve written test-cases for several daemon processes, especially tailored for Debian GNU/Linux (Unstable/Squeeze):

  • apache2
  • apt-cacher-ng
  • atd
  • avahi
  • bind
  • clamav
  • couchdb
  • courier-auth
  • courier-imap
  • courier-mta
  • cron
  • dhcpd
  • dovecot
  • ejabberd
  • gnump3d
  • slapd
  • memcached
  • mysql
  • nagios3
  • nscd
  • ntp
  • postgresql-8.4
  • puppet
  • samba
  • smartd
  • snmpd
  • spamassassin
  • squid3
  • ssh
  • supervisor
  • syslog
  • tomcat6
  • tryton

All of them are now available at this location: http://storage.fladi.at/~FladischerMichael/monit/

Feel free to use them in your own envirnoment or just an example on how to monitor a service. Feedback and improvements are always welcome.

Posted: February 25th, 2010
Categories: Debian, IT
Tags: , , ,
Comments: No Comments.

Novell’s dirty rug

Oh, the joys of administrating Novell systems. In SLES 10 they are still using rug to manage the package repositories. Investigating a deadlock while upgrading from SLES 10 SP2 to SP3 I discovered this error message, written in fancy engrish:

# rug refresh
ERROR: A Refresh request already Running.
This Refresh is Ignored.
Please Try After Sometime.

I think this is maybe related to Novell’s strategy to change their remote package downloader every month or so (you,rug,yum,zypper,…) while still maintaining their high level of crappiness.

In the end i had to “kill -9″ the zmd process to advance with the update. One day, I swear to you Novell, I’m gonna replace all this immanently broken SLES installations with Debian!

Posted: February 24th, 2010
Categories: IT
Tags: , , , ,
Comments: No Comments.

Celery with Supervisord

Using Celery in one of my projects I always found it a bit uncomfortable to start the worker processes by hand. Today someone else came up with the same problem on ServerFault. It motivated me to investigate a bit further on other options to accomplish this task.

Looking inside the contrib folder of the celery distribution led me to a project called Supervisor. It’s purpose is to control project related tasks in addition to the usual Sys-V-Init process running at boot. Actually it starts one management process through Sys-V and then starts tasks or daemons configured for various projects like celery worker processes.

Debian/Unstable already has a package for Supervisor which offers the directory /etc/supervisor/conf.d/ as a drop-in-location for project-related configurations.

aptitude install supervisor

I took the sample configuration from my python-celery Debian package and placed it at /etc/supervisor/conf.d/project.conf, modifying it to fit my needs:

; =======================================
;  celeryd supervisor for Django project
; =======================================

[program:celery.project]
command=django-admin celeryd --settings=setting --pythonpath=/path/to/project/
directory=/path/to/project/
user=nobody
numprocs=1
stdout_logfile=/var/log/celery/project.log
stderr_logfile=/var/log/celery/project.log
autostart=true
autorestart=true
startsecs=10

; if rabbitmq is supervised, set its priority higher
; so it starts first
priority=998
Posted: February 19th, 2010
Categories: Debian, IT
Tags: , , , , ,
Comments: No Comments.

Still in use

Running some statistical analysis on the Apache2 logs from the past year (2009) I noticed something frightening:

Number 6 was the most used version of Internet Explorer during the whole year. 18.7 % of all requests originated from IE6 while IE7 was at 13.8 % and IE8 reached 6.1 %.

The good news is that only 40.2 % of the traffic was caused by Internet Explorer browsers. The various versions of Firefox accumulated 36.6 % with version 3.0.10 being the most commonly used (4.9 %).

Hopefully there will be one day soon when Microsoft stops support for IE6. I really dare to hope so.

The dataset contained almost 500.000 records (hits) and analysis was carried out with AWStats.

Posted: February 18th, 2010
Categories: IT, Internet
Tags: , ,
Comments: No Comments.

HP un2400 modem finally works

The Qualcomm Gobi chipset built into my HP EliteBook 8530w finally works with GNU/Debian Unstable.

It requires a 2.6.31 Kernel and a separate firmware loader plus the appropriate firmware.

ATTENTION: The qcserial driver is currently broken in Linux 2.6.32 and later! Follow my advices only if you are using a Linux kernel version of 2.6.31! You can check your currently running kernel with:

uname -a

I’ve packaged the loader (gobi_loader-0.4) for Debian/Unstable amd64 and i386 (untested) architecture and it’s available at my private repository:

http://debian.fladi.at/

For direct access to the .deb files:

Install the package according to you architecture and make sure there was no error.

Now for the firmware: Sadly, I’m not allowed to distribute the firmware files due to copyright issues but they can be downloaded from HP:

Qualcomm Mobile Broadband Drivers – Gobi1000 (aka un2400)

Download the “sp45888.exe” file there and extract it to e.g. /tmp/un2400 with cabextract:

mkdir /tmp/un2400
cabextract -d /tmp/un2400 sp45888.exe

You can now find both firmware files at /tmp/un2400/Qualcomm/QCImages/Source/Packages/0/:

  • amss.mbn
  • apps.mbn

Copy both of them to /lib/firmware/gobi:

cp /tmp/un2400/Qualcomm/QCImages/Source/Packages/0/*.mbn /lib/firmware/gobi/

That’s it, now reboot and once your system is back up take a look at your USB devices with lsusb. You should see the un2400 device there. NetworkManager picked it up automatically as a modem and I was able to configure my 3G connection with a nice and fancy GUI :-)

Posted: February 18th, 2010
Categories: Debian, Everything Else
Tags: , , , , , , , , ,
Comments: No Comments.