Rstat::ClientA Perl library for client access to rstatd | |
Download |
Rstat::Client Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Ron Isaacson
- Publisher web site:
- http://search.cpan.org/~isaacson/
Rstat::Client Tags
Rstat::Client Description
A Perl library for client access to rstatd Rstat::Client is a Perl module for client access to rstatd.SYNOPSIS use Rstat::Client; $clnt = Rstat::Client->new("some.host") $stats = $clnt->fetch(); # wait for response $stats = $clnt->fetch(10); # fetch with timeout printf "CPU Load: %.2f %.2f %.2f ", @{$stats->{'avenrun'}};This Perl library gives you access to rstatd statistics. First create an Rstat::Client object: $clnt = Rstat::Client->new($hostname);The parameter $hostname is optional and defaults to localhost. The constructor never fails; a valid Rstat::Client object is always returned.Fetch statistic records by calling the fetch() method of the Rstat::Client object: $stats = $clnt->fetch($timeout) or die $@;The parameter $timeout is optional. By default, the fetch() method will block until a response is returned.If the request is successful, fetch() returns a reference to a hash containing the statistics. In the event of an error, fetch() returns undef, and $@ contains the reason for failure. Requirements: · Perl
Rstat::Client Related Software