ipmi_sim_cmd(5)
π ipmi_sim_cmd(5) β IPMI LAN Simulator commands π
β¨ DESCRIPTION β¨
okay so bestie, the ipmi_sim emulation is set up using these commands. They can be read from a command file, run from the command line, or executed inside the simulator after it is started.
This may be a little confusing, but the network interfaces are configured by the ipmi_lan configuration file, and the various management controllers, sensors, etc. are specified using this file. Plus, this can be used to configure the simulator after it is up, set sensor values, inject events, and things of that nature.
π GENERAL COMMANDS π
Blank lines and lines starting with # are ignored. Long lines may be broken up by putting a 'Β΄ at the end of the line to be continued.
quitβ Exit the simulator.include "file"β Include the given file.define name "value"β Define the given name as a variable with the given value. This variable may be used later by doing$name. This cannot be used in quotes, but quotes may be broken up and the variable put between them. For instance, if you say:
define MCNUM "40"
you can use it later as in
mc_add $MCNUM 1 no-device-sdrs 00 00 00 0xc9 0x009000 0x0002
or
sensor_add $MCNUM 0 21 12 0x6f poll 1000 file "/sys/dev/sens1-"$MCNUM"-1"
sleep timeβ Pause the command interface for the given number of seconds. This does not affect the execution of the simulator.debug optionsβ Set the debugging output. Valid options are:msgβ Dump messages.rawβ Dump raw I/O. Entering nothing turns of debugging.
read_cmds filenameβ Execute the commands in the given file.
πΈ MC COMMANDS πΈ
mc_add IPMBAddress DeviceID HasDeviceSDRs DeviceRevision MajorFWRev MinorFWRev DeviceSupport ManufacturerID ProductIDβ Add an MC to the simulator. All values are hexadecimal. These are mostly values for the ``Get Device ID'' command, see the spec for details. Note that the MC is not enabled after being added, you must add it.
Note that some of these values control the capabilities of the MC. For instance, HasDeviceSDRs sets whether device SDR repository commands will work.
You may use has-device-sdrs or no-device-sdrs in the HasDeviceSDRs field.
mc_add_fru_data mc-addr DeviceID FRUSize (data [byte1 [byte2 [...]]] | file offset filename)β Set the FRU data for a given MC and device id. Data may be supplied directly here, or it may be given as a file. Theoffsetis the start from the beginning of the file where the data is kept.mc_dump_fru_data mc-addr DeviceIDβ Dump the FRU data for a given MC and device id.mc_delete mc-addrβ Remove the MC from the system.mc_disable mc-addrβ Disable the MC, but don't remove it.mc_enable mc-addrβ Enable the given MC.mc_setbmc mc-addrβ Set the BMC's address.mc_set_guid mc-addr guidβ Set the GUID value. Theguidmay be a string (in quotes) or a hexadecimal string.sel_enable mc-addr max-entries flagsβ Enable the System Event Log on the given MC. Theflagsis a byte this is returned from the ``Get SEL Info'' command; it controls various aspects of the SEL. See the spec for details.sel_add mc-addr RecordType byte1 byte2 ... byte13β Add an entry to the MC's SEL.main_sdr_add mc-addr byte1 [byte2 [...]]β Add an entry to the main SDR of the MC.device_sdr_add mc-addr LUN byte1 [byte2 [...]]β Add an entry to the device SDR of the MC.
π¦ SENSOR COMMANDS π¦
sensor_add mc-addr LUN sensor-num sensor-type event-reading-code [poll poll_rate poll_type poll_type_options] [event-only]β Add a sensor to the given MC and LUN. The type of sensor is set by the event reading code.
If poll is specified, then the sensor will be polled for data. Only the file poll type is currently supported. The value is a number read from a file. It has the following options, all optional:
div=valβ will divide the read value by the given number. This is done after the multiply operation.mult=valβ will multiply the read value by the given number. This is done after the subtraction.sub=valβ will subtract the value by the given number. This is done after the mask.mask=valβ will mask (bitwise and) the value by the given number.base=valueβ Specify the base of the value read from the file. By default this is zero, meaning "C" conventions are used.initstate=valueβ sets what the event state is initially set to. This is useful for discrete sensors with bits that should normally be set to "1", like a presence bit, to keep the program from issuing an event every time the program starts.rawβ specifies that the data from the file is a raw value. Onlylengthbytes are read fromoffset.asciiβ specifies that the data from the file is in ASCII. This is the default. Theoffsetvalue is used, but no thelength.length=valβ specifies the length of the data to read from the file. The maximum value is 4, and this is only used for raw data.depends=<mc_addr>,<lun>,<sensor_number>,<bit>β specifies a discrete sensor bit that must be set to 1 for the sensor to be active. Generally, you use the presence bit of a sensor to mark whether other sensors on the device are actually present. Each of the other sensors would have one of these pointing to the presence bit.
event-only specifies that the sensor will not be readable, it will only generate events (specified with a type 3 SDR).
sensor_set_bit mc-addr LUN sensor-num bit-to-set bit-value generate-eventβ Set the given bit tobit-value(0 or 1) for the sensor by bit number, either the threshold for analog or the discrete sensor bit. Ifgenerate-eventis non-zero and the sensor has events enabled for that bit, then generate an event.sensor_set_bit_clr_rest mc-addr LUN sensor-num bit-to-set bit-value generate-eventβ Likesensor_set_bit, but automatically clears all other bits.sensor_set_value mc-addr LUN sensor-num value generate-eventβ Set the byte value for an analog sensor. If the sensor exceeds a threshold, the sensor has events enabled, andgenerate-eventis non-zero, then generate an event for the condition.sensor_set_hysteresis mc-addr LUN sensor-num support positive negativeβ Set the hysteresis capabilities of the sensor. It must be an analog sensor. Thesupportvalue is the hysteresis capability, the same as the hysteresis support value in the sensor SDR. Thepositiveandnegativehysteresis values are also set by this command.
The support value may also be none, readable, settable, or fixed instead of the numbers.
sensor_set_threshold mc-addr LUN sensor-num threshold-support threshold-enabled [value5 [value4 [... [value0]]]]β Set the threshold support for a sensor. It must be an analog sensor. Thethreshold-supportvalue is the same as the threshold access support value in the sensor SDR. Thethreshold-enabledvalues is a string of0'' and1'' characters that enable the 6 corresponding thresholds; the rightmost value is value 0, the leftmost is value 5. Optionally, the threshold values may be specified as their byte values.
The threshold-support value may also be none, readable, settable, or fixed to make it a bit more readable. The thresholds are:
0β lower non critical1β lower critical2β lower non recoverable3β upper non critical4β upper critical5β upper non recoverable
sensor_set_event_support mc-addr LUN sensor-num events-enable scanning event-support assert-support deassert-support assert-enabled deassert-enabledβ Set the event support of a sensor. Theevents-enablewill enable global events on the sensor if non-zero, otherwise they are disabled. Thescanningvalues set the scanning value for the sensor. Theevent-supportvalue sets the event capabilities in the sensor, this is the same as thesensor event message control support'' value in the sensor SDR. The `assert-support`, `deassert-support`, `assert-enabled`, and `deassert-enabled` are all bitmasks (a string of0'' and ``1'' characters) that set their corresponding sensor bit's capability to generate events (support) and whether it will generate events now (enabled).
Note that all bitmasks have the rightmost digit as the zeroth bit, and the leftmost digit as the highest order bit. Note that you must specify 15 bits here, even if you don't use all of them.
Note that you may use enable or disable in the events-enable field, and you may use scanning or no-scanning in the scanning field.
For event-support, you may use per-state, entire-sensor, global or none instead of a number.
For a threshold sensor, the values are:
0β lower non-critical going low1β lower non-critical going high2β lower critical going low3β lower critical going high4β lower non-recoverable going low5β lower non-recoverable going high6β upper non-critical going low7β upper non-critical going high8β upper critical going low9β upper critical going high1β upper non-recoverable going low1β upper non-recoverable going high
Note that the "lower going high" and "upper going low" values are not supported, since they are simply stupid.
π ATCA OEM COMMANDS π
ok bestie these ones are for emulating the special ATCA capabilities, like the fancy telecom shelf stuff. niche but iconic.
atca_enableβ okay so this makes your system an ATCA system, which turns on all the other ATCA capabilities. πΈ
bestie, please please please run this before you create any MCs (like, it should genuinely be the very first thing you do) because the MCs get set up a lil differently in ATCA mode. Doing it this way means the MCs can handle PICMG commands the way they're supposed to, sets up 2 LEDs by default, and enables proper hot-swap handling, blue LED included. β¨ By default the blue LED supports local control and the other LEDs do not β and they're red. π¨
And in ATCA mode, if you wanna drive the hot-swap state machine, use sensor_set_bit_clr_rest to set the hot-swap state. that's the move. π
atca_set_sitehardware-address site-type site-number β sets those given values for an ATCA system, i.e. the values that come back from the get address commands. πmc_set_num_ledsmc-addr count β sets the number of ATCA LEDs the MC has. how many lil lights bestie π‘mc_set_powermc-addr power gen-event β sets the ATCA power setting for the MC as its numeric value. If gen-event is non-zero, it generates an event for the change. β‘
π FILES π
/etc/ipmi/lan.conf
π SEE ALSO π
π KNOWN PROBLEMS π
IPMI is unnecessarily complicated. Hords of capabilities are not yet implemented. that's it, that's the tea π
π AUTHOR π
Corey Minyard <cminyard@mvista.com>
and that's a wrap bestie π this page came from OpenIPMI, dated 06/26/12, and it's the ipmi_sim_cmd(5) manual β go forth and configure your sim like the main character you are π
β¨
π¦ where this page comes from
- alpine 3.24: openipmi-doc 2.0.36-r1 Β· LGPL-2.0-or-later and GPL-2.0-or-later or BSD-3-Clause
- arch rolling: openipmi 2.0.37-4 Β· LGPL2.1
- centos-stream 10: OpenIPMI-lanserv 2.0.36-3.el10 Β· LGPL-2.1-or-later AND GPL-2.0-or-later OR BSD-3-Clause
- centos-stream 9: OpenIPMI-lanserv 2.0.36-1.el9 Β· LGPLv2+ and GPLv2+ or BSD
- centos-stream 9: OpenIPMI-lanserv 2.0.36-1.el9 Β· LGPLv2+ and GPLv2+ or BSD
- debian bookworm: openipmi 2.0.33-1+b1 Β· LGPL
- debian trixie: openipmi 2.0.37-1 Β· LGPL-2.0-only
- fedora 43: OpenIPMI-lanserv 2.0.36-3.fc43 Β· LGPL-2.1-or-later and GPL-2.0-or-later or BSD-3-Clause
- fedora 43: OpenIPMI-lanserv 2.0.36-3.fc43 Β· LGPL-2.1-or-later and GPL-2.0-or-later or BSD-3-Clause
- fedora 44: OpenIPMI-lanserv 2.0.36-7.fc44 Β· LGPL-2.1-or-later and GPL-2.0-or-later or BSD-3-Clause
- fedora 44: OpenIPMI-lanserv 2.0.36-7.fc44 Β· LGPL-2.1-or-later and GPL-2.0-or-later or BSD-3-Clause
- nixpkgs unstable: OpenIPMI 2.0.37
- opensuse-leap 16.0: OpenIPMI 2.0.36.56+git.0a3a991-160000.3.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: OpenIPMI 2.0.36.56+git.0a3a991-160000.3.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: OpenIPMI 2.0.36.56+git.0a3a991-160000.3.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: OpenIPMI 2.0.36.56+git.0a3a991-160000.3.1 Β· LGPL-2.1-or-later
- ubuntu jammy: openipmi 2.0.29-0.1ubuntu6 Β· LGPL
- ubuntu noble: openipmi 2.0.33-1.1build3 Β· LGPL
- ubuntu questing: openipmi 2.0.37-1
- ubuntu resolute: openipmi 2.0.37-1build1 Β· LGPL-2.0-only
- ubuntu stonking: openipmi 2.0.37-1ubuntu3 Β· LGPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms