Cisco::UCS::Common::PSU - Class for operations with a Cisco UCS PSU.
foreach my $psu (sort $ucs->chassis(1)->get_psus) { print 'PSU ' . $psu->id . ' voltage: ' . $psu->voltage . "\n" } # PSU 1 voltage: ok # PSU 2 voltage: ok # PSU 3 voltage: ok # PSU 4 voltage: ok # Print the output power of all chassis, and the output of # each PSU in each chassis map { printf( "Chassis: %d - Output power: %.3f\n", $_->id, $_->stats->output_power ); map { printf( "\tPSU: %d - Ouput power: %s\n", $_->id, $_->stats->output_power ) } sort { $a->id <=> $b->id } $_->get_psus } sort { $a->id <=> $b->id } $ucs->get_chassiss; # Should yeild something similar to: # # Chassis: 1 - Output power: 660.000 # PSU: 1 - Ouput power: 144.096008 # PSU: 2 - Ouput power: 178.934998 # PSU: 3 - Ouput power: 167.005997 # PSU: 4 - Ouput power: 168.112000 # Chassis: 2 - Output power: 1188.000 # PSU: 1 - Ouput power: 229.653000 # PSU: 2 - Ouput power: 300.200012 # PSU: 3 - Ouput power: 288.192017 # PSU: 4 - Ouput power: 374.696991 # ... etc.
Cisco::UCS::Common::PSU::Stats is a class providing common operations with Cisco UCS PSU power and environmental statistics.
Note that you are not supposed to call the constructor yourself, rather a Cisco::UCS::Common::PSU::Stats object is created for you automatically by the stats() method call in Cisco::UCS::Chassis::PSU.
Luke Poskitt, <ltp at cpan.org>
<ltp at cpan.org>
Some methods may return undefined, empty or not yet implemented values. This is dependent on the software and firmware revision level of UCSM and components of the UCS cluster. This is not a bug but is a limitation of UCSM.
Please report any bugs or feature requests to bug-cisco-ucs-common-psu-stats at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Cisco-UCS-Common-PSU-Stats. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-cisco-ucs-common-psu-stats at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Cisco::UCS::Common::PSU::Stats
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Cisco-UCS-Common-PSU-Stats
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Cisco-UCS-Common-PSU-Stats
CPAN Ratings
http://cpanratings.perl.org/d/Cisco-UCS-Common-PSU-Stats
Search CPAN
http://search.cpan.org/dist/Cisco-UCS-Common-PSU-Stats/
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.
To install Cisco::UCS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Cisco::UCS
CPAN shell
perl -MCPAN -e shell install Cisco::UCS
For more information on module installation, please visit the detailed CPAN module installation guide.