ipmitool commands

ipmitool commands for a server's baseboard management controller, from the ipmitool 1.8.19 manual page and the tool's built-in help. The first two categories hold connection and general options, with whole command lines such as ipmitool -I lanplus -H HOSTNAME -U USERNAME -P PASSWORD COMMAND; rows from Power control onward are the command part that comes after those options, or after the program name on the local machine. OEM extensions, firmware update, Node Manager and PICMG commands are left out.

182 commands in 15 sections. Checked row by row against ipmitool(1) manual page, ipmitool 1.8.19 (doc/ipmitool.1.in at release tag IPMITOOL_1_8_19) on . Edited by Jay.

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.

CommandWhat it does
ipmitool -I open COMMANDUse 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 COMMANDConnect 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 COMMANDConnect 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 statusQuery a remote chassisThe manual's third example: the password comes from a file and the reply states whether power is on.
-I INTERFACESelect the IPMI interfaceThe manual describes open, lan, lanplus, free, imb, bmc and lipmi; usage help lists those compiled in.
-H ADDRESSSet the remote server addressTakes an IP address or a hostname and is mandatory with lan and lanplus.
-U USERNAMESet the remote usernameLeft out, the session uses the NULL user.
-P PASSWORDGive the password inlineThe manual advises against it, because the password then sits on the command line.
-ERead the password from the environmentChecks the variable IPMITOOL_PASSWORD first, then IPMI_PASSWORD.
-f PASSWORD_FILERead the password from a fileAn absent or empty file leaves the password at NULL.
-aPrompt for the passwordAsks interactively, which also happens when no password option is given at all.
-p PORTSet the remote UDP portNeeded only when the BMC does not listen on the default port, 623.
-L PRIVLVLForce the session privilege levelOne of CALLBACK, USER, OPERATOR or ADMINISTRATOR; ADMINISTRATOR is used when the option is absent.
-C CIPHERSUITEChoose the lanplus cipher suiteDefaults to suite 17 (HMAC-SHA256 with AES-CBC-128); releases up to 1.8.18 defaulted to 3.
-A AUTHTYPEForce the v1.5 authentication typeApplies to lan sessions only; choose from MD5, MD2, PASSWORD, OEM or NONE.
-k KEYSupply the Kg keyThe key authenticates IPMI v2.0 sessions; none is used unless this option is given.
-N SECSet the retransmission intervalSeconds between resends of lan and lanplus messages: 2 by default for lan, 1 for lanplus.
-R COUNTSet the retry countApplies to the lan and lanplus interfaces, where the default is 4 retries.
-t TARGET_ADDRESSBridge to a target addressForwards IPMI requests to the given address, 32 by default; -L is ignored and ADMINISTRATOR used.
-b CHANNELSet the bridge destination channelNames the channel a bridged request is sent to, alongside -t.

General options 8

CommandWhat it does
ipmitool helpList all commandsThe word help can also end a command line to print that command's options.
-hShow usage helpPrints the option summary, including the interfaces compiled into this build.
-VShow version information
-vIncrease verbosityRepeatable: three of them hexdump every packet in and out, five add request and reply processing details.
-cPrint CSV outputComma-separated values for scripts; not every command supports it.
-d NPick the in-band device numberSelects /dev/ipmiN on machines with several BMCs; 0 is the default.
-o OEMTYPEEnable OEM workaroundsSwitches on small hacks for the quirks of particular BMC manufacturers.
-o listList supported OEM types

Power control 12

CommandWhat it does
chassis power statusPower statusPrints one line such as Chassis Power is on, as in the manual's third example.
chassis power onPower onPowers the chassis up; lan sessions connect as administrator because power functions need that level.
chassis power offPower offDrops to soft off (S4/S5) at once, with no clean operating system shutdown first.
chassis power cyclePower cycleInterrupts power for at least one second; the manual advises checking that the system is on first.
chassis power resetHard resetResets the system hard, unlike soft, which asks the operating system to shut down through ACPI.
chassis power diagSend a diagnostic interruptPulses an NMI straight to the processors.
chassis power softSoft shutdownRequests an ACPI shutdown; the operating system needs ACPI support and a daemon watching for the event.
power COMMANDChassis power shortcutShort form of chassis power that takes the same words: status, on, off, cycle, reset, diag, soft.
chassis policy listList power restore policiesShows which policies this chassis supports for the moment power returns after a failure.
chassis policy always-onPower on when power returnsThe chassis turns on by itself as soon as power comes back.
chassis policy previousRestore the previous power stateAfter an outage the chassis goes back to whatever state it was in before.
chassis policy always-offStay off when power returnsThe chassis remains off after power comes back.

