ipmipower

Langue: en

Version: 2009-02-26 (CentOS - 06/07/09)

Section: 8 (Commandes administrateur)

NAME

ipmipower - IPMI power control utility

SYNOPSIS

ipmipower [OPTIONS]

DESCRIPTION

ipmipower allows users to remotely power on, off, cycle, hard reset, get a power status query, perform a pulse diagnostic interrupt, or initiate a soft-shutdown of the OS via ACPI through the IPMI over LAN protocol. See IPMI over LAN below for more information on IPMI.

When a power command (--on, --off, --cycle, --reset, --stat, --pulse, or --soft) is specified on the command line, ipmipower will attempt to run the power command on all hostnames listed on the command line then exit.

If no power commands are specified on the command line, ipmipower will run in interactive mode. Interactive mode gives the user a command line interface to enter various commands. Details of the interactive command line interface can be found below under INTERACTIVE COMMANDS.

See EXAMPLES below for examples of how ipmipower is commonly used.

BASIC OPTIONS

The following options are the most common options used with ipmipower.
-h, --hostname=IPMIHOST1,IPMIHOST2,...
Specify the remote host(s) to communicate with. Multiple hostnames may be separated by comma or may be specified in a range format; see HOSTRANGED SUPPORT below.
-u, --username=USERNAME
Specify the username to use when authenticating with the remote host. If not specified, a null (i.e. anonymous) username is assumed. The user must have atleast OPERATOR or ADMINISTRATOR privileges to run the --on, --off, --reset, --cycle, --pulse, or --soft power control commands. The user must have atleast USER privileges to determine the power status of the machine through --stat.
-p, --password=PASSWORD
Specify the password to use when authenticationg with the remote host. If not specified, a null password is assumed. Maximum password length is 16 for IPMI 1.5 and 20 for IPMI 2.0.
-P, --password-prompt
Prompt for password to avoid possibility of listing it in process lists.
-k, --k-g=K_G
Specify the K_g BMC key to use when authenticating with the remote host for IPMI 2.0. If not specified, a null key is assumed. To input the key in hexadecimal form, prefix the string with '0x'. E.g., the key 'abc' can be entered with the either the string 'abc' or the string '0x616263'
-K, --k-g-prompt
Prompt for k-g to avoid possibility of listing it in process lists.
-n, --on
Power on the target hosts.
-f, --off
Power off the target hosts.
-c, --cycle
Power cycle the target hosts.
-r, --reset
Reset the target hosts.
-s, --stat
Get power status of the target hosts.
-j, --pulse
Send power diagnostic interrupt to target hosts.
-m, --soft
Initiate a soft-shutdown of the OS via ACPI.
-H, --help
Output help menu and exit.
-V, --version
Output version and exit.

ADVANCED OPTIONS

The following advanced options are used to change the default behavior of ipmipower.
-a, --authentication-type=AUTHENTICATION-TYPE
Specify the IPMI 1.5 authentication type to use. The currently available authentication types are AUTO, NONE, STRAIGHT_PASSWORD_KEY, MD2, and MD5. Defaults to AUTO to automatically select the most secure authentication mechanism available.
-l, --privilege-level=PRIVILEGE-LEVEL
Specify the privilege level to be used. The currently available privilege levels are AUTO, USER, OPERATOR, and ADMIN. Defaults to AUTO to automatically select the minimal privilege required for the power control operation selected.
-R, --ipmi-version=IPMIVERSION
Specify the IPMI protocol version to use. Set the IPMI protocol version to use. The currently available versions are AUTO, 1.5, and 2.0. Defaults to AUTO to automatically select a suitable protocol version.
-I, --cipher-suite-id=CIPHER-SUITE-ID
Specify the IPMI 2.0 cipher suite ID to use. The Cipher Suite ID identifies a set of authentication, integrity, and confidentiality algorithms to use for IPMI 2.0 communication. The authentication algorithm identifies the algorithm to use for session setup, the integrity algorithm identifies the algorithm to use for session packet signatures, and the confidentiality algorithm identifies the algorithm to use for payload encryption. Defaults to cipher suite ID AUTO to automatically select the most secure cipher suite ID available. The following cipher suite IDs are currently supported:

AUTO - Select the most secure cipher suite available from the remote machine

0 - Authentication Algorithm = None; Integrity Algorithm = None; Confidentiality Algorithm = None

1 - Authentication Algorithm = HMAC-SHA1; Integrity Algorithm = None; Confidentiality Algorithm = None

2 - Authentication Algorithm = HMAC-SHA1; Integrity Algorithm = HMAC-SHA1-96; Confidentiality Algorithm = None

3 - Authentication Algorithm = HMAC-SHA1; Integrity Algorithm = HMAC-SHA1-96; Confidentiality Algorithm = AES-CBC-128 ." .sp ." 4 - Authentication Algorithm = HMAC-SHA1; Integrity Algorithm = HMAC-SHA1-96; Confidentiality Algorithm = xRC4-128 ." .sp ." 5 - Authentication Algorithm = HMAC-SHA1; Integrity Algorithm = HMAC-SHA1-96; Confidentiality Algorithm = xRC4-40

6 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = None; Confidentiality Algorithm = None

7 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = HMAC-MD5-128; Confidentiality Algorithm = None

8 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = HMAC-MD5-128; Confidentiality Algorithm = AES-CBC-128 ." .sp ." 9 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = HMAC-MD5-128; Confidentiality Algorithm = xRC4-128 ." .sp ." 10 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = HMAC-MD5-128; Confidentiality Algorithm = xRC4-40

11 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = MD5-128; Confidentiality Algorithm = None

12 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = MD5-128; Confidentiality Algorithm = AES-CBC-128 ." .sp ." 13 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = MD5-128; Confidentiality Algorithm = xRC4-128 ." .sp ." 14 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = MD5-128; Confidentiality Algorithm = xRC4-40

-g, --on-if-off
The IPMI specification does not require the power cycle or hard reset commands to turn on a machine that is currently powered off. This option will force ipmipower to issue a power on command instead of a power cycle or hard reset command if the remote machine's power is currently off.
-A, --wait-until-on
The IPMI specification allows power on commands to return prior to the power on actually taking place. This option will force ipmipower to regularly query the remote BMC and return only after the machine has powered on.
-B, --wait-until-off
The IPMI specification allows power off commands to return prior the power off actually taking place. This option will force ipmipower to regularly query the remote BMC and return only after the machine has powered off.
-C, --consolidate-output
Consolidate hostranged output. The complete standard output from every node specified will be consolidated so that nodes with identical output are not output twice. A header will list those nodes with the consolidated output. When this option is specified, no output can be seen until the IPMI operations to all nodes has completed. If the user breaks out of the program early, all currently consolidated output will be dumped. See HOSTRANGED SUPPORT below for additional information.
-E, --eliminate
Eliminate hosts determined as undetected by ipmidetect. This attempts to remove the common issue of hostranged execution timing out due to several nodes being removed from service in a large cluster. The ipmidetectd daemon must be running on the node executing the command. See HOSTRANGED SUPPORT below for additional information.
-W, --workaround-flags=WORKAROUNDS
Specify workarounds to vendor compliance issues. Multiple workarounds can be specified separated by commas. See WORKAROUNDS below for a list of available workarounds.
--debug
Turn on debugging output.

NETWORK OPTIONS

The following options are used to change the behavior of ipmipower's network behavior.
-t, --session-timeout=MILLISECONDS
Specify the session timeout length in milliseconds. The session timeout value is used to determine when to give up on a power control command. Defaults to 20000 milliseconds (20 seconds).
-y, --retransmission-timeout=MILLISECONDS
Specify the retransmission timeout length in milliseconds. The retransmission timeout value is used to determine when to retransmit a packet with the series of packets IPMI over LAN must transmit. Defaults to 400 milliseconds (0.4 seconds). The value must be length than the session timeout. Packet retransmissions can be disabled by setting this value to 0. Note how this option differs from the session timeout specified above. The session timeout refers to the entire amount of time the IPMI protocol has to complete a power control operation. The retransmission timeout refers to an individual packet within the IPMI protocol.
-q, --retransmission-wait-timeout=MILLISECONDS
Specify the retransmission wait timeout length in milliseconds. The retransmission wait timeout is similar to the retransmission timeout above, but is used specifically for power completion verification with the --wait-until-on and --wait-until-off options.
-b, --retransmission-backoff-count=COUNT
Specify the retransmission backoff count for retransmissions. After ever COUNT retransmissions, the retransmission timeout length will be increased by another factor. Defaults to 8. Backoff count calculations can be disabled by setting this value to 0.
-i, --ping-interval=MILLISECONDS
Specify the ping interval length in milliseconds. When running in interactive mode, RMCP (Remote Management Control Protocol) discovery messages will be sent to all configured remote hosts every MILLISECONDS to confirm their support of IPMI. Power commands cannot be sent to a host until it is discovered (or re-discovered if previously lost). Defaults to 5000 milliseconds (5 seconds). Ping discovery messages can be disabled by setting this valu to 0. RMCP ping discovery messages are automatically disabled in non-interactive mode.
-z, --ping-timeout=MILLISECONDS
Specify the ping timeout length in milliseconds. When running in interactive mode, RMCP (Remote Management Control Protocol) messages discovery will be sent to all configured remote hosts to confirm their support of IPMI. A remote host is considered undiscovered if the host does not respond in MILLISECONDS time. Defaults to 30000 milliseconds (30 seconds). This value must be less than the ping timeout interval described above.
-v, --ping-packet-count=COUNT
Specify the ping packet count size. Defaults to 10. See the --ping-percent-fR option below for more information on this option.
-w, --ping-percent=PERCENT
Specify the ping percent value. Defaults to 50. Since IPMI is based on UDP, it is difficult for ipmipower to distinguish between a missing machine and a bad (or heavily loaded) network connection in interactive mode. when running in interactive mode. For example, suppose a link consistently drops 80% of the packets to a particular machine. The power control operation may have difficulty completing, although a recent pong response from RMCP makes ipmipower believe the machine is up and functioning properly. The ping packet acount and percent options are used to alleviate this problem. Ipmipower will monitor RMCP ping packets in packet count chunks. If ipmipower does not receive a response to greater than ping percentof those packets, ipmipower will assume the link to this node is bad and will not send power control operations to that node until the connection is determined to be reliable. This heuristic can be disabled by setting either the ping packet count or ping percent to 0. This feature is not used if ping interval is set to 0.
-x, --ping-consec-count=COUNT
Specify the ping consecutive count. This is another heuristic used to determine if a node should be considered discovered, undiscovered, or with a bad connection. If a valid RMCP pong response was received for the last COUNT ping packets, a node will be considered discovered, regardless of other heuristics listed above. Defaults to 5. This heuristic can be disabled by setting this value to 0. This feature is not used if other ping features described above are disabled.

INTERACTIVE COMMANDS

ipmipower provides the following interactive commands at the ipmipower> prompt. Before any power commands (on, off, cycle, reset, stat, pulse, or soft) can be used, hostnames must be configured into ipmipower, either through the command prompt or the hostname command below. The parameters and options to the commands below mirror their appropriate command line options.
hostname [IPMIHOST(s)]
Specify a new set of hosts. No input to unconfigure all hosts.
username [USERNAME]
Specify a new username. No input for null username.
password [PASSWORD]
Specify a new password. No input for null password.
k_g [K_G]
Specify a new K_g BMC Key. No input for null key. Prefix with '0x' to enter a key in hexadecimal
on [IPMIHOST(s)]
Turn on all configured hosts or specified hosts.
off [IPMIHOST(s)]
Turn off all configured hosts or specified hosts.
cycle [IPMIHOST(s)]
Power cycle all configured hosts or specified hosts.
reset [IPMIHOST(s)]
Reset all configured hosts or specified hosts.
stat [IPMIHOST(s)]
Query power status for all configured hosts or specified hosts.
pulse [IPMIHOST(s)]
Pulse diagnostic interrupt all configured hosts or specified hosts.
soft [IPMIHOST(s)]
Initiate a soft-shutdown for all configured hosts or specified hosts.
help
Output help menu.
advanced
Output advanced help menu.
network
Output network help menu.
quit
Quit program. ipmipower.
authentication-type AUTHENTICATION-TYPE
Specify the authentication type to use.
privilege-level PRIVILEGE-LEVEL
Specify the privilege level to use.
ipmi-version IPMIVERSION
Specify the ipmi version to use.
cipher-suite-id CIPHER-SUITE-ID
Specify the cipher suite id to use.
on-if-off [on|off]
Toggle on-if-off functionality.
wait-until-on [on|off]
Toggle wait-until-on functionality.
wait-until-off [on|off]
Toggle wait-until-off functionality.
consolidate-output [on|off]
Toggle consolidate-output functionality
workaround-flags WORKAROUNDS
Specify workaround flags.
config
Output the current configuration.
session-timeout MILLISECONDS
Specify a new session timeout length.
retransmission-timeout MILLISECONDS
Specify a new retransmiision timeout length.
retransmission-wait-timeout MILLISECONDS
Specify a new retransmission wait timeout length.
retransmission-backoff-count COUNT
Specify a new retransmission backoff count.
ping-interval MILLISECONDS
Specify a new ping interval length.
ping-timeout MILLISECONDS
Specify a new ping timeout length.
ping-packet-count COUNT
Specify a new ping packet count.
ping-percent PERCENT
Specify a new ping percent.
ping-consec-count COUNT
Specify a new ping consec count.

HOSTRANGED SUPPORT

The host input specified by the user can accept multiple hosts for parallel out of band communication and output. Multiple hosts can be input either as an explicit comma seperated lists of hosts or a range of hostnames in the general form: prefix[n-m,l-k,...], where n < m and l < k, etc. The later form 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 prefixNN 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 range usage follow:

     foo[01-05] instead of foo01,foo02,foo03,foo04,foo05
     foo[7,9-10] instead of foo7,foo9,foo10
     foo[0-3] instead of foo0,foo1,foo2,foo3
 

As a reminder to the reader, some shells will interpret brackets ([ and ]) for pattern matching. Depending on your shell, it may be necessary to enclose ranged lists within quotes.

By default, standard output from each node specified will be output with the hostname prepended to each line. Although this output is readable in many situations, it may be difficult to read in other situations. The -C option can be used to change this default.

EXAMPLES

Determine the power status of foo[0-2] with null username and password
        ipmipower -h foo[0-2] --stat

Determine the power status of foo[0-2] with non-null username and password
        ipmipower -h foo[0-2] -u foo -p bar --stat

Hard reset nodes foo[0-2] with non-null username and password
        ipmipower -h foo[0-2] -u foo -p bar --reset

GENERAL TROUBLESHOOTING

Most often, IPMI over LAN problems involve a misconfiguration of the remote machine's BMC. Double check to make sure the following are configured properly in the remote machine's BMC: IP address, MAC address, subnet mask, username, user enablement, user privilege, password, LAN privilege, LAN enablement, and allowed authentication type(s). For IPMI 2.0 connections, double check to make sure the cipher suite privilege(s) and K_g key are configured properly. The bmc-config(8) tool can be used to check and/or change these configuration settings.

The following are common issues for given error messages:

"username invalid" - The username entered (or a NULL username if none was entered) is not available on the remote machine. Please try a different username. It may also be possible the remote BMC's username configuration is incorrect.

"password invalid" - The password entered (or a NULL password if none was entered) is not correct. Please try a different password. It may also be possible the password for the user is not correctly configured on the remote BMC.

"password verification timeout" - The password entered is likely not correct. Please try a different password. It may also be possible the password for the user is not correctly configured on the remote BMC.

"k_g invalid" - The K_g key entered (or a NULL K_g key if none was entered) is not correct. Please try a different K_g key. It may also be possible the K_g key is not correctly configured on the remote BMC.

"privilege level insufficient" - An IPMI command requires a higher user privilege than the one authenticated with. Please try to authenticate with a higher privilege. This may require authenticating to a different user which has a higher maximum privilege.

"privilege level cannot be obtained for this user" - The privilege level you are attempting to authenticate with is higher than the maximum allowed for this user. Please try again with a lower privilege. It may also be possible the maximum privilege level allowed for a user is not configured properly on the remote BMC.

"authentication type unavailable for attempted privilege level" - The authentication type you wish to authenticate with is not available for this privilege level. Please try again with an alternate authentication type or alternate privilege level. It may also be possible the available authentication types you can authenticate with are not correctly configured on the remote BMC.

"cipher suite id unavailable" - The cipher suite id you wish to authenticate with is not available on the remote BMC. Please try again with an alternate cipher suite id. It may also be possible the available cipher suite ids are not correctly configured on the remote BMC.

"ipmi 2.0 unavailable" - IPMI 2.0 was not discovered on the remote machine. Please try to use IPMI 1.5 instead.

"session timeout" - The IPMI session has timed out. Please reconnect.

If IPMI over LAN continually times out, you may wish to increase the retransmission timeout. Some remote BMCs are considerably slower than others.

Please see WORKAROUNDS below to also if there are any vendor specific bugs that have been discovered and worked around.

IPMIPOWER TROUBLESHOOTING

When powering on a powered off machine, the client must have a means by which to resolve the MAC address of the remote machine's ethernet card. This is typically done in one of two ways.

1) Enable gratuitous ARPs on the remote machine. The remote machine will send out a gratuitous ARP, which advertises the ethernet IP and MAC address so that other machines on the network this information their local ARP cache. For large clusters, this method is not recommended since gratuitous ARPs can flood the network with unnecessary traffic.

