Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • BackTrack 5 R2
  • Wine 1.4 / 1.5.5
  • Mozilla Firefox 12...
  • Ubuntu 11.04
  • Angry Birds 1.1.2.1
  • Ubuntu 10.04.4 LTS
  • Linux Kernel 3.4
  • Ubuntu Manual 10.10
  • Adobe Flash Player...
  • Pidgin 2.10.4
  • Home > Linux > Programming > Perl Modules

    Sys::Statistics::Linux 0.66

    Download button

    No screenshots available
    Downloads: 473  Tell us about an update
    User Rating:
    Rated by:
    Good (3.4/5)
    19 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Jonny Schulz | More programs
    Perl Artistic License / FREE
    April 22nd, 2012, 02:08 GMT [view history]
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Sys::Statistics::Linux description

    A Perl module to collect linux system statistics.

    Sys::Statistics::Linux is a Perl module to collect linux system statistics.

    SYNOPSIS

    use Sys::Statistics::Linux;

    my $lxs = new Sys::Statistics::Linux;

    $lxs->set(
    SysInfo => 1,
    CpuStats => 1,
    ProcStats => 1,
    MemStats => 1,
    PgSwStats => 1,
    NetStats => 1,
    SockStats => 1,
    DiskStats => 1,
    DiskUsage => 1,
    LoadAVG => 1,
    FileStats => 1,
    Processes => 1,
    );

    sleep 1;

    my $stat = $lxs->get;


    This module is the main package from the distribution Sys::Statistics::Linux and collects different linux system informations like processor workload, memory usage, network and disk statisitcs and other system informations. Refer to the documentation of the distribution modules to get more informations about all possible statistics and system informations.

    TECHNICAL NOTE

    This distribution collects statistics by the virtual /proc filesystem (procfs) and is developed on default vanilla kernels. It is tested on x86 hardware with the distributions SuSE (SuSE on s390 and s390x architecture as well), Red Hat, Debian, Asianux, Slackware and Mandrake on kernel versions 2.4 and 2.6 and should run on all linux kernels with a default vanilla kernel as well. It is possible that this module doesn't run on all distributions if the procfs is too much modified.

    For example the linux kernel 2.4 can compiled with the option "CONFIG_BLK_STATS". It is possible to activate or deactivate the block statistics for devices with this option. These statistics doesn't exist in /proc/partitions if this option isn't activated. Since linux kernel 2.5 these statistics are in /proc/diskstats.

    Further it is necessary to run it as a user with the authorization to read the /proc filesystem.

    DELTAS

    The options CpuStats, ProcStats, PgSwStats, NetStats, DiskStats and Processes are deltas, for this reason it's necessary to initialize the statistics first, before the data be generated with get(). The statistics can be initialized with the methods new(), set() and init(). Each option that is set to TRUE (1) will be initialized by the call of new() or set(). The call of init() reinitialize all statistics that are set to 1. By the call of get() the initial statistics will be updated automatically. Please refer the METHOD section to get more information about the calls of new(), set() and get().

    Another exigence is that you need to sleep for while - at least for one second - before you call get() if you want to get useful statistics. The options SysInfo, MemStats, SockStats, DiskUsage, LoadAVG and FileStats are no deltas. If you need only one of this informations you don't need to sleep before the call of get().

    The get() function collects all requested informations and returns a hash reference with the statistics. The inital statistics will be updated. You can turn on and off options with set()

    Product's homepage

    Requirements:

    · Perl

    What's New in This Release: [ read full changelog ]

    · Added key "arch" to SysInfo.pm.

      


    TAGS:

    collect statistics | system statistics | Perl module | module | collect | system



    HTML code for linking to this page:


    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM