Sys::Statistics::Linux::LoadAVG(3pm)

Sys::Statistics::Linux::LoadAVG3pm

Collect linux load average statistics.

Usage

    use Sys::Statistics::Linux::LoadAVG;
    my $lxs  = Sys::Statistics::Linux::LoadAVG->new;
    my $stat = $lxs->get;

Overview

Sys::Statistics::Linux::LoadAVG gathers the load average from the virtual /proc filesystem (procfs).

For more information read the documentation of the front-end module Sys::Statistics::Linux.

Load average statistics

Generated by /proc/loadavg.

    avg_1   -  The average processor workload of the last minute.
    avg_5   -  The average processor workload of the last five minutes.
    avg_15  -  The average processor workload of the last fifteen minutes.

Methods

new()

Call "new()" to create a new object.

    my $lxs = Sys::Statistics::Linux::LoadAVG->new;

It's possible to set the path to the proc filesystem.

     Sys::Statistics::Linux::LoadAVG->new(
        files => {
            # This is the default
            path    => '/proc',
            loadavg => 'loadavg',
        }
    );

get()

Call "get()" to get the statistics. "get()" returns the statistics as a hash reference.

    my $stat = $lxs->get;

Exports

No exports.

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 4 times.

  1. 6.0
  2. 7–8
  3. 9
  4. 10–11
  5. 12–13

Reporting bugs

Please report all bugs to <jschulz.cpan(at)bloonix.de>.

Author

Jonny Schulz <jschulz.cpan(at)bloonix.de>.

From libsys-statistics-linux-perl 0.66-5 in Debian 13 (Trixie). Parsed by carta from the page's man source.