Chad Kellerman wrote: > Hi everyone, > > What would be the easiest way to find the uptime of a linux > machine? I don't want to use a system call. Is there a module I can > use? Or do I have to open /proc/uptime and calculate it thru there? > > > Thanks for the help.. > > Chad >
yes. try the following: #!/usr/bin/perl -w use strict; use Sys::Load qw/getload uptime/; print "System load: ", (getload())[0], "\n"; print "System uptime: ", int uptime(), "\n"; __END__ david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]