Chassis status 8

CommandWhat it does
chassis statusShow chassis statusCovers the power state, front-panel buttons, cooling, drive and fault indicators.
chassis identifyIdentify lightTurns on the front-panel identify light for the default interval of 15 seconds.
chassis identify INTERVALIdentify for a set timeKeeps the identify light on for the given number of seconds.
chassis identify 0Turn the identify light offZero as the interval switches the light off again.
chassis identify forceKeep the identify light onLeaves the light on indefinitely, until an interval of 0 switches it off.
chassis restart_causeShow last restart causeAsks the chassis why the system last restarted.
chassis pohShow power-on hoursReturns the counter of hours the system has been powered on.
chassis selftestShow chassis self-test results

Boot device 8

CommandWhat it does
chassis bootdev pxeNext boot from PXEForces a network (PXE) boot on the next restart.
chassis bootdev diskNext boot from diskForces a boot from the default hard drive on the next restart.
chassis bootdev biosNext boot into BIOS setupMakes the next restart stop in the BIOS setup screen.
chassis bootdev cdromNext boot from CD/DVDForces the optical drive as the boot device for the next restart.
chassis bootdev safeNext boot in Safe ModeBoots the default hard drive and requests Safe Mode.
chassis bootdev diagNext boot from diagnostic partition
chassis bootdev floppyNext boot from removable mediaCovers the floppy or primary removable media device.
chassis bootdev noneLeave boot order unchangedRequests no change to the boot device order.

Sensors and SDR 17

CommandWhat it does
sdr listSensor data recordsOne line per sensor with name, reading and status; only full and compact records unless a type is given.
sdr elistExtended sensor listLike list, with extra columns for the sensor number, the entity and its instance, and asserted states.
sdr elist allList every SDR recordIncludes locator records too, which the default output of list and elist leaves out.
sdr elist mclocList management controller locators
sdr elist fruList FRU locators
sdr type listList sensor typesPrints the type names that sdr type accepts; running it with no type does the same.
sdr type TemperatureShow sensors of one typeThe manual's example: lists every temperature sensor with its reading.
sdr get IDShow one sensor data recordPrints the record for each sensor ID given; several IDs may follow.
sdr infoShow SDR repository informationQueries the BMC for details of the repository itself, not of single sensors.
sdr entity IDList sensors of an entityEntity IDs for the target system appear in the output of sdr elist.
sdr dump FILEDump the SDR to a fileWrites raw SDR data that -S can later use as a local cache of a remote system.
-S SDR_CACHE_FILEUse a local SDR cacheSpeeds up commands that need the whole SDR; the cache file comes from sdr dump.
sensor listSensor readingsWide table with one row per sensor, including its thresholds.
sensor get IDShow 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 SETTINGSet one sensor thresholdTHRESHOLD is unr, ucr, unc, lnc, lcr or lnr; the sensor is given by its name.
sensor thresh ID lower LNR LCR LNCSet all lower thresholdsThree values in the order non-recoverable, critical, non-critical.
sensor thresh ID upper UNC UCR UNRSet 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.

CommandWhat it does
sel listEvent logPrints the whole System Event Log when no count is given.
sel elistExtended event logAlso looks up the sensor ID behind each event in the SDR, which is slow over the system interface.
sel list first COUNTShow the oldest entriesLimits the listing to the COUNT least-recent records; 0 means all.
sel list last COUNTShow the newest entriesLimits the listing to the COUNT most-recent records.
sel infoShow event log informationQueries the BMC about the log itself rather than listing its entries.
sel clearClear event logEmpties the log; the manual warns that this cannot be undone.
sel get IDShow one event recordPrints the details of the record with the given SEL record ID.
sel delete IDDelete event recordsRemoves the records whose IDs are listed; more than one ID is allowed.
sel save FILESave the event log as textThe file is in the format that event file reads back in.
sel writeraw FILESave the event log as binaryWrites raw records that sel readraw can display later.
sel readraw FILERead a binary event log fileDisplays records from a file made with sel writeraw.
sel time getShow 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

