This post originated from an RSS feed registered with Java Buzz
by Nick Lothian.
Original Post: Quick & Dirty Server Monitoring
Feed Title: BadMagicNumber
Feed URL: http://feeds.feedburner.com/Badmagicnumber
Feed Description: Java, Development and Me
Sometimes it’s difficult to setup Nagios for server monitoring. This is what I do instead.
Firstly, for load monitoring:
#!/bin/bash
FILENAME=< absolute path >/monitoring/logs/load-$(date +%Y%m%d).txt
cat /proc/loadavg | awk ‘{print strftime(”%Y/%m/%d %H:%M:%S”, systime()), $1, $2, $3}’ >> $FILENAME
Run it both from cron, and then I use another cron script and gnuplot to graph the output.
genloadgraph.sh:
DATE=$1
if [ -z $DATE [...]