AIX::Perfstat - Perl wrapper for perfstat() functions.
perfstat()
use AIX::Perfstat;
$cput = AIX::Perfstat::cpu_total();
$diskt = AIX::Perfstat::disk_total();
$netift = AIX::Perfstat::netinterface_total();
$memoryt = AIX::Perfstat::memory_total();
$num_cpus = AIX::Perfstat::cpu_count();
$num_disks = AIX::Perfstat::disk_count();
$num_netifs = AIX::Perfstat::netinterface_count();
$cpu_data = AIX::Perfstat::cpu(desired_number = 1, name = "");
$disk_data = AIX::Perfstat::disk(desired_number = 1, name = "");
$netif_data = AIX::Perfstat::netinterface(desired_number = 1, name = "");
This Perl module lets you call all of the perfstat functions defined on AIX 5.1 and returns system data in Perl data structures.
The AIX::Perfstat::cpu_total, AIX::Perfstat::disk_total, AIX::Perfstat::netinterface_total, and AIX::Perfstat::memory_total functions each return a hashref containing all of the respective C structures.
AIX::Perfstat::cpu_total
AIX::Perfstat::disk_total
AIX::Perfstat::netinterface_total
AIX::Perfstat::memory_total
The AIX::Perfstat::cpu_count, AIX::Perfstat::disk_count, and AIX::Perfstat::netinterface_count functions each return a count of how many structures are available from the AIX::Perfstat::cpu, AIX::Perfstat::disk, and AIX::Perfstat::netinterface functions respectively.
AIX::Perfstat::cpu_count
AIX::Perfstat::disk_count
AIX::Perfstat::netinterface_count
AIX::Perfstat::cpu
AIX::Perfstat::disk
AIX::Perfstat::netinterface
The AIX::Perfstat::cpu, AIX::Perfstat::disk, and AIX::Perfstat::netinterface functions each take up to two arguments and return a reference to an array of hashes. The arguments specify the number of records to return, and the name of the record to start with. These arguments are equivalent to the desired_number and name parameters to the perfstat functions. Only valid data is returned (Example: If you call AIX::Perfstat::netinterface(5) on a machine with only 2 network interfaces, the returned array will only contain two entries.) When these functions are called with a variable for the name parameter the variable will be modified in place to contain the name of the next available record, or "" if no more records are available.
desired_number
name
perfstat
AIX::Perfstat::netinterface(5)
None by default.
/usr/include/libperfstat.h
Richard Holden, <aciddeath@cpan.org>
Copyright (C) 2006 by Richard Holden
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install AIX::Perfstat, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AIX::Perfstat
CPAN shell
perl -MCPAN -e shell install AIX::Perfstat
For more information on module installation, please visit the detailed CPAN module installation guide.