CommandWhat it does
event 1Send a test temperature eventAdds the predefined temperature event, upper critical going high, to test SEL logging.
event 2Send a test voltage eventAdds the predefined voltage event, lower critical going low.
event 3Send a test memory eventAdds the predefined correctable ECC memory event.
event file FILENAMEAdd events from a fileEach line of the file describes one event record to append to the SEL.
event SENSORID listList 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 infoShow PEF capabilitiesAsks the BMC which Platform Event Filtering features it supports.
pef statusShow PEF statusIncludes the last SEL entry that the BMC processed.
pef policyList PEF policy tablePolicy entries name alert destinations, and PEF alert actions point at sets of those entries.
pef listList PEF table entriesShows which action each filter attaches to which sensor event.

FRU inventory 5

CommandWhat it does
fru printHardware inventoryReads all FRU data: serial and part numbers, asset tags, and chassis, board and product strings.
fru read ID FILEDump FRU data to a fileSaves the binary data of one FRU; ID is the number shown by fru print.
fru write ID FILEUpload FRU data from a fileWrites the binary contents of the file into the FRU with that ID.
fru edit IDEdit FRU records interactivelyCovers a few supported records, mainly the PICMG Carrier Activation Record; ID defaults to 0.
fru edit ID field SECTION INDEX STRINGReplace a FRU field stringSECTION is c, b or p (chassis, board, product); the new string must match the old length.

LAN configuration 27

CommandWhat it does
lan printNetwork configShows the settings of the first LAN channel found.
lan print CHANNELShow one channel's LAN settingsUse it when the LAN interface is not the first channel found.
channel infoShow channel informationWithout a number it describes the channel currently in use.
channel info 1Check whether a channel is LANTry channel numbers until the medium type reads 802.3 LAN.
lan set CHANNEL ipaddr X.X.X.XSet the BMC IP addressCHANNEL is the number of the LAN channel, which channel info helps to find.
lan set CHANNEL netmask X.X.X.XSet the netmask
lan set CHANNEL defgw ipaddr X.X.X.XSet the default gatewayA second form, defgw macaddr, sets the gateway's MAC address instead.
lan set CHANNEL ipsrc staticUse a static IP addressMarks the address as manually configured.
lan set CHANNEL ipsrc dhcpGet the IP address by DHCPThe BMC itself runs DHCP to obtain its address.
lan set CHANNEL ipsrc biosLet the BIOS set the addressThe address is loaded by the BIOS or by system software.
lan set CHANNEL access onEnable LAN channel accessUse off instead of on to disable access to the channel.
lan set CHANNEL password PASSWORDSet the channel session passwordThe manual describes this as the password of the null user.
lan set CHANNEL snmp COMMUNITYSet the SNMP community string
lan set CHANNEL alert onEnable PEF alertingTurns Platform Event Filtering alerts on for this channel; off disables them.
lan set CHANNEL arp respond onAnswer ARP requestsLets the BMC send ARP responses itself; off stops them.
lan set CHANNEL arp generate onGenerate gratuitous ARPsThe BMC announces itself with gratuitous ARP packets; arp interval sets how often.
lan set CHANNEL arp interval SECONDSSet the gratuitous ARP interval
lan set CHANNEL vlan id IDSet the VLAN IDEnables VLAN operation with an identifier from 1 to 4094.
lan set CHANNEL vlan id offDisable the VLAN
lan set CHANNEL vlan priority PRIORITYSet the VLAN priorityPriority of the VLAN frames, from 0 to 7.
lan set CHANNEL auth ADMIN PASSWORD,MD5Set 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 XXXXXXXXXXXXXXXLimit 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_INTERVALSet the bad password lockoutDisables a user after THRESH_NUM bad passwords in a row; both intervals count in tens of seconds.
lan alert print CHANNELShow LAN alert destinationsWithout arguments it prints every alert destination of the first LAN channel found.
lan alert set CHANNEL DESTINATION ipaddr X.X.X.XSet an alert destination addressDESTINATION is one of the alert destinations that lan alert print lists.
lan stats get CHANNELShow IP statisticsReports on the IP connections of the channel; the first LAN channel is the default.
lan stats clear CHANNELReset IP statisticsZeroes the IP, UDP and RMCP counters of the channel.

Users and privileges 15

