common knowledge – apache column width

this is common knowledge, i have just forgotten it — to widen the primary column in an apache directory listing : Alias /alias /location_of_alias <Directory “/location_of_alias”> IndexOptions NameWidth=* </Directory> just replace /alias with the alias to be used. also replace /location_of_alias with the actual directory/location that is going to be referenced. and obviously, this is … Read More

car pc pictures

a friend from work asked me to install a car pc into his car (2003 honda accord ex) and also wire his gps unit through the fusebox of the car – here are some pictures i know that it is disappointing that it is windows and not *nix, but im not going to be the … Read More

update to solaris file system check

#!/bin/bash TMP_FILE=/tmp/disk_usage.tmp.$$ df -h | grep ‘%’ | grep -v “/cdrom/” | tr -d ‘%’ | awk ‘{ if (NR != 1) { if (NF == 6 && $5 >= 95) print $2,$3,$4,$5″%”,$6; else if (NF == 5 && $4 >= 95) print $1,$2,$3,$4″%”,$5; } }’ >$TMP_FILE if [ -s $TMP_FILE ]; then cat $TMP_FILE … Read More

i will be away for a few days

i will be away on business for the next couple of days so any one trying to contact me via email – be warned – i will not reply in a timely fashion. i hate you all…

slight spin on nagios file system check

here is a slight spin on the nagios disk check function – this is for when it is not critical for you to check free/used space on the fs but you still want to be alerted when something is wrong works both in linux and solaris #!/bin/bash TMP_FILE=/tmp/disk_usage.tmp.$$ df -h | tr -d ‘%’ | … Read More

nagios ram check for solaris and linux

these scripts work when checking nagios services over ssh (check_by_ssh) linux: #!/bin/bash TMP_FILE1=/tmp/ram.free.tmp1.$$ top -b -n1 |head -4 |tail -1 | awk ‘{free = $4 / $2 * 100; if (free >= 90.0) print $0 }’ >$TMP_FILE1 if [ -s $TMP_FILE1 ]; then cat $TMP_FILE1 rm -f $TMP_FILE1 exit 1 fi solaris: #!/bin/bash TMP_FILE1=/tmp/ram_free.tmp1.$$ TMP_FILE2=/tmp/ram_free.tmp2.$$ … Read More

rrd stuff part three

here is an updated rrd post. these scripts are all required to create, update and graph the required information. the twist on these scripts is that these are created for use with bonded nics in linux (can be changed for whatever uses) here is the create script here is the update script here is the … Read More

rrd stuff part two

here is the creation script that i talked about in the initial rrd post – this script will create the round robin databases and also do an initial populate enjoy download here

rrd stuff part one

here is an rrd script that i butchered so it can be used to monitor ifInOctets & ifOutOctets on 4 24 port cisco’s – it is a cpu hog so its not the kind of script to be run on an already bogged down machine. this is not the creation script – i will be … Read More

neat little perl trick

you ever have a shitload of files in a directory that needed one thing (the same in all) changed ?? here is this cool little perl trick to change that one object in all the files without having to edit them all by hand perl -pi.bak -e ‘s/foo/bar/i’ *.extention by running this with the -p … Read More