Skip to content

Instantly share code, notes, and snippets.

@chriskeene
Last active Dec 17, 2015
Embed
What would you like to do?
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