Unix::Uptime is a rather simple Perl module that abstracts the task of figuring out the current system uptime, in seconds. It was born out of a desire to do this on non-Linux systems, without SNMP. If you want to use SNMP, there are pleanty of modules on CPAN already.
Additionally, since version 0.33_02, it supports retrieving the load average.
Currently, this module just supports Linux, FreeBSD, Darwin (Mac OS X), OpenBSD, and NetBSD. It should be easy enough to add support for other operating systems, though.
SYNOPSIS
# Standard Usage
use Unix::Uptime;
my $uptime = Unix::Uptime->uptime(); # 2345
# "HiRes" mode
use Unix::Uptime qw(:hires);
my $uptime = Unix::Uptime->uptime_hires(); # 2345.123593
# Load Average
my ($load1, $load5, $load15) = Unix::Uptime->load(); # (1.0, 2.0, 0.0)
Product's homepage
Requirements:
· Perl