pingimage

Archive for the 'Sysadmin' Category

nagios, mdadm and snmp

I found this script while looking for a simple script to monitor mdadm arrays. The script is fine, but it has a subtle bug – it will never report an error because the –detail parameter is missing in the call to mdadm. I modified the script a bit, like so:

#!/bin/sh
# (c) 2008 Jasper Spaans

worst=0
msg=”"

for [...]

a new home server

I’ve been running an old Shuttle with a 2.4GHz celeron CPU, 512MB of ram and two 500GB disks in raid-1 as home server for the past 5 years or so. Well, I upgraded the disks in February 2008, before that it had 2x 200GB in raid-1. The thing has no UPS and runs in the [...]

A customer reported problems with capistrany deploys that would just die like this:

** [XXX.XXX.XXX :: err] svn: REPORT request failed on ‘/!svn/vcc/default’
** svn: REPORT of ‘/!svn/vcc/default’: Chunk delimiter was invalid (http://XXX.XXX.XXX)
command finished

After disabling gzip compression on the server for text/xml documents, the error became

** [XXX.XXX.XXX :: err] svn: [...]

df and zettabytes

This is a very confused filesystem. But check it out – df supports zettabytes!

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/md0 19G -64Z 22G 101% [...]

I have a monit config that tries to stop/start mongrel instances like this:

start program = “/usr/bin/mongrel_rails cluster::start -C path-to-mongrel_cluster.yml –clean –only PORT”
stop program = “/usr/bin/mongrel_rails cluster::stop -C path-to-mongrel_cluster.yml –clean –only PORT”

I have the latest mongrel_cluster gem installed (1.0.5), and yet mongrel_rails kept throwing errors about –clean and –only:

invalid option: –clean for [...]

checking dns glue records

This is mostly a reminder to myself. Here’s a way to check a domain’s DNS glue records. For example, for google:

dig +trace +nosearch +all +norecurse google.com

counting known_hosts

All right folks, time to fess up. What’s your count?

$ wc ~/.ssh/known_hosts -l
1470

Obviously there are some old machines in there – this file goes back at least five years. There are some duplicates as well as there is one line per host/port/user combination. It’s annoying that I can’t weed out old entries easily, as ssh [...]

We recycled at work this week – literally over a metric ton (estimated) of old servers. This is what about two thirds of that amount looked liked:

Apologies for the low quality picture – I only had a crappy cell phone camera on hand…

Firefox 3 has a new ‘feature’ where downloaded files are marked readonly when they are opened on the fly with the ‘open with’ feature.
The reasoning behind this is that there were many people who lost information because they didn’t realize Firefox deletes those temporary downloaded files when it closes. So Firefox 3 was patched to [...]

I got rather strange error messages from two servers this evening, one at 18:00:21 EST, and another one at 18:34:01 EST. One server lives in Brussels, the other in Boston. On both servers a (totally different) script executed via cron complained it could not resolve a hostname. Both hostnames exist, and both are in .org [...]