Connecting to a BMC 20
Passwords can be at most 16 characters on IPMI v1.5 and 20 on IPMI v2.0; ipmitool rejects longer ones for v2.0.
| Command | What it does |
|---|---|
ipmitool -I open COMMAND | Use the local OpenIPMI driverIn-band access on Linux through the kernel driver and its /dev/ipmi0 device; no network session is involved. |
ipmitool -I lan -H HOSTNAME -U USERNAME -P PASSWORD COMMAND | Connect over IPMI v1.5 LANRMCP over UDP port 623; a hostname is mandatory, and without a password it tries to connect unauthenticated. |
ipmitool -I lanplus -H HOSTNAME -U USERNAME -P PASSWORD COMMAND | Connect over IPMI v2.0 RMCP+Adds encryption and extra payloads such as Serial over LAN; the build must be linked against OpenSSL. |
ipmitool -I lan -H 1.2.3.4 -f passfile chassis power status | Query a remote chassisThe manual's third example: the password comes from a file and the reply states whether power is on. |
-I INTERFACE | Select the IPMI interfaceThe manual describes open, lan, lanplus, free, imb, bmc and lipmi; usage help lists those compiled in. |
-H ADDRESS | Set the remote server addressTakes an IP address or a hostname and is mandatory with lan and lanplus. |
-U USERNAME | Set the remote usernameLeft out, the session uses the NULL user. |
-P PASSWORD | Give the password inlineThe manual advises against it, because the password then sits on the command line. |
-E | Read the password from the environmentChecks the variable IPMITOOL_PASSWORD first, then IPMI_PASSWORD. |
-f PASSWORD_FILE | Read the password from a fileAn absent or empty file leaves the password at NULL. |
-a | Prompt for the passwordAsks interactively, which also happens when no password option is given at all. |
-p PORT | Set the remote UDP portNeeded only when the BMC does not listen on the default port, 623. |
-L PRIVLVL | Force the session privilege levelOne of CALLBACK, USER, OPERATOR or ADMINISTRATOR; ADMINISTRATOR is used when the option is absent. |
-C CIPHERSUITE | Choose the lanplus cipher suiteDefaults to suite 17 (HMAC-SHA256 with AES-CBC-128); releases up to 1.8.18 defaulted to 3. |
-A AUTHTYPE | Force the v1.5 authentication typeApplies to lan sessions only; choose from MD5, MD2, PASSWORD, OEM or NONE. |
-k KEY | Supply the Kg keyThe key authenticates IPMI v2.0 sessions; none is used unless this option is given. |
-N SEC | Set the retransmission intervalSeconds between resends of lan and lanplus messages: 2 by default for lan, 1 for lanplus. |
-R COUNT | Set the retry countApplies to the lan and lanplus interfaces, where the default is 4 retries. |
-t TARGET_ADDRESS | Bridge to a target addressForwards IPMI requests to the given address, 32 by default; -L is ignored and ADMINISTRATOR used. |
-b CHANNEL | Set the bridge destination channelNames the channel a bridged request is sent to, alongside -t. |
General options 8
| Command | What it does |
|---|---|
ipmitool help | List all commandsThe word help can also end a command line to print that command's options. |
-h | Show usage helpPrints the option summary, including the interfaces compiled into this build. |
-V | Show version information |
-v | Increase verbosityRepeatable: three of them hexdump every packet in and out, five add request and reply processing details. |
-c | Print CSV outputComma-separated values for scripts; not every command supports it. |
-d N | Pick the in-band device numberSelects /dev/ipmiN on machines with several BMCs; 0 is the default. |
-o OEMTYPE | Enable OEM workaroundsSwitches on small hacks for the quirks of particular BMC manufacturers. |
-o list | List supported OEM types |
Power control 12
| Command | What it does |
|---|---|
chassis power status | Power statusPrints one line such as Chassis Power is on, as in the manual's third example. |
chassis power on | Power onPowers the chassis up; lan sessions connect as administrator because power functions need that level. |
chassis power off | Power offDrops to soft off (S4/S5) at once, with no clean operating system shutdown first. |
chassis power cycle | Power cycleInterrupts power for at least one second; the manual advises checking that the system is on first. |
chassis power reset | Hard resetResets the system hard, unlike soft, which asks the operating system to shut down through ACPI. |
chassis power diag | Send a diagnostic interruptPulses an NMI straight to the processors. |
chassis power soft | Soft shutdownRequests an ACPI shutdown; the operating system needs ACPI support and a daemon watching for the event. |
power COMMAND | Chassis power shortcutShort form of chassis power that takes the same words: status, on, off, cycle, reset, diag, soft. |
chassis policy list | List power restore policiesShows which policies this chassis supports for the moment power returns after a failure. |
chassis policy always-on | Power on when power returnsThe chassis turns on by itself as soon as power comes back. |
chassis policy previous | Restore the previous power stateAfter an outage the chassis goes back to whatever state it was in before. |
chassis policy always-off | Stay off when power returnsThe chassis remains off after power comes back. |
Chassis status 8
| Command | What it does |
|---|---|
chassis status | Show chassis statusCovers the power state, front-panel buttons, cooling, drive and fault indicators. |
chassis identify | Identify lightTurns on the front-panel identify light for the default interval of 15 seconds. |
chassis identify INTERVAL | Identify for a set timeKeeps the identify light on for the given number of seconds. |
chassis identify 0 | Turn the identify light offZero as the interval switches the light off again. |
chassis identify force | Keep the identify light onLeaves the light on indefinitely, until an interval of 0 switches it off. |
chassis restart_cause | Show last restart causeAsks the chassis why the system last restarted. |
chassis poh | Show power-on hoursReturns the counter of hours the system has been powered on. |
chassis selftest | Show chassis self-test results |
Boot device 8
| Command | What it does |
|---|---|
chassis bootdev pxe | Next boot from PXEForces a network (PXE) boot on the next restart. |
chassis bootdev disk | Next boot from diskForces a boot from the default hard drive on the next restart. |
chassis bootdev bios | Next boot into BIOS setupMakes the next restart stop in the BIOS setup screen. |
chassis bootdev cdrom | Next boot from CD/DVDForces the optical drive as the boot device for the next restart. |
chassis bootdev safe | Next boot in Safe ModeBoots the default hard drive and requests Safe Mode. |
chassis bootdev diag | Next boot from diagnostic partition |
chassis bootdev floppy | Next boot from removable mediaCovers the floppy or primary removable media device. |
chassis bootdev none | Leave boot order unchangedRequests no change to the boot device order. |
Sensors and SDR 17
| Command | What it does |
|---|---|
sdr list | Sensor data recordsOne line per sensor with name, reading and status; only full and compact records unless a type is given. |
sdr elist | Extended sensor listLike list, with extra columns for the sensor number, the entity and its instance, and asserted states. |
sdr elist all | List every SDR recordIncludes locator records too, which the default output of list and elist leaves out. |
sdr elist mcloc | List management controller locators |
sdr elist fru | List FRU locators |
sdr type list | List sensor typesPrints the type names that sdr type accepts; running it with no type does the same. |
sdr type Temperature | Show sensors of one typeThe manual's example: lists every temperature sensor with its reading. |
sdr get ID | Show one sensor data recordPrints the record for each sensor ID given; several IDs may follow. |
sdr info | Show SDR repository informationQueries the BMC for details of the repository itself, not of single sensors. |
sdr entity ID | List sensors of an entityEntity IDs for the target system appear in the output of sdr elist. |
sdr dump FILE | Dump the SDR to a fileWrites raw SDR data that -S can later use as a local cache of a remote system. |
-S SDR_CACHE_FILE | Use a local SDR cacheSpeeds up commands that need the whole SDR; the cache file comes from sdr dump. |
sensor list | Sensor readingsWide table with one row per sensor, including its thresholds. |
sensor get ID | Show sensors by nameGive the sensor name, in double quotes when it has spaces, as the manual does for Baseboard 1.25V. |
sensor thresh ID THRESHOLD SETTING | Set one sensor thresholdTHRESHOLD is unr, ucr, unc, lnc, lcr or lnr; the sensor is given by its name. |
sensor thresh ID lower LNR LCR LNC | Set all lower thresholdsThree values in the order non-recoverable, critical, non-critical. |
sensor thresh ID upper UNC UCR UNR | Set all upper thresholdsThree values in the order non-critical, critical, non-recoverable. |
Event log 13
Entry times read Pre-Init Time-stamp until the SEL clock has been set.
| Command | What it does |
|---|---|
sel list | Event logPrints the whole System Event Log when no count is given. |
sel elist | Extended event logAlso looks up the sensor ID behind each event in the SDR, which is slow over the system interface. |
sel list first COUNT | Show the oldest entriesLimits the listing to the COUNT least-recent records; 0 means all. |
sel list last COUNT | Show the newest entriesLimits the listing to the COUNT most-recent records. |
sel info | Show event log informationQueries the BMC about the log itself rather than listing its entries. |
sel clear | Clear event logEmpties the log; the manual warns that this cannot be undone. |
sel get ID | Show one event recordPrints the details of the record with the given SEL record ID. |
sel delete ID | Delete event recordsRemoves the records whose IDs are listed; more than one ID is allowed. |
sel save FILE | Save the event log as textThe file is in the format that event file reads back in. |
sel writeraw FILE | Save the event log as binaryWrites raw records that sel readraw can display later. |
sel readraw FILE | Read a binary event log fileDisplays records from a file made with sel writeraw. |
sel time get | Show the event log clockPrints the current time of the SEL clock that stamps new entries. |
sel time set "MM/DD/YYYY HH:MM:SS" | Set the event log clockUses a 24-hour clock; the manual recommends clearing the SEL before changing the time. |
Test events and event filtering 10
| Command | What it does |
|---|---|
event 1 | Send a test temperature eventAdds the predefined temperature event, upper critical going high, to test SEL logging. |
event 2 | Send a test voltage eventAdds the predefined voltage event, lower critical going low. |
event 3 | Send a test memory eventAdds the predefined correctable ECC memory event. |
event file FILENAME | Add events from a fileEach line of the file describes one event record to append to the SEL. |
event SENSORID list | List states of a sensorShows the states and state shortcuts that can be used to generate an event for that sensor. |
event "PS 2T Fan Fault" "State Asserted" | Generate a custom sensor eventThe manual's example: sensor name and state in quotes; add deassert to log the opposite direction. |
pef info | Show PEF capabilitiesAsks the BMC which Platform Event Filtering features it supports. |
pef status | Show PEF statusIncludes the last SEL entry that the BMC processed. |
pef policy | List PEF policy tablePolicy entries name alert destinations, and PEF alert actions point at sets of those entries. |
pef list | List PEF table entriesShows which action each filter attaches to which sensor event. |
FRU inventory 5
| Command | What it does |
|---|---|
fru print | Hardware inventoryReads all FRU data: serial and part numbers, asset tags, and chassis, board and product strings. |
fru read ID FILE | Dump FRU data to a fileSaves the binary data of one FRU; ID is the number shown by fru print. |
fru write ID FILE | Upload FRU data from a fileWrites the binary contents of the file into the FRU with that ID. |
fru edit ID | Edit FRU records interactivelyCovers a few supported records, mainly the PICMG Carrier Activation Record; ID defaults to 0. |
fru edit ID field SECTION INDEX STRING | Replace a FRU field stringSECTION is c, b or p (chassis, board, product); the new string must match the old length. |
LAN configuration 27
| Command | What it does |
|---|---|
lan print | Network configShows the settings of the first LAN channel found. |
lan print CHANNEL | Show one channel's LAN settingsUse it when the LAN interface is not the first channel found. |
channel info | Show channel informationWithout a number it describes the channel currently in use. |
channel info 1 | Check whether a channel is LANTry channel numbers until the medium type reads 802.3 LAN. |
lan set CHANNEL ipaddr X.X.X.X | Set the BMC IP addressCHANNEL is the number of the LAN channel, which channel info helps to find. |
lan set CHANNEL netmask X.X.X.X | Set the netmask |
lan set CHANNEL defgw ipaddr X.X.X.X | Set the default gatewayA second form, defgw macaddr, sets the gateway's MAC address instead. |
lan set CHANNEL ipsrc static | Use a static IP addressMarks the address as manually configured. |
lan set CHANNEL ipsrc dhcp | Get the IP address by DHCPThe BMC itself runs DHCP to obtain its address. |
lan set CHANNEL ipsrc bios | Let the BIOS set the addressThe address is loaded by the BIOS or by system software. |
lan set CHANNEL access on | Enable LAN channel accessUse off instead of on to disable access to the channel. |
lan set CHANNEL password PASSWORD | Set the channel session passwordThe manual describes this as the password of the null user. |
lan set CHANNEL snmp COMMUNITY | Set the SNMP community string |
lan set CHANNEL alert on | Enable PEF alertingTurns Platform Event Filtering alerts on for this channel; off disables them. |
lan set CHANNEL arp respond on | Answer ARP requestsLets the BMC send ARP responses itself; off stops them. |
lan set CHANNEL arp generate on | Generate gratuitous ARPsThe BMC announces itself with gratuitous ARP packets; arp interval sets how often. |
lan set CHANNEL arp interval SECONDS | Set the gratuitous ARP interval |
lan set CHANNEL vlan id ID | Set the VLAN IDEnables VLAN operation with an identifier from 1 to 4094. |
lan set CHANNEL vlan id off | Disable the VLAN |
lan set CHANNEL vlan priority PRIORITY | Set the VLAN priorityPriority of the VLAN frames, from 0 to 7. |
lan set CHANNEL auth ADMIN PASSWORD,MD5 | Set allowed authentication typesExample from the built-in help; levels are CALLBACK, USER, OPERATOR and ADMIN, each with its own list of types. |
lan set CHANNEL cipher_privs XXXXXXXXXXXXXXX | Limit cipher suites by privilegeOne character per cipher suite, 15 in all: X unused, c callback, u user, o operator, a admin, O OEM. |
lan set CHANNEL bad_pass_thresh THRESH_NUM 1 RESET_INTERVAL LOCKOUT_INTERVAL | Set the bad password lockoutDisables a user after THRESH_NUM bad passwords in a row; both intervals count in tens of seconds. |
lan alert print CHANNEL | Show LAN alert destinationsWithout arguments it prints every alert destination of the first LAN channel found. |
lan alert set CHANNEL DESTINATION ipaddr X.X.X.X | Set an alert destination addressDESTINATION is one of the alert destinations that lan alert print lists. |
lan stats get CHANNEL | Show IP statisticsReports on the IP connections of the channel; the first LAN channel is the default. |
lan stats clear CHANNEL | Reset IP statisticsZeroes the IP, UDP and RMCP counters of the channel. |
Users and privileges 15
| Command | What it does |
|---|---|
user list | List usersShows the user information stored for every defined user ID. |
user list CHANNEL | List users of one channelThe built-in help accepts a channel number after list and after summary. |
user summary | Summarise user slotsGives the maximum number of user IDs, how many are enabled and how many names are fixed. |
user set name USERID USERNAME | Set a user nameStores USERNAME as the name of the numbered user ID. |
user set password USERID PASSWORD | Set a user passwordLeaving the password out clears it to NULL; an optional 16 or 20 sets the maximum length. |
user enable USERID | Enable a userAllows that user ID to access the BMC. |
user disable USERID | Disable a userBlocks that user ID from accessing the BMC. |
user priv USERID LEVEL CHANNEL | Set a user's privilege levelLEVEL is a number: 2 User, 3 Operator, 4 Administrator; the current channel is used when none is given. |
user test USERID 16 PASSWORD | Test a stored passwordChecks whether the password is stored in 16-byte or 20-byte form; give 16 or 20. |
channel getaccess CHANNEL USERID | Show a user's channel access |
channel setaccess CHANNEL USERID | Configure a user's channel accessFollowed by any of callin=, ipmi= and link= with on or off, and privilege= with a level. |
channel authcap CHANNEL PRIV | Show authentication capabilitiesPRIV is the maximum privilege level to ask about, from 1 Callback to 4 Administrator. |
channel getciphers ipmi CHANNEL | List supported cipher suitesUse sol in place of ipmi to list the suites available for Serial over LAN. |
session info all | List all sessionsSessions can also be chosen by active status, by id or by handle. |
session info active | List active sessions |
Serial over LAN 13
The ~ escapes are recognised only as the first characters after a newline.
| Command | What it does |
|---|---|
sol activate | Start a Serial over LAN sessionOpens the remote serial console in raw terminal mode; works only with the lanplus interface. |
sol deactivate | End Serial over LAN modeResets the BMC's SOL state after a session that ended without a clean exit. |
sol info | Show SOL configurationTakes an optional channel number; the channel in use is the default. |
sol set PARAMETER VALUE CHANNEL | Set a SOL parameterUpdates are guarded automatically through the set-in-progress parameter. |
sol set enabled true CHANNEL | Enable SOL on a channelOther parameters include force-encryption, privilege-level, retry-count and the two bit-rate settings. |
sol payload enable CHANNEL USERID | Allow a user to use SOLGrants the SOL payload to that user on the channel; disable revokes it. |
sol payload status CHANNEL USERID | Check a user's SOL permissionShows whether the SOL payload is enabled for that user on the channel. |
-e SOL_ESCAPE_CHAR | Change the SOL escape characterReplaces the default ~, which can clash with ssh sessions. |
~. | End the SOL sessionTyped inside the session; escapes are recognised only right after a newline. |
~B | Send a break |
~~ | Send a literal escape characterType the escape character twice to pass one through to the console. |
~? | List the escape sequences |
~^Z | Suspend ipmitoolThe ~^X variant suspends without restoring the tty on restart. |
Management controller 11
bmc is the older, deprecated name of the mc command.
| Command | What it does |
|---|---|
mc info | Controller infoLists device and firmware revision, supported IPMI version, manufacturer ID and additional device support. |
mc reset cold | Cold reset the BMCRestarts the management controller itself, not the server it manages. |
mc reset warm | Warm reset the BMC |
mc guid | Show the controller GUIDDetects the encoding automatically; smbios, ipmi, rfc4122 or dump can be added to force one. |
mc selftest | Run the BMC self testHealth check of the controller, based on the self-test results it returns. |
mc getenables | Show enabled BMC optionsThe matching setenables command changes them, and only over the system interface. |
mc watchdog get | Show the watchdog timerPrints the current timer settings and the state of the countdown. |
mc watchdog reset | Restart the watchdog countdownRestores the timer to its most recent state and starts counting down again. |
mc watchdog off | Stop the watchdog timerTurns off a countdown that is currently running. |
mc getsysinfo system_name | Read the stored system nameOther arguments are primary_os_name and os_name, plus two Dell-specific ones. |
mc setsysinfo system_name STRING | Store a system name |
DCMI power management 9
| Command | What it does |
|---|---|
dcmi discover | Discover DCMI capabilities |
dcmi power reading | Read system power draw |
dcmi power get_limit | Show the power limit |
dcmi power set_limit limit WATTS | Set the power limit in wattsOther set_limit parameters are action, correction (milliseconds) and sample (seconds). |
dcmi power activate | Activate the power limitPuts the limit configured with set_limit into force. |
dcmi power deactivate | Deactivate the power limit |
dcmi sensors | List DCMI sensors |
dcmi get_temp_reading | Read DCMI temperature sensors |
dcmi asset_tag | Show the asset tagPrints the platform's asset tag; set_asset_tag stores a new one. |
Raw commands and scripting 6
| Command | What it does |
|---|---|
raw NETFN CMD DATA | Send a raw IPMI requestBytes are written as numbers such as 0x0, and the response bytes come back in hex. |
raw 0x0 0xf | Raw power-on hours queryThe manual's example of a raw request: netfn 0x0, command 0xf returns the POH counter. |
-l LUN | Set the LUN for raw commands |
shell | Start the interactive shellRuns several commands in one session, reusing the SDR cache; LAN sessions get periodic keepalives. |
exec FILENAME | Run commands from a fileOne command per line, written as in the COMMANDS section; # starts a comment. |
set hostname HOST | Change the session hostnameVariable used inside shell and exec scripts; username, password, privlvl and port are set the same way. |
No row on this page matches that filter.
Notes
Connecting
Each command line has the same shape: the program name, the connection options, then the command. ipmitool -I open COMMAND talks to the BMC of the machine it runs on through the OpenIPMI kernel driver. ipmitool -I lanplus -H HOSTNAME -U USERNAME -P PASSWORD COMMAND opens an IPMI v2.0 session over the network, the interface that Serial over LAN requires. The manual advises against -P PASSWORD: -E reads the password from the environment, -f PASSWORD_FILE reads it from a file, and with no password option at all ipmitool prompts for it. From 1.8.19 on, lanplus sessions use cipher suite 17 unless -C CIPHERSUITE says otherwise; releases up to 1.8.18 defaulted to suite 3, which the manual calls insecure.
Power
chassis power status reports whether the chassis is on, and chassis power on and chassis power off switch it. chassis power off cuts power without a clean operating system shutdown; chassis power soft asks the OS to shut down through ACPI instead. chassis power cycle interrupts power for at least a second, and chassis power reset performs a hard reset — the one to try when a hung kernel ignores everything else. The shorter power COMMAND form accepts the same words, so power status and chassis power status are the same request. chassis identify lights the identify LED for 15 seconds so a technician can find the right machine in a rack.
What went wrong
sel list prints the System Event Log, the record to read after an unexplained reboot; sel elist adds the ID of the sensor behind each event. sel clear empties the log and cannot be undone, so keep a copy first with sel save FILE. sensor list shows current readings and thresholds for every sensor, and sdr list shows the sensors from the sensor data repository in a compact form. fru print lists field-replaceable units with part and serial numbers, which answers inventory questions without opening the case.
Network, users and console
lan print shows the BMC's LAN configuration and user list the accounts that can log in; both are the first checks when remote IPMI stops answering. Settings are changed with the lan set family, for example lan set CHANNEL ipaddr X.X.X.X and lan set CHANNEL ipsrc static, and channel info helps to find which channel number is the LAN one. mc info prints the controller's firmware revision. sol activate opens Serial over LAN, a text console on the server's serial port; it works only over lanplus, and typing ~. at the start of a line leaves it. Keep the BMC on a dedicated management network: the manual itself advises enabling IPMI over LAN only in trusted environments.
Questions
How do I run an ipmitool command, locally or against a remote BMC?
Type them in a terminal after the program name and any connection options. On the server itself ipmitool help lists the commands; for a remote BMC use ipmitool -I lanplus -H HOSTNAME -U USERNAME -P PASSWORD COMMAND, replacing COMMAND with a row from this page such as chassis power status.
How do I check the power state with ipmitool?
chassis power status, which prints whether chassis power is on or off. The shortcut form power COMMAND takes the same word, so ipmitool power status gives the same answer.
How do I leave a Serial over LAN session?
Type ~. right after a newline. If a session ended badly and the BMC still treats it as active, sol deactivate resets it. The escape character can be changed with -e SOL_ESCAPE_CHAR, which helps because ~ can conflict with ssh.
Which ipmitool version does this page follow?
The manual page and built-in help of ipmitool 1.8.19. One change in that release matters for remote use: lanplus sessions default to cipher suite 17, where 1.8.18 and earlier used suite 3; -C CIPHERSUITE selects another.
Sources and checks
- ipmitool(1) manual page, ipmitool 1.8.19 (doc/ipmitool.1.in at release tag IPMITOOL_1_8_19) Options, command descriptions and examples
- ipmitool 1.8.19 source, lib/ipmi_lanp.c (built-in help text of the lan command) Syntax of the lan set and lan alert set commands
- ipmitool 1.8.19 source, lib/ipmi_mc.c (built-in help text of the mc command) Syntax of the mc watchdog commands
- ipmitool 1.8.19 source, lib/ipmi_user.c (built-in help text of the user command) Channel argument of user list and user summary
Every row on this page was matched to a line in the documentation above on . A binding that could not be found there is not listed.
Found a wrong or missing key? Tell us and it gets checked against the source. How we verify describes the process and its limits.