-
-
07 Jul 2003 17:23:07 UTC
- Distribution: Solaris-loadavg
- Module version: 0.01
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues
- Testers (17 / 11 / 37)
- Kwalitee
Bus factor: 0- % Coverage
- License: unknown
- Activity
24 month- Tools
- Download (3.6KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- unknown
- Reverse dependencies
- CPAN Testers List
- Dependency graph
- NAME
- SYNOPSIS
- DESCRIPTION The Solaris::loadavg module provides simple interface to Solaris getloadavg(3C) library function, which returns the number of processes in the system run queue averaged over various periods of time. Up to 3 (LOADAVG_NSTATS) samples are retrieved and returned to successive elements of the output array. The system imposes a maximum of 3 samples, representing averages over the last 1, 5, and 15 minutes, respectively. The LOADAVG_1MIN, LOADAVG_5MIN, and LOADAVG_15MIN indices, defined in <sys/loadavg.h>, can be used to extract the data from the appropriate element of the output array:
- AUTHOR
- SEE ALSO
NAME
Solaris::loadavg - get system load averages
SYNOPSIS
use Solaris::loadavg; @avgs = loadavg(); printf "load average: %f %f %f\n", @avgs;
DESCRIPTION The Solaris::loadavg module provides simple interface to Solaris getloadavg(3C) library function, which returns the number of processes in the system run queue averaged over various periods of time. Up to 3 (LOADAVG_NSTATS) samples are retrieved and returned to successive elements of the output array. The system imposes a maximum of 3 samples, representing averages over the last 1, 5, and 15 minutes, respectively. The LOADAVG_1MIN, LOADAVG_5MIN, and LOADAVG_15MIN indices, defined in <sys/loadavg.h>, can be used to extract the data from the appropriate element of the output array:
# get the first two load averages @avgs = loadavg(2); printf "first load avg (1min): %f\n", @avgs[LOADAVG_1MIN]; printf "second load avg (5min): %f\n", @avgs[LOADAVG_5MIN]; When called without an argument, the loadavg() function returns all three load averages.
EXPORT loadavg LOADAVG_1MIN LOADAVG_5MIN LOADAVG_15MIN
AUTHOR
Alexander Golomshtok, <golomshtok_alexander@jpmorgan.com>
SEE ALSO
Module Install Instructions
To install Solaris::loadavg, copy and paste the appropriate command in to your terminal.
cpanm Solaris::loadavg
perl -MCPAN -e shell install Solaris::loadavg
For more information on module installation, please visit the detailed CPAN module installation guide.