Skip to content

Instantly share code, notes, and snippets.

@GregPK
Created January 29, 2013 16:10
Show Gist options
  • Save GregPK/4665401 to your computer and use it in GitHub Desktop.
Save GregPK/4665401 to your computer and use it in GitHub Desktop.
Simple load monitor for a linux machine. Gets content of /proc/avgload every 5 sec and a timestamp. usage: `./loadmon > loadmon.csv`
#!/bin/bash
while [ true ]; do
echo -n `date '+%Y-%m-%d_%H:%M:%S'` ; echo -n ' '; awk '{print date $1,$2,$3}' /proc/loadavg
sleep 5
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment