severity 484349 wishlist
tag 484349 wontfix
thanks
Hi Folkert,
Folkert van Heusden wrote:
a general load limit is definitely out-of-the-question. To give you a
simple example why, suppose the administrator has a cron job that checks
the load every minute and sends out an alert if it reached 25. The
proposed solution would actually have become a problem.
Without going into any details, a "smarter" approach -- eg specifying
load limits per job -- would be too much of an effort.
A possible solution for the situation you describe would be to preceed
your commands with the following test (for a load of 20.00):
[ $(awk '{print $1}' /proc/loadavg | tr -d '.') -le 2000 ] || your-job
Christian