Polski

We have already written about the capabilities of HP Advanced Power Manager. However, we would like to show an example of practical use of HP APM for monitoring of a cluster, and, more specifically, the power consumption by the cluster. The idea of an application based on APM is a Web page with a cluster map and a diagram of racks.

How to use data from HP APM?
APOLLO_WEB_VIEW

HP APM enables the connection via SSH. If it has not been enabled at the initial configuration, connect with the console cable and turn on SSH by using the command:

enable ssh

We can use the expect package, which we used in the following example script in order to connect with APM and download the code:

#!/usr/bin/env python
import pexpect

child = pexpect.spawn('ssh Administrator@10.10.10.120')
child.expect('Password: ')
child.sendline('password')
child.expect ('\w+> ')
child.sendline('show rack 1 6')
child.expect ('\w+> ')
print child.before

We can retrieve information about power consumption of each enclosure or server by using the method shown. This information can be used to present data on a Web page, as shown in the figure. This will help us identify the operating and failed servers.