IPMI 命令参考?
IPMI command reference?
我管理着大量的服务器,我正在尝试编写一个 bash 脚本来使用 ipmitool 检查它们的 BMC。这就是我正在做的事情的本质:
...
admin=$(ipmitool -U user -P pasw -I lanplus -H $ipmi user list | grep " user " | awk '{print }')
chn=$(ipmitool -U user -P pasw -I lanplus -H 10.100.10.3 channel info | grep -e '^Channel.*info:' | awk '{print }')
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
所以看起来好像可以手动设置它来完成 - 但就这么简单吗?这些命令的作用有参考手册吗?
以下是IPMI规范中[Set In Progress]的说明。
该参数用于指示以下任一参数何时更新,何时更新完成。该位主要用于提醒软件,而不是某些其他软件或实用程序正在对数据进行更改。
实施还可以选择提供“回滚”功能,使用此信息来决定是“回滚”到以前的配置信息,还是接受配置更改。
如果使用,回滚应将所有参数恢复到之前的状态。否则,更改将在写入发生时生效。
如果您的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
我管理着大量的服务器,我正在尝试编写一个 bash 脚本来使用 ipmitool 检查它们的 BMC。这就是我正在做的事情的本质:
...
admin=$(ipmitool -U user -P pasw -I lanplus -H $ipmi user list | grep " user " | awk '{print }')
chn=$(ipmitool -U user -P pasw -I lanplus -H 10.100.10.3 channel info | grep -e '^Channel.*info:' | awk '{print }')
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
所以看起来好像可以手动设置它来完成 - 但就这么简单吗?这些命令的作用有参考手册吗?
以下是IPMI规范中[Set In Progress]的说明。
该参数用于指示以下任一参数何时更新,何时更新完成。该位主要用于提醒软件,而不是某些其他软件或实用程序正在对数据进行更改。
实施还可以选择提供“回滚”功能,使用此信息来决定是“回滚”到以前的配置信息,还是接受配置更改。
如果使用,回滚应将所有参数恢复到之前的状态。否则,更改将在写入发生时生效。
如果您的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