Sys::CpuLoadX - a module to retrieve system load averages.
use Sys::CpuLoadX; print '1 min, 5 min, 15 min load average: ', join(',', Sys::CpuLoadX::load()), "\n"; print "Best estimate of current load = ", Sys::CpuLoadX::get_cpu_load(), "\n";
@loads = Sys::CpuLoadX::load()
Retrieves the 1 minute, 5 minute, and 15 minute load average of a machine.
$load = Sys::CpuLoadX::get_cpu_load()
Returns the best estimate of the current system load. For Unix like systems, this is the 1 minute load average like the one returned from
uptime(1), and measures the average number of active processes that are competing for CPU time. For Windows machines (include Cygwin), it is computed from a one second sample of the CPU load, and is a value between 0 and 1 representing the fraction of CPU utilization during that second.
This function will return -1 if it cannot determine a suitable method for finding the CPU load on the system.
Original Sys::CpuLoad module by Clinton Wong, < http://search.cpan.org/search?mode=author&query=CLINTDW >
Original Win32::SystemInfo::CpuUsage by Jing Kang, < email@example.com >.
Updates by Marty O'Brien, < firstname.lastname@example.org >.
Copyright (c) 1999-2002, 2010 Clinton Wong and Marty O'Brien. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://dev.perl.org/licenses/ for more information.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 229:
=cut found outside a pod block. Skipping to next block.