#!/bin/sh res="" do_warn() { disp="\"tc@box: loadavg -> $res!\"" ssh user@192.168.0.129 notify-send "$disp" # echo "Warning: res -> $res" } while true do res=`cut -d " " -f2 /proc/loadavg` val=`expr $res \>= 0.3` if [ $val -eq 1 ]; then do_warn fi sleep 60 done