in reply to Re: how to set alarm in perl
in thread how to set alarm in perl

this is what i m need to do.i had script which submit tests to unix LSF. its expected that tests will end within 3 days.
but in worse loading it may happen tests dont complete in 3 days, in that case i will set a alarm for 3 days and will kill tests after 3 days.
if tests end with in three days i will create final report log.
i m checking status of servers to find if all tests are done or not using bsub commands.
in short i want
------ see if alarm is not expired ------ see serve load , if server load ==0 , all tests done , create final report. ------ if alam expired kill all tests. hope this explains what i need.

Replies are listed 'Best First'.
Re^3: how to set alarm in perl
by shmem (Chancellor) on Sep 11, 2006 at 08:59 UTC
    No need for alarm, then. Just write what you want to have.

    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}