[solved] Plotting HP iLO Power Meter Readings

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
benzo
Posts: 14
Joined: Wed Aug 13, 2008 6:58 am

[solved] Plotting HP iLO Power Meter Readings

Post by benzo »

Hi,

Recent HP ProLiant servers with iLO (integrated lights-out) devices show graphs of power consumption along with current and historic readings of power consumption. Has anyone figured out how to plot this data with Cacti? As far as I can tell it's not exposed via SNMP, and I'm stumped.

Cheers,

Ben.
Attachments
Screenshot of iLO Power Meter
Screenshot of iLO Power Meter
hp_power_meter.jpg (59.92 KiB) Viewed 11255 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

If you can write a script to pull the information, then cacti will be able to graph it.
benzo
Posts: 14
Joined: Wed Aug 13, 2008 6:58 am

Post by benzo »

BSOD2600 wrote:If you can write a script to pull the information, then cacti will be able to graph it.
Yes, that much I know. Cacti scripting isn't my problem - I've written a few scripts for Cacti. What I'm looking for is some information from someone who might know how to access this data with a script or command line tool.

Ben.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

HP Systems Insight Manager collects all that data happily, and this page talks about sending SNMP traps... that suggests that you can probably access this info via SNMP with the latest HP SNMP agent installed in the host OS. I think it's the SIM CD that has all the MIBs on it for HP bits and pieces.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
benzo
Posts: 14
Joined: Wed Aug 13, 2008 6:58 am

Post by benzo »

Howie wrote:HP Systems Insight Manager collects all that data happily, and this page talks about sending SNMP traps... that suggests that you can probably access this info via SNMP with the latest HP SNMP agent installed in the host OS. I think it's the SIM CD that has all the MIBs on it for HP bits and pieces.
Yes, I thought that too, but we're running the latest agents, and a complete walk of the HP SNMP tree does not expose this data, so my conclusion is that it is *not* in the latest HP SNMP agents.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Some devices don't implement all of the snmp commands. Try a snmpget. Does the HP MIB file(s) state this information is available?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

What about cpqHePowerMeter (1.3.6.1.4.1.232.6.2.15) or cpqPower (1.3.6.1.4.1.232.165) http://h10018.www1.hp.com/wwsolutions/m ... leMIBs.pdf
benzo
Posts: 14
Joined: Wed Aug 13, 2008 6:58 am

Post by benzo »

BSOD2600 wrote:What about cpqHePowerMeter (1.3.6.1.4.1.232.6.2.15) or cpqPower (1.3.6.1.4.1.232.165) http://h10018.www1.hp.com/wwsolutions/m ... leMIBs.pdf
cpqHePowerMeter is exactly what I was looking for. It turns out that the system I snmpwalked didn't have the right HP agents, but another couple of systems do. For cpqHePowerMeter to work you also need the latest iLO firmware (v1.79), and the latest Power Meter firmware (v3.4C), as well as the latest HP management agents.

As an aside, I found some example HP tools and scripts which can used to query the iLO via a command line, and can return this data without needing the SNMP agents. The downside is that it is much slower than SNMP (it takes about 10 seconds to return data).

Thanks,

Ben.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Personally, I'd go with the snmp solution since its much faster/reliable than launching another application/script which takes 10 seconds. While that works for a few servers, it won't scale well to 100+ servers.
benzo
Posts: 14
Joined: Wed Aug 13, 2008 6:58 am

Post by benzo »

BSOD2600 wrote:Personally, I'd go with the snmp solution since its much faster/reliable than launching another application/script which takes 10 seconds. While that works for a few servers, it won't scale well to 100+ servers.
Yeah, I know. SNMP is my first choice, but at the moment it only seems to work for the Windows machines I need to monitor. For the servers running VMware and RHEL I have no choice but to use the script. Hopefully that will improve as HP release new versions of the management agents for VMware and Linux. Fortunately the number of non-Windows machines which I need to monitor is quite low.

Ben.
Jesper
Posts: 45
Joined: Mon Mar 11, 2002 7:00 pm

Post by Jesper »

benzo wrote:cpqHePowerMeter is exactly what I was looking for.
I did a walk of this on a few new HP servers with Windows and latest HP Support Pack and compared cpqHePowerMeterCurrReading[1] with iLO Powermeter. Values didn't match on any of the systems. SNMP reported much higher values than via iLO.. Do you see the same?

[1]
cpqHePowerMeter 1.3.6.1.4.1.232.6.2.15
--cpqHePowerMeterSupport 1.3.6.1.4.1.232.6.2.15.1
--cpqHePowerMeterStatus 1.3.6.1.4.1.232.6.2.15.2
-- cpqHePowerMeterCurrReading 1.3.6.1.4.1.232.6.2.15.3
-- cpqHePowerMeterPrevReading 1.3.6.1.4.1.232.6.2.15.4

--
/Jesper
aleu
Cacti User
Posts: 216
Joined: Mon Dec 11, 2006 10:17 am

Post by aleu »

benzo wrote:As an aside, I found some example HP tools and scripts which can used to query the iLO via a command line, and can return this data without needing the SNMP agents. The downside is that it is much slower than SNMP (it takes about 10 seconds to return data).
Do you mind posting these scipts or link to pages where they can be found?

Thanks,
ALeu
benzo
Posts: 14
Joined: Wed Aug 13, 2008 6:58 am

Post by benzo »

Jesper wrote:I did a walk of this on a few new HP servers with Windows and latest HP Support Pack and compared cpqHePowerMeterCurrReading[1] with iLO Powermeter. Values didn't match on any of the systems. SNMP reported much higher values than via iLO.. Do you see the same?
I see the same values via SNMP and iLO. I remember reading that the first versions of the power management controller firmware were a bit buggy and upgrading it can help. You can find v3.4c for the DL380 G5 here:
http://h20000.www2.hp.com/bizsupport/Te ... Id=3896111
benzo
Posts: 14
Joined: Wed Aug 13, 2008 6:58 am

Post by benzo »

aleu wrote:Do you mind posting these scipts or link to pages where they can be found?

Thanks,
ALeu
Not at all. This is what I did:
* Download the HP Lights-Out XML PERL Scripting Sample for Linux
* Copy locfg.pl and Get_Power_Readings.xml to the Cacti scripts directory
* Create a new user on the iLO board for querying (I used the username guest)
* Use this script to query the iLO board (it takes the name or IP of the iLO as a paramter):

get_ilo_power_readings.pl

Code: Select all

#! /usr/local/bin/perl

$command = "/usr/local/bin/perl /var/www/cacti/scripts/locfg.pl -s $ARGV[0] -f /var/www/cacti/scripts/Get_Power_Readings.xml -u guest -p [password]";
$output = `$command`;

@lines = split(/\n/,$output);

foreach $line(@lines) {
        if (substr($line,0,22) eq "<PRESENT_POWER_READING") {
                @vals = split('"', $line);
                $presentreading = @vals[1]
        }
}
print "presentreading:$presentreading";

I'm sure the script could be improved, but it does what I need it to do.

Cheers,

Ben.
aleu
Cacti User
Posts: 216
Joined: Mon Dec 11, 2006 10:17 am

Post by aleu »

benzo wrote:
aleu wrote:Do you mind posting these scipts or link to pages where they can be found?

Thanks,
ALeu
Not at all. This is what I did...
Thanks a lot!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest