2017/09/02
Monitor load in the terminal
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.
1
2
3
4
5
6
7
8
9
|
while true; do
sleep 2.5
foo=`cut -d. -f1 /proc/loadavg`
if [ $foo -gt 4 ]; then
echo -e "high load ----- \a"
else
echo "meh"
fi
done
|
Monitor load in the terminal is original content from devolve.