IPMI命令参考?

时间:2019-06-25 09:13:16

标签: ipmi

我管理大量服务器,并且我试图编写一个bash脚本以使用ipmitool检查其BMC。这是我正在做的事情的本质:

...
admin=$(ipmitool -U user -P pasw -I lanplus -H $ipmi user list | grep " user " | awk '{print $1}')
chn=$(ipmitool -U user -P pasw -I lanplus -H 10.100.10.3 channel info | grep -e '^Channel.*info:' | awk '{print $2}')
ipmitool -U user -P pasw -I lanplus -H $ipmi user priv $admin 4 $chn
ipmitool -U user -P pasw -I lanplus -H $ipmi channel setaccess $chn $admin callin=on ipmi=on link=on privilege=4
ipmitool -U user -P pasw -I lanplus -H $ipmi sol payload enable $chn $admin
ipmitool -U user -P pasw -I lanplus -H $ipmi sol set volatile-bit-rate 115.2 $chn
ipmitool -U user -P pasw -I lanplus -H $ipmi sol set non-volatile-bit-rate 115.2 $chn
ipmitool -U user -P pasw -I lanplus -H $ipmi sol looptest 1
...

在我到达sol set ...命令之前,一切正常,该命令失败:

Error setting SOL parameter 'set-in-progress': Attempt to set set-in-progress when not in set-complete state
Error: set of parameter "volatile-bit-rate" failed

从ipmi shell看sol set ...

ipmitool -U user -P pasw -I lanplus -H $ipmi shell

我知道:

ipmitool> sol set

SOL set usage: 

  sol set <parameter> <value> [channel] [noguard]


SOL set parameters and values: 

  set-in-progress             set-complete | set-in-progress | commit-write
  enabled                     true | false
  force-encryption            true | false
  force-authentication        true | false
  privilege-level             user | operator | admin | oem
  character-accumulate-level  <in 5 ms increments>
  character-send-threshold    N
  retry-count                 N
  retry-interval              <in 10 ms increments>
  non-volatile-bit-rate       serial | 9.6 | 19.2 | 38.4 | 57.6 | 115.2
  volatile-bit-rate           serial | 9.6 | 19.2 | 38.4 | 57.6 | 115.2

看起来好像可以手动将其设置为完成-那样简单吗?这些命令有参考手册吗?

1 个答案:

答案 0 :(得分:1)

以下是IPMI规范中的[设置进行中]的说明。

此参数用于指示何时更新以下任何参数以及何时完成更新。该位主要用于警告软件,而不是某些其他软件或实用程序正在更改数据。

实现也可以选择提供“回滚”功能,该功能使用此信息来决定是“回滚”到先前的配置信息还是接受配置更改。

如果使用,回滚应将所有参数恢复到其先前状态。否则,该更改应在写入发生时生效。


如果您的BMC支持此功能,则设置顺序如下:

ipmitool sol set set-in-progress set-in-progress
ipmitool sol set xxxx
ipmitool sol set set-in-progress commit-write
ipmitool sol set set-in-progress set-complete

IPMI规范:https://www.intel.com/content/www/us/en/servers/ipmi/ipmi-second-gen-interface-spec-v2-rev1-1.html