stop high-load programs, if they get out of control


Stop high-load programs, if they get out of control:
amule likes to defunct.

LOAD=$(cat /proc/loadavg |cut -d . -f 1);
if [[ "$LOAD" -gt 3 ]]; then
skill amule
sleep 3
skill -KILL amule
fi

this as a cronjob.

  1. No comments yet.
(will not be published)

  1. No trackbacks yet.