Skip to content

Instantly share code, notes, and snippets.

@chriskeene
Last active December 17, 2015 02:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chriskeene/5533427 to your computer and use it in GitHub Desktop.
Save chriskeene/5533427 to your computer and use it in GitHub Desktop.
improved 'get the current load'
#!/bin/sh
loadaverage=`uptime | awk -F"," '{print $4;}' | sed 's/^.*: //g' | sed 's/...$//g'`
if test $loadaverage -gt 7
then
echo "load is " $loadaverage
uptime
/opt/scratch/proclist.sh >> loadout8.txt
top -b -n1 >> /opt/scratch/top.log
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment