Black Box LES1208A-R2, LES1332A Powerman --on foo0,4-5, Pmpower tool, Adding new RPC devices

Models: LES1116A LES110BA LES1308A LES1348A LES144BA Value-Line and Advanced Console Servers LES114BA LES1432A LES1332A LES1316A LES1416A LES1208A-R2 LES1132A LES1216A-R2 LES1232A LES1248A-R2 LES1408A

1 286
Download 286 pages 6.23 Kb
Page 264
Image 264

should not be confused with regular expression character classes (also denoted by ''[]''). For example, foo[19] does not represent foo1 or foo9, but rather represents a degenerate range: foo19.

This range syntax is meant only as a convenience on clusters with a prefix NN naming convention and specification of ranges should not be considered necessary—the list foo1,foo9 could be specified as such, or by the range foo[1,9].

Some examples of powerman targets follows.

Power on hosts bar,baz,foo01,foo02,...,foo05: powerman --on bar baz foo[01-05]

Power on hosts bar,foo7,foo9,foo10: powerman --onbar,foo[7,9-10]

Power on foo0,foo4,foo5: powerman --onfoo[0,4-5]

As a reminder to the reader, some shells will interpret brackets ([ and ]) for pattern matching. Depending on your shell, you might need to enclose ranged lists within quotes. For example, in tcsh, the last example above should be executed as:

powerman --on "foo[0,4-5]"

15.9.2 The pmpower tool

The pmpower utility is a high level tool for manipulating remote preconfigured power devices connected to the console server either via a serial or network connection. The PDU UPS and IPMI power devices are variously controlled using the open source PowerMan, IPMItool or Network UPS Tools and Black Box’s pmpower utility arches over these tools so the devices can be controlled through one command line:

pmpower [-?h] [-l device -r host] [-o outlet] [-u username] [-p password] action

-?/-hThis help message. -lThe serial port to use.

-oThe outlet on the power target to apply to

-rThe remote host address for the power target -uOverride the configured username

-pOverride the configured password

on This action switches the specified device or outlet(s) on off This action switches the specified device or outlet(s) off

cycle This action switches the specified device or outlet(s) off and on again status This action retrieves the current status of the device or outlet

Examples:

To turn outlet 4 of the power device connected to serial port 2 on: # pmpower -l port02 -o 4 on

To turn an IPMI device off located at IP address 192.168.1.100 (where username is 'root' and password is 'calvin': # pmpower -r 192.168.1.100 -u root -p calvin off

Default system Power Device actions are specified in /etc/powerstrips.xml. Custom Power Devices can be added in /etc/config/powerstrips.xml. If an action is attempted which has not been configured for a specific Power Device, pmpower will exit with an error.

15.9.3 Adding new RPC devices

There are a number of simple paths to adding support for new RPC devices.

_____________________________________________________________________

724-746-5500 blackbox.com

Page 264

Page 264
Image 264
Black Box LES1208A-R2, LES1332A, LES1408A, LES144BA, LES1416A Powerman --on foo0,4-5, Pmpower tool, Adding new RPC devices