Sys::Statistics::Linux

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

Sys::Statistics::Linux Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Jonny Schulz
  • Publisher web site:
  • http://search.cpan.org/~bloonix/Sys-Statistics-Linux-0.36/lib/Sys/Statistics/Linux.pm

Sys::Statistics::Linux Tags


Sys::Statistics::Linux Description

Sys::Statistics::Linux is 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 NOTEThis 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.DELTASThe 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() Requirements: · Perl


Sys::Statistics::Linux Related Software