Luke Poskitt > Cisco-UCS-0.33 > Cisco::UCS::Common::EnvironmentalStats

Download:
Cisco-UCS-0.33.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  1
View/Report Bugs
Module Version: 0.01   Source  

NAME ^

Cisco::UCS::Common::EnvironmentalStats - Class for operations with Cisco UCS environmental stati.

SYNOPSIS ^

        # Print all blades in all chassis along with a cacti-style listing of the
        # blades current, maximum and average CPU temperature values.

        map { 
                print "Chassis: " . $_->id ."\n";
                map { 
                        print "\tBlade: ". $_->id;
                        map {
                                print "\n\t\tCPU: ". $_->id 
                                . "\n\t\t\tCurrent:". $_->env_stats->temperature
                                . "\n\t\t\tMax:". $_->env_stats->temperature_max 
                                . "\n\t\t\tAvg:". $_->env_stats->temperature_avg ."\n" 

                        }   
                        sort { $a->id <=> $b->id } $_->get_cpus
                }   
                sort { $a->id <=> $b->id } $_->get_blades 
        } 
        sort { 
                $a->id <=> $b->id 
        } $ucs->get_chassiss;

        # Prints something like:
        #
        # Chassis: 1
        #       Blade: 1
        #               CPU: 1
        #                       Current:32.500000
        #                       Max:33.000000
        #                       Avg:32.375000
        #
        #               CPU: 2
        #                       Current:37.000000
        #                       Max:37.000000
        #                       Avg:32.500000
        #       Blade: 2
        #               CPU: 1
        #                       Current:45.500000
        #                       Max:46.000000
        #                       Avg:45.666668
        # ...etc.

DECRIPTION ^

Cisco::UCS::Common::EnvironmentalStats is a class providing operations with Cisco UCS environmental stati.

Note that you are not supposed to call the constructor yourself, rather a Cisco::UCS::Common::EnvironmentalStats object is created automatically by method calls on a Cisco::UCS::Blade object.

METHODS ^

input_current

Returns the current input current value for the target object.

input_current_avg

Returns the current average input current value for the target object.

input_current_min

Returns the current minimum input current value for the target object.

input_current_max

Returns the current maximum input current value for the target object.

temperature

Returns the current temperature value for the target object.

temperature_avg

Returns the average temperature value for the target object.

temperature_max

Returns the maximum temperature value for the target object.

temperature_min

Returns the minimum temperature value for the target object.

thresholded

Flag to indicate if the environmental status is in a thresholded state.

suspect

Flag to indicate if the environmental status is in a suspect state.

time_collected

Returns the timestamp at which time the status information were collected.

AUTHOR ^

Luke Poskitt, <ltp at cpan.org>

BUGS ^

Please report any bugs or feature requests to bug-cisco-ucs-common-environmentalstats at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Cisco-UCS-Common-EnvironmentalStats. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc Cisco::UCS::Common::EnvironmentalStats

You can also look for information at:

ACKNOWLEDGEMENTS ^

LICENSE AND COPYRIGHT ^

Copyright 2013 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.

syntax highlighting: