当前位置: 代码迷 >> 综合 >> Linux-系统管理-ipmitool
  详细解决方案

Linux-系统管理-ipmitool

热度:100   发布时间:2023-09-19 13:25:52.0
[root@TL-QD-198 ~]# yum -y install OpenIPMI OpenIPMI-tools#就安装好ipmi的工具了。[root@TL-QD-198 ~]# chkconfig ipmi on
[root@TL-QD-198 ~]# /etc/init.d/ipmi status
[root@TL-QD-198 ~]# /etc/init.d/ipmi start#设置iDRAC的ip信息及启用IPMI网络控制[root@TL-QD-198 ~]# ipmitool -I open lan set 1 ipaddr 10.103.157.62 
Setting LAN IP Address to 10.103.157.62
You have new mail in /var/spool/mail/root
[root@TL-QD-198 ~]# ipmitool -I open lan set 1 defgw ipaddr 10.103.157.254
Setting LAN Default Gateway IP to 10.103.157.254
[root@TL-QD-198 ~]# ipmitool -I open lan set 1 netmask 255.255.255.0
Setting LAN Subnet Mask to 255.255.255.0
[root@TL-QD-198 ~]# ipmitool -I open lan set 1 access on#修改IPMI的snmp信息#设置 SNMP community 串
[root@TL-QD-198 ~]# ipmitool -I open lan set snmp 1 'calvin'#设置 null 用户密码
[root@TL-QD-198 ~]# ipmitool -I open lan set password 1 'calvin'#设置 root 密码
[root@TL-QD-198 ~]# ipmitool -I open user set password 2 'calvin'
You have new mail in /var/spool/mail/root#可以用下免的命令检查刚才设定的值是否正确:
[root@TL-QD-198 ~]# ipmitool -I open lan print 1#在下指令的时候可以用 “-E” ,
[root@TL-QD-198 ~]# ipmitool -I lan -U root -E -H 192.168.111.123 chassis power status
Chassis Power is on#如果要用交互的方式输入密码就用 “-a” 。
[root@TL-QD-198 ~]# ipmitool -I lan -U root -a -H 192.168.111.123 chassis power status
Password:
Chassis Power is on#若想放在 script 内. 可以使用 “-P” 的方式加上密码明文。
[root@TL-QD-198 ~]# ipmitool -I lan -U root -P “新密码” -H 192.168.111.123 chassis power status
Chassis Power is on#其他操作## 开机 – Power On
[root@TL-QD-198 ~]# ipmitool -I lan -U root -E -H 192.168.111.123 chassis power on## 强制断电关机 – Power Off
[root@TL-QD-198 ~]# ipmitool -I lan -U root -E -H 192.168.111.123 chassis power off## 通过操作系统正常关机 – Graceful Shutdown
[root@TL-QD-198 ~]# ipmitool -I lan -U root -E -H 192.168.111.123 chassis power soft## 重新热启动 – Reset System (warm boot)
[root@TL-QD-198 ~]# ipmitool -I lan -U root -E -H 192.168.111.123 chassis power reset## 冷启动 – Power Cycle System (cold boot)
[root@TL-QD-198 ~]# ipmitool -I lan -U root -E -H 192.168.111.123 chassis power cycle#其他信息## 检查电压电流# 
[root@TL-QD-198 ~]# ipmitool -I lan -U root -E -H 192.168.1.101 sdr type "Current"Current | 94h | ok | 10.1 | 2 Amps
Current | 95h | ns | 10.2 | Disabled
System Level | 98h | ok | 7.1 | 245 Watts
## 检查温度状态# 
[root@TL-QD-198 ~]# ipmitool -I lan -U root -E -H 192.168.1.101 sdr type "Temperature"Temp | 01h | ns | 3.1 | Disabled
Temp | 02h | ns | 3.2 | Disabled
Temp | 05h | ns | 10.1 | Disabled
Ambient Temp | 07h | ns | 10.1 | Disabled
Temp | 06h | ns | 10.2 | Disabled
Ambient Temp | 08h | ns | 10.2 | Disabled
Ambient Temp | 0Eh | ok | 7.1 | 16 degrees C
Planar Temp | 0Fh | ns | 7.1 | Disabled
IOH THERMTRIP | 5Dh | ns | 7.1 | Disabled
CPU Temp Interf | 76h | ns | 7.1 | Disabled
Temp | 0Ah | ns | 8.1 | Disabled
Temp | 0Bh | ns | 8.1 | Disabled
Temp | 0Ch | ns | 8.1 | Disabled## 列出 event logs# 
[root@TL-QD-198 ~]# ipmitool -I lan -U root -E -H 192.168.1.101 sel list1 | 01/11/2011 | 11:40:54 | Temperature #0x0e | Upper Non-critical going high2 | 01/01/2011 | 12:32:41 | Temperature #0x0e | Upper Critical going high