Just a small one that tends to get my attention when I have a terminal open into a remote machine and would like to notice right away when the load rises. Of course one could just use the
echo -e "\a" if you have visual bell enabled or if you want to annoy people around you and have audio bell enabled.
while true; do
foo=`cut -d. -f1 /proc/loadavg`
if [ $foo -gt 4 ]; then
echo -e "high load ----- \a"