Linux命令行获取HP iLo配置信息

安装命令行工具

#yum install hponcfg

测试一下

#hponcfg -g

输出如下

HP Lights-Out Online Configuration utility
Version 4.1.0 Date 1/3/2013 (c) Hewlett-Packard Company, 2013
Firmware Revision = 1.81 Device type = iLO 2 Driver name = hpilo
Host Information:
Server Name: DL380G5PXXXX
Server Number: 000000000

编辑一个xml文件

# cat getinfo.xml
<RIBCL VERSION="2.0">
<LOGIN USER_LOGIN='yourusername' PASSWORD='yourpassword'>
<RIB_INFO MODE="read">
<GET_NETWORK_SETTINGS/>
</RIB_INFO>
</LOGIN>
</RIBCL>

执行命令

#hponcfg -f getinfo.xml

输出如下

HP Lights-Out Online Configuration utility
Version 4.1.0 Date 1/3/2013 (c) Hewlett-Packard Company, 2013
Firmware Revision = 1.81 Device type = iLO 2 Driver name = hpilo
<GET_NETWORK_SETTINGS>
<ENABLE_NIC VALUE="Y"/>
<SHARED_NETWORK_PORT VALUE="N"/>
<VLAN ENABLED="N"/>
<VLAN_ID VALUE="0"/>
<SPEED_AUTOSELECT VALUE="Y"/>
<NIC_SPEED VALUE="10"/>
<FULL_DUPLEX VALUE="N"/>
<DHCP_ENABLE VALUE="N"/>
<DHCP_GATEWAY VALUE="Y"/>
<DHCP_DNS_SERVER VALUE="Y"/>
<DHCP_WINS_SERVER VALUE="Y"/>
<DHCP_STATIC_ROUTE VALUE="Y"/>
<DHCP_DOMAIN_NAME VALUE="Y"/>
<REG_WINS_SERVER VALUE="Y"/>
<REG_DDNS_SERVER VALUE="Y"/>
<PING_GATEWAY VALUE="N"/>
<MAC_ADDRESS VALUE="00:1e:0b:d9:a8:7a"/>
<IP_ADDRESS VALUE="10.15.xxx.xxx"/>
<SUBNET_MASK VALUE="255.255.254.0"/>
<GATEWAY_IP_ADDRESS VALUE="10.15.xxx.1"/>
<DNS_NAME VALUE="ILOCNGxxxxxxx"/>
<DOMAIN_NAME VALUE=""/>
<PRIM_DNS_SERVER VALUE="0.0.0.0"/>
<SEC_DNS_SERVER VALUE="0.0.0.0"/>
<TER_DNS_SERVER VALUE="0.0.0.0"/>
<PRIM_WINS_SERVER VALUE="0.0.0.0"/>
<SEC_WINS_SERVER VALUE="0.0.0.0"/>
<STATIC_ROUTE_1 DEST="0.0.0.0"
GATEWAY="0.0.0.0"/>
<STATIC_ROUTE_2 DEST="0.0.0.0"
GATEWAY="0.0.0.0"/>
<STATIC_ROUTE_3 DEST="0.0.0.0"
GATEWAY="0.0.0.0"/>
</GET_NETWORK_SETTINGS>