{
    "mode": "man",
    "parameter": "ipmi_sim_cmd",
    "section": "5",
    "url": "https://www.chedong.com/phpMan.php/man/ipmi_sim_cmd/5/json",
    "generated": "2026-10-10T21:17:09Z",
    "sections": {
        "DESCRIPTION": {
            "content": "The ipmisim emulation is set up using these commands.  They can be read from a command file,\nrun from the command line, or executed inside the simulator after it is started.\n\nThis  may  be  a  little confusing, but the network interfaces are configured by the ipmilan\nconfiguration file, and the various management controllers, sensors, etc. are specified using\nthis file.  Plus, this can be used to configure the simulator after it is up, set sensor val‐\nues, inject events, and things of that nature.\n\n",
            "subsections": []
        },
        "GENERAL COMMANDS": {
            "content": "Blank lines and lines starting with `#' are ignored.  Long lines may be broken up by  putting\na '´ at the end of the line to be continued.\n\n\nquit   Exit the simulator\n\n\ninclude \"file\"\nInclude the given file.\n\n\ndefine name \"value\"\n\nDefine  the  given name as a variable with the given value.  This variable may be used\nlater by doing $name.  This cannot be used in quotes, but quotes may be broken up  and\nthe variable put between them.  For instance, if you say:\n\ndefine MCNUM \"40\"\n\nyou can use it later as in\n\nmcadd $MCNUM 1 no-device-sdrs 00  00  00  0xc9  0x009000 0x0002\n\nor\n\nsensoradd $MCNUM 0 21 12 0x6f poll 1000 file \"/sys/dev/sens1-\"$MCNUM\"-1\"\n\n\nsleep time\nPause the command interface for the given number of seconds.  This does not affect the\nexecution of the simulator.\n\n\ndebug options\nSet the debugging output.  Valid options are:\n\nmsg Dump messages.\n\nraw Dump raw I/O\n\nEntering nothing turns of debugging.\n\n\nreadcmds filename\nExecute the commands in the given file.\n\n",
            "subsections": []
        },
        "MC COMMANDS": {
            "content": "mcadd IPMBAddress DeviceID HasDeviceSDRs DeviceRevision MajorFWRev MinorFWRev DeviceSupport\nManufacturerID ProductID\nAdd  an MC to the simulator.  All values are hexadecimal.  These are mostly values for\nthe ``Get Device ID'' command, see the spec for details.  Note that the MC is not  en‐\nabled after being added, you must add it.\n\nNote that some of these values control the capabilities of the MC.  For instance, Has‐\nDeviceSDRs sets whether device SDR repository commands will work.\n\nYou may use has-device-sdrs or no-device-sdrs in the HasDeviceSDRs field.\n\n\nmcaddfrudata mc-addr DeviceID FRUSize (data [byte1 [byte2 [...]]] | file offset filename)\nSet the FRU data for a given MC and device id.  Data may be supplied directly here, or\nit  may  be  given  as a file.  The offset is the start from the beginning of the file\nwhere the data is kept.\n\n\nmcdumpfrudata mc-addr DeviceID\nDump the FRU data for a given MC and device id.\n\n\nmcdelete mc-addr\nRemove the MC from the system.\n\n\nmcdisable mc-addr\nDisable the MC, but don't remove it.\n\n\nmcenable mc-addr\nEnable the given MC.\n\n\nmcsetbmc mc-addr\nSet the BMC's address.\n\n\nmcsetguid mc-addr guid\nSet the GUID value.  The guid may be a string (in quotes) or a hexadecimal string.\n\n\nselenable mc-addr max-entries flags\nEnable the System Event Log on the given MC.  The flags is a  byte  this  is  returned\nfrom  the  ``Get  SEL Info'' command; it controls various aspects of the SEL.  See the\nspec for details.\n\n\nseladd mc-addr RecordType byte1 byte2 ... byte13\nAdd an entry to the MC's SEL.\n\n\nmainsdradd mc-addr byte1 [byte2 [...]]\nAdd an entry to the main SDR of the MC.\n\n\ndevicesdradd mc-addr LUN byte1 [byte2 [...]]\nAdd an entry to the device SDR of the MC.\n\n",
            "subsections": []
        },
        "SENSOR COMMANDS": {
            "content": "sensoradd mc-addr LUN sensor-num sensor-type event-reading-code [poll pollrate polltype\npolltypeoptions] [event-only]\n\nAdd a sensor to the given MC and LUN.  The type of sensor is set by the event  reading\ncode.\n\nIf  poll  is  specified,  then the sensor will be polled for data.  Only the file poll\ntype is currently supported.  The value is a number read from a file.  It has the fol‐\nlowing options, all optional:\n\ndiv=val will divide the read value by the given number.  This is done after the multi‐\nply operation.\n\nmult=val will multiply the read value by the given number.  This  is  done  after  the\nsubtraction.\n\nsub=val will subtract the value by the given number.  This is done after the mask.\n\nmask=val will mask (bitwise and) the value by the given number.\n\nbase=value Specify the base of the value read from the file.  By default this is zero,\nmeaning \"C\" conventions are used.\n\ninitstate=value  sets  what  the  event state is initially set to.  This is useful for\ndiscrete sensors with bits that should normally be set to \"1\", like a presence bit, to\nkeep the program from issuing an event every time the program starts.\n\nraw specifies that the data from the file is a raw value.  Only length bytes are  read\nfrom offset.\n\nascii  specifies  that  the data from the file is in ASCII.  This is the default.  The\noffset value is used, but no the length.\n\nlength=val specifies the length of the data to read from the file.  The maximum  value\nis 4,and this is only used for raw data.\n\ndepends=<mcaddr>,<lun>,<sensornumber>,<bit>  specifies  a  discrete  sensor bit that\nmust be set to 1 for the sensor to be active.  Generally, you use the presence bit  of\na  sensor  to  mark whether other sensors on the device are actually present.  Each of\nthe other sensors would have one of these pointing to the presence bit.\n\nevent-only specifies that the sensor will not  be  readable,  it  will  only  generate\nevents (specified with a type 3 SDR).\n\n\nsensorsetbit mc-addr LUN sensor-num bit-to-set bit-value generate-event\nSet  the  given  bit  to  bit-value  (0 or 1) for the sensor by bit number, either the\nthreshold for analog or the discrete sensor bit.  If generate-event  is  non-zero  and\nthe sensor has events enabled for that bit, then generate an event.\n\n\nsensorsetbitclrrest mc-addr LUN sensor-num bit-to-set bit-value generate-event\nLike sensorsetbit, but automatically clears all other bits.\n\n\nsensorsetvalue mc-addr LUN sensor-num value generate-event\nSet  the byte value for an analog sensor.  If the sensor exceeds a threshold, the sen‐\nsor has events enabled, and generate-event is non-zero, then generate an event for the\ncondition.\n\n\nsensorsethysteresis mc-addr LUN sensor-num support positive negative\nSet the hysteresis capabilities of the sensor.  It must be an analog sensor.  The sup‐\nport value is the hysteresis capability, the same as the hysteresis support  value  in\nthe sensor SDR.  The positive and negative hysteresis values are also set by this com‐\nmand.\n\nThe  support  value may also be none, readable, settable, or fixed instead of the num‐\nbers.\n\n\nsensorsetthreshold mc-addr LUN sensor-num threshold-support threshold-enabled [value5\n[value4 [... [value0]]]]\n\nSet the threshold support for a sensor.  It must be an analog sensor.  The  threshold-\nsupport  value  is  the  same as the threshold access support value in the sensor SDR.\nThe threshold-enabled values is a string of ``0'' and ``1'' characters that enable the\n6 corresponding thresholds; the rightmost value is value 0, the leftmost is  value  5.\nOptionally, the threshold values may be specified as their byte values.\n\nThe  threshold-support value may also be none, readable, settable, or fixed to make it\na bit more readable.  The thresholds are:\n\n0 - lower non critical\n\n1 - lower critical\n\n2 - lower non recoverable\n\n3 - upper non critical\n\n4 - upper critical\n\n5 - upper non recoverable\n\n\nsensorseteventsupport mc-addr LUN sensor-num events-enable scanning event-support assert-\nsupport deassert-support assert-enabled deassert-enabled\n\nSet the event support of a sensor.  The events-enable will enable global events on the\nsensor if non-zero, otherwise they are disabled.  The scanning values set the scanning\nvalue for the sensor.  The event-support value sets the event capabilities in the sen‐\nsor, this is the same as the ``sensor event message control  support''  value  in  the\nsensor  SDR.   The  assert-support, deassert-support, assert-enabled, and deassert-en‐\nabled are all bitmasks (a string of ``0'' and ``1'' characters) that set their  corre‐\nsponding sensor bit's capability to generate events (support) and whether it will gen‐\nerate events now (enabled).\n\nNote  that  all  bitmasks have the rightmost digit as the zeroth bit, and the leftmost\ndigit as the highest order bit.  Note that you must specify 15 bits here, even if  you\ndon't use all of them.\n\nNote  that  you  may use enable or disable in the events-enable field, and you may use\nscanning or no-scanning in the scanning field.\n\nFor event-support, you may use per-state, entire-sensor, global or none instead  of  a\nnumber.\n\nFor a threshold sensor, the values are:\n\n0\n- lower non-critical going low\n\n1\n- lower non-critical going high\n\n2\n- lower critical going low\n\n3\n- lower critical going high\n\n4\n- lower non-recoverable going low\n\n5\n- lower non-recoverable going high\n\n6\n- upper non-critical going low\n\n7\n- upper non-critical going high\n\n8\n- upper critical going low\n\n9\n- upper critical going high\n\n1\n- upper non-recoverable going low\n\n1\n- upper non-recoverable going high\n\nNote that the \"lower going high\" and \"upper going low\" values are not supported, since\nthey are simply stupid.\n\n\n",
            "subsections": []
        },
        "ATCA OEM COMMANDS": {
            "content": "These are for emulation of special ATCA capabilities.\n\n",
            "subsections": [
                {
                    "name": "atca_enable",
                    "content": "The system is an ATCA system, enables the other ATCA capabilities.\n\nNote  that  you should do this *before* creating any MCs (this should really be first)\nbecause the MCs are set up a little differently for ATCA mode.  This causes the MCs to\nbe able to handle PICMG commands properly, sets up 2  LEDs  by  default,  and  enables\nproper  hot-swap  handling,  including the blue LED.  By default the blue LED supports\nlocal control and the other LEDs do not and are red.\n\nIn  ATCA  mode,  to  drive  the  hot-swap  state  machine,   you   should   use   sen‐\nsorsetbitclrrest to set the hot-swap state.\n\n\natcasetsite hardware-address site-type site-number\nSets  the given values for an ATCA system, the values returned by the get address com‐\nmands.\n\n\nmcsetnumleds mc-addr count\nSet the number of ATCA LEDs the MC has.\n\n\nmcsetpower mc-addr power gen-event\nSet the ATCA power setting for the MC as its numeric value.  If gen-event is non-zero,\ngenerate an event for the change.\n\n"
                }
            ]
        },
        "FILES": {
            "content": "/etc/ipmi/lan.conf\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "ipmisim(1)\n\n",
            "subsections": []
        },
        "KNOWN PROBLEMS": {
            "content": "IPMI is unnecessarily complicated.  Hords of capabilities are not yet implemented.\n\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Corey Minyard <cminyard@mvista.com>\n\nOpenIPMI                                      06/26/12                               ipmisimcmd(5)",
            "subsections": []
        }
    },
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "ipmisim",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ipmisim/1/json"
        }
    ]
}