2) Permanently store the remote machine's MAC address in the local ARP cache. This is the more common approach on large clusters.

Other methods are listed in the IPMI specification.

If ipmipower is running a tad slow when running a power control command on the commandline (compared to running a power control command in interactive mode), hostname IP resolution may be slowing the startup code down. Hostname resolution tuning may help make ipmipower execute faster on the commandline. This performance problem should not matter when running in interactive mode or with powerman, since it is a one-time setup cost.

WORKAROUNDS

With so many different vendors implementing their own IPMI solutions, different vendors may implement their IPMI protocols incorrectly. The following lists the handful of compliance issues discovered and the workarounds currently supported.

When possible, workarounds have been implemented so they will be transparent to the user. However, some will require the user to specify a workaround be used via the -W option. The workarounds listed below are listed in the order of their implementation. Therefore, workarounds implemented earlier may work for other vendors.

The hardware listed below only indicates the hardware that a problem was discovered on. Newer versions hardware may fix the problems indicated below. Similar machines from vendors may or may not exhibit the same problems.

Intel SR870BN4: BMCs would not respond to retransmissions of a Get Session Challenge Request if a previous Get Session Challenge response was lost. Resolved by sending retransmitted Get Session Challenge requests from a different source port. Automatically handled.

Tyan S2882 with m3289 BMC: After the IPMI session is brought up, packet responses return empty session IDs to the client. In order to work around this issue, the "idzero" workaround must be specified. The option will allow empty session IDs to be accepted by the client. This problem is apparently fixed in later firmware releases.

Dell PowerEdge 2850,SC1425: When Per-Message Authentication is disabled, packet responses contain non-null authentication data (when it should in fact be null). In order to work around this issue, the "unexpectedauth" workaround must be specified. The option will allow unexpected non-null authcodes to be checked as though they were expected. This compliance bug is confirmed to be fixed on newer firmware.

IBM eServer 325: The remote BMC will advertise that Per Message Authentication is disabled, but actually require it for the protocol. In order to work around this issue, the "forcepermsg" workaround must be specified. The option will force Per Message Authentication to be used no matter what is advertised by the remote BMC.

Supermicro H8QME with SIMSO daughter card: The remote BMC will advertise that Per Message Authentication is disabled, but actually require it for the protocol. Automatically handled.

Asus P5M2/P5MT-R: The motherboard does not properly report username capabilities and or K_g status, leading to invalid username or K_g errors. In order to work around this issue, the "authcap" workaround must be specified.

Intel SE7520AF2 with Intel Server Management Module (Professional Edition): There are a number of Intel IPMI 2.0 bugs which can be worked around by specifying the "intel20" workaround. The workarounds include padding of usernames, automatic acceptance of a RAKP 4 response integrity check when using the integrity algorithm MD5-128, and password truncation if the authentication algorithm is HMAC-MD5-128.

Supermicro H8QME with SIMSO daughter card: There are several Supermicro IPMI 2.0 bugs on early firmware revisions which can be worked around using the "supermicro20" workaround. These compliance bugs are confirmed to be fixed on newer firmware.

Sun Fire 4100: There are several IPMI 2.0 bugs which can be worked around by specifying the "sun20" workaround. The workarounds include handling invalid lengthed hash keys and invalid cipher suite records.

KNOWN ISSUES

In order to prevent brute force attacks, some BMCs will "lock up" after a number of username, password, or privilege errors. There is no known way to cleanly deal with a "locked up" BMC. The best option is to simply wait "awhile".

On certain operating systems, if you input your username and password on the command line, the username and password may be discovered by other users when using the ps(1) command or looking in the /proc file system. More secure solutions are to configure this information in the config file, in interactive mode, or with the -P and -K options.

IPMI specifications do not require BMCs to perform a power control operation before returning a completion code to the caller. Therefore, it is possible for ipmipower to return power status queries opposite of what you are expecting. For example, if a "power off" operation is performed, a BMC may return a successful completion code to ipmipower before the "power off" operation is actually performed. Subsequent power status queries may return "on" for several seconds, until the BMC actually performs the "power off" operation.

ORIGIN

Developed by Albert Chu <chu11@llnl.gov> on LLNL's GNU/Linux clusters. This software is open source and distributed under the terms of the Gnu GPL.

SEE ALSO

bmc-config(8), ipmipower.conf(5)