Skip to content

Instantly share code, notes, and snippets.

View martynjarvis's full-sized avatar

Martyn Jarvis martynjarvis

View GitHub Profile
@martynjarvis
martynjarvis / monitor.sh
Last active August 29, 2015 14:06
Simple bash script to monitor something.
#!/bin/bash
LOGFILE=/tmp/monitor.log
CMD="cat /proc/loadavg"
DELAY=60
while true; do
echo "$(date -u): $(eval $CMD)" >> $LOGFILE 2>&1
sleep $DELAY
done