On Fri, Dec 17, 2010 at 2:25 AM, Jeff Peng <jeffp...@gmx.net> wrote:
> 于 2010-12-17 9:32, Matt 写道:
>>
>> I have a perl script but I want to exit it if the uptime on the server
>> is less then say an hour.  Any idea how I would get uptime with perl?
>
> $ cat /proc/uptime
> 4205976.64 4017280.59
>
> The first column is the host's uptime seconds.

/proc/uptime is a linux innovation I believe, other *nix variant may
not have it (I don't think Solaris does).

Katie
-- 
CoderStack
http://www.coderstack.co.uk/perl-jobs
The Software Developer Job Board

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to