IBM::StorageSystem::Statistic - Class for operations with IBM StorageSystem system statistics
Version 0.01
use IBM::StorageSystem; my $ibm = IBM::StorageSystem->new( user => 'admin', host => 'my-v7000', key_path => '/path/to/my/.ssh/private_key' ) or die "Couldn't create object! $!\n"; # Print the current system FC IOPS print $ibm->fc_io->current; # Print the peak system FC IOPS print $ibm->fc_io->peak; # Refresh the FC IOPS statistics and print the new current value $ibm->fc_io->refresh; print $ibm->fc_io->current; # Or, alternately print $ibm->fc_io->refresh->current; # Retrieve the historical statistics for CPU usage and print # them along with the recorded epoch time foreach my $v ( $ibm->fc_io->history ) { print "$v->{time} : $v->{value}\n" } # e.g. # 130110140921 : 100 # 130110140916 : 100 # 130110140911 : 92 # 130110140906 : 90 # 130110140901 : 100 # 130110140856 : 100 # 130110140851 : 92 # ... etc.
Returns the statistic name - this is the same name as the method invocant.
Returns the epoch value for the samle period in which the statistic was measured.
Returns the current statistic value. Please refer to the lssystemstat manual page for detailed information on possible return values.
Returns the peak statistic value for the current measurement time period.
Returns the time at which the peak statistic value for the current measurement period was recorded.
Please see the NOTES section below regarding the time format used and conversion methods.
Returns the epoch time at which the peak statistic value for the current measurement period was recorded.
Refreshes the statistic values.
Returns an array of historical values for the statistics where each array member is an anonymous hash with two keys; time - the sample time at which measurement was recorded, and value - the value recorded.
The values returned by the peak_time method, and the hash value of 'time' for each member in the array returned by the history method are 'epoch' values returned by the CLI, however these are not true epoch values in a Unix sense.
Because of this, it is not possible to pass these values to localtime for conversion without manipulation and obtain correct dates. The easiest way in which to correct the epoch times is to subtract the difference between the values of peak_time and peak_epoch from each historical epoch time. i.e.
$t = $ibm->fc_io->peak_time - $ibm->fc_io->peak_epoch; # Using the example from the SYNOPSIS section above, output with Unix epoch timestamps foreach my $v ( $ibm->fc_io->history ) { print ( $v->{time} - $t ) . ": $v->{value}\n" # Or with human-readable times # print ~~ localtime ( $v->{time} - $t ) . ": $v->{value}\n" }
Luke Poskitt, <ltp at cpan.org>
<ltp at cpan.org>
Please report any bugs or feature requests to bug-ibm-v7000-quota at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=IBM-StorageSystem-Statistic. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-ibm-v7000-quota at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc IBM::StorageSystem::Statistic
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=IBM-StorageSystem-Statistic
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/IBM-StorageSystem-Statistic
CPAN Ratings
http://cpanratings.perl.org/d/IBM-StorageSystem-Statistic
Search CPAN
http://search.cpan.org/dist/IBM-StorageSystem-Statistic/
Copyright 2012 Luke Poskitt.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install IBM::StorageSystem, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IBM::StorageSystem
CPAN shell
perl -MCPAN -e shell install IBM::StorageSystem
For more information on module installation, please visit the detailed CPAN module installation guide.