CommandWhat it does
user listList usersShows the user information stored for every defined user ID.
user list CHANNELList users of one channelThe built-in help accepts a channel number after list and after summary.
user summarySummarise user slotsGives the maximum number of user IDs, how many are enabled and how many names are fixed.
user set name USERID USERNAMESet a user nameStores USERNAME as the name of the numbered user ID.
user set password USERID PASSWORDSet a user passwordLeaving the password out clears it to NULL; an optional 16 or 20 sets the maximum length.
user enable USERIDEnable a userAllows that user ID to access the BMC.
user disable USERIDDisable a userBlocks that user ID from accessing the BMC.
user priv USERID LEVEL CHANNELSet 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 PASSWORDTest a stored passwordChecks whether the password is stored in 16-byte or 20-byte form; give 16 or 20.
channel getaccess CHANNEL USERIDShow a user's channel access
channel setaccess CHANNEL USERIDConfigure a user's channel accessFollowed by any of callin=, ipmi= and link= with on or off, and privilege= with a level.
channel authcap CHANNEL PRIVShow authentication capabilitiesPRIV is the maximum privilege level to ask about, from 1 Callback to 4 Administrator.
channel getciphers ipmi CHANNELList supported cipher suitesUse sol in place of ipmi to list the suites available for Serial over LAN.
session info allList all sessionsSessions can also be chosen by active status, by id or by handle.
session info activeList active sessions

Serial over LAN 13

The ~ escapes are recognised only as the first characters after a newline.

CommandWhat it does
sol activateStart a Serial over LAN sessionOpens the remote serial console in raw terminal mode; works only with the lanplus interface.
sol deactivateEnd Serial over LAN modeResets the BMC's SOL state after a session that ended without a clean exit.
sol infoShow SOL configurationTakes an optional channel number; the channel in use is the default.
sol set PARAMETER VALUE CHANNELSet a SOL parameterUpdates are guarded automatically through the set-in-progress parameter.
sol set enabled true CHANNELEnable SOL on a channelOther parameters include force-encryption, privilege-level, retry-count and the two bit-rate settings.
sol payload enable CHANNEL USERIDAllow a user to use SOLGrants the SOL payload to that user on the channel; disable revokes it.
sol payload status CHANNEL USERIDCheck a user's SOL permissionShows whether the SOL payload is enabled for that user on the channel.
-e SOL_ESCAPE_CHARChange 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.
~BSend a break
~~Send a literal escape characterType the escape character twice to pass one through to the console.
~?List the escape sequences
~^ZSuspend ipmitoolThe ~^X variant suspends without restoring the tty on restart.

Management controller 11

bmc is the older, deprecated name of the mc command.

CommandWhat it does
mc infoController infoLists device and firmware revision, supported IPMI version, manufacturer ID and additional device support.
mc reset coldCold reset the BMCRestarts the management controller itself, not the server it manages.
mc reset warmWarm reset the BMC
mc guidShow the controller GUIDDetects the encoding automatically; smbios, ipmi, rfc4122 or dump can be added to force one.
mc selftestRun the BMC self testHealth check of the controller, based on the self-test results it returns.
mc getenablesShow enabled BMC optionsThe matching setenables command changes them, and only over the system interface.
mc watchdog getShow the watchdog timerPrints the current timer settings and the state of the countdown.
mc watchdog resetRestart the watchdog countdownRestores the timer to its most recent state and starts counting down again.
mc watchdog offStop the watchdog timerTurns off a countdown that is currently running.
mc getsysinfo system_nameRead the stored system nameOther arguments are primary_os_name and os_name, plus two Dell-specific ones.
mc setsysinfo system_name STRINGStore a system name

DCMI power management 9

CommandWhat it does
dcmi discoverDiscover DCMI capabilities
dcmi power readingRead system power draw
dcmi power get_limitShow the power limit
dcmi power set_limit limit WATTSSet the power limit in wattsOther set_limit parameters are action, correction (milliseconds) and sample (seconds).
dcmi power activateActivate the power limitPuts the limit configured with set_limit into force.
dcmi power deactivateDeactivate the power limit
dcmi sensorsList DCMI sensors
dcmi get_temp_readingRead DCMI temperature sensors
dcmi asset_tagShow the asset tagPrints the platform's asset tag; set_asset_tag stores a new one.

Raw commands and scripting 6

CommandWhat it does
raw NETFN CMD DATASend a raw IPMI requestBytes are written as numbers such as 0x0, and the response bytes come back in hex.
raw 0x0 0xfRaw power-on hours queryThe manual's example of a raw request: netfn 0x0, command 0xf returns the POH counter.
-l LUNSet the LUN for raw commands
shellStart the interactive shellRuns several commands in one session, reusing the SDR cache; LAN sessions get periodic keepalives.
exec FILENAMERun commands from a fileOne command per line, written as in the COMMANDS section; # starts a comment.
set hostname HOSTChange the session hostnameVariable used inside shell and exec scripts; username, password, privlvl and port are set the same way.

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

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.