Last active
August 29, 2015 14:06
-
-
Save martynjarvis/2dc98eb41f0016fa61ba to your computer and use it in GitHub Desktop.
Simple bash script to monitor something.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment