IBM::StorageSystem::StatisticsSet - Utility class for handling groups of IBM::StorageSystem statistics objects
IBM::StorageSystem::StatisticsSet is utility class for handling groups of IBM::StorageSystem statistics objects
Note that you should not need to create a IBM::StorageSystem::StatisticsSet object manually under normal conditions, rather one will be created automatically for you on invocation to otrher method in <IBM::StorageSystem> packages.
IBM::StorageSystem::StatisticsSet provides some basic utility functions for manipulating and working with sets of statistics objects.
A StatisticsSet object is an nothing more than an array of homogenous statistics objects with the ability to perform some basic operations. The StatisticsSet is necessary to performing higher level functions and adding syntactical sugar.
Methods that return IBM::StorageSystem::StatisticsSet objects accept a single optional parameter; the interval period name - one of minute, hour, day, week, month, quarter or year. If you do not specify this parameter then the default value of minute will be used.
my @statistics_set = $node->cpu('minute') my @statistics_set = $node->cpu;
Returns the number of results in the statistics set.
Returns the attributes of the objects in the set - as all objects in a set are homogenous, the attributes returned are valid for all members of the set.
# Get the minimum monthly average memory value for the first node in our cluster my $min_monthly_avg_memory = $ibm->nodes->memory('month')->min('avg_memory')->avg_memory; # In detail: # On the first node # | Get the memory stats # | | For the year # | | | Get the maximum value # | | | | Of this variable # | | | | | And display it # V V V V V V # $ibm->$nodes->memory('year')->min('avg_memory')->avg_memory # Get a list of all memory statistics for the previous day sorted by ascending # value of average swap free memory my @vals = $ibm->nodes->memory->('day')->avg_swap_free_memmory;
In scalar context, this method returns the object having the minimum recorded value for the specified attribute parameter, where the parameter is a valid attribute name for the specified object type (i.e. the attribute parameter exists in the array returned by the values method).
In list context, this method returns a list of objects of the specified statistic type sorted by the attribute parameter.
This method is the logical complement of the min method - the method returns either a scalar or list as per the min method but sorted via maximum value. Function
<ltp at cpan.org>
Please report any bugs or feature requests to
bug-ibm-v7000-statisticsset at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=IBM-StorageSystem-StatisticsSet. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
You can also look for information at:
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.