Place your code which checks the server load into a loop which terminates when the time passed hits the timeout. Exit the loop if conditions for reporting are met. After the loop, do the reporting.
Write your script. If you have questions around it, post it, and ask. See How do I post a question effectively?.
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
In reply to Re^3: how to set alarm in perl
by shmem
in thread how to set alarm in perl
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |