a) raw:发送一个原始的IPMI请求,并且打印回复信息。
b) Lan:配置网络(lan)信道(channel)
d) event:向BMC发送一个已经定义的事件(event),可用于测试配置的SNMP是否成功
e) mc:查看MC(Management Contollor)状态和各种允许的项
f) sdr:打印传感器仓库中的所有监控项和从传感器读取到的值。
g) Sensor:打印详细的传感器信息。
h) Fru:打印内建的Field Replaceable Unit (FRU)信息
i) Sel:打印 System Event Log (SEL)
j) Pef:设置 Platform Event Filtering (PEF),事件过滤平台用于在监控系统发现有event时候,用PEF中的策略进行事件过滤,然后看是否需要报警。
k) Sol/isol:用于配置通过串口的Lan进行监控
[root@18034 ~]# service ipmi start // 先启动ipmi
Starting ipmi drivers: [确定]
[root@18034 ~]# ipmitool -I open mc info // 先查看下ipmi版本,是2.0没错.
Device ID : 32
Device Revision : 0
Firmware Revision : 1.10
IPMI Version : 2.0
Manufacturer ID : 674
Manufacturer Name : DELL Inc
Product ID : 256 (0x0100)
[root@18034 ~]# ipmitool -I open channel info 1 // 查看通道信息,dell机型基本默认采用channel1,其它机型则不一定.一般在1-7之间。
Channel 0x1 info:
Channel Medium Type : 802.3 LAN // 表示可以使用的通道,channel 1
Channel Protocol Type : IPMB-1.0
Session Support : multi-session
Active Session Count : 0
Protocol Vendor ID : 7154
Volatile(active) Settings
Alerting : disabled
Per-message Auth : disabled
UserLevel Auth : enabled
Access Mode : disabled
Non-Volatile Settings
Alerting : disabled
Per-message Auth : disabled
UserLevel Auth : enabled
Access Mode : disabled
[root@18034 ~]# ipmitool -I open channel info 2 // 看看其它channel?,就没有802.3 lan类型
Channel 0x2 info:
Channel Medium Type : Serial/Modem
Channel Protocol Type : IPMB-1.0
Session Support : single-session
Active Session Count : 0
Protocol Vendor ID : 7154
[root@18034 ~]# ipmitool lan set 1 ipaddr 192.168.180.201 // 1 代表channel
Setting LAN IP Address to 192.168.180.201
[root@18034 ~]# ipmitool lan set 1 netmask 255.255.255.0
Setting LAN Subnet Mask to 255.255.255.0
[root@18034 ~]# ipmitool lan set 1 defgw ipaddr 192.168.180.34
Setting LAN Default Gateway IP to 192.168.180.34
[root@18034 ~]# ipmitool lan print 1 // 查看channel 1的配置信息
Setin Progress : Set Complete
Auth Type Support : NONE MD2 MD5 PASSWORD
Auth Type Enable : Callback : MD2 MD5
: User : MD2 MD5
: Operator : MD2 MD5
: Admin : MD2 MD5
: OEM : MD2 MD5
IP Address Source : Static Address
IP Address : 192.168.180.201
Subnet Mask : 255.255.255.0
MAC Address : 00:24:e8:74:0b:ad
SNMP Community String : public
IP Header : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10
Default Gateway IP : 192.168.180.34
Default Gateway MAC : 00:00:00:00:00:00
Backup Gateway IP : 0.0.0.0
Backup Gateway MAC : 00:00:00:00:00:00
802.1q VLAN ID : Disabled
802.1q VLAN Priority : 0
RMCP+ Cipher Suites : 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14
Cipher Suite Priv Max : aaaaaaaaaaaaaaa
: X=Cipher Suite Unused
: c=CALLBACK
: u=USER
: o=OPERATOR
: a=ADMIN
: O=OEM
[root@18034 ~]# ipmitool usersetname 2 root //创建用户
[root@18034 ~]# ipmitool usersetpassword 2 opendoor //创建密码
[root@18034 ~]# ipmitool channel setaccess 1 2 callin=on ipi=on link=on privilege=4 //开权限
[root@18034 ~]# ipmitool user list 1 // 查看chanenel 1的用户信息
ID Name Callin Link Auth IPMI Msg Channel Priv Limit
2 root truetruetrue ADMINISTRATOR
[root@161 ~]# ipmitool -I open -H 192.168.180.201 -U root -P opendoorc power status //检查远程服务器bmc 状态
Chassis Power ison
[root@161 ~]# ipmitool -I open -H 192.168.180.201 -U root -P opendoor power ?
chassis power Commands: status, on, off, cycle, reset, diag, soft
注: ?代表可填上面几条指令, on/off/reset 开机/关机/重启
ipmitool -I open -H 192.168.180.201 -U root -P opendoor sensor // 这条可获取远端服务器的一些传感器信息,包含 cpu,电压,功率等
[root@18034 ~]# cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relativeto /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00 #
initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=10
#splashp_w_picpath=(hd0,0)/grub/splash.xpm.gz
serial --unit=0 --speed=57600
terminal --timeout=10
hiddenmenu
title #CentOS (2.6.18-308.20.1.el5debug)
root (hd0,0)
kernel /vmlinuz-2.6.18-308.20.1.el5debug ro root=/dev/VolGroup00/LogVol00 console=tty0 console=tty S0,57600
initrd /initrd-2.6.18-308.20.1.el5debug.img
[root@18034 ~]# grep tty /etc/securetty
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11
ttyS0 // 添加grub.conf 里kernel 后面跟的串口信息,为了屏幕信息可以从串口输出
[root@18034 ~]# grep -v "#" /etc/inittab
id:3:initdefault:
si::sysinit:/etc/rc.d/rc.sysinit
l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6
ca::ctrlaltdel:/sbin/shutdown -t3 -r now
pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"
pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"
S0:2345:respawn:/sbin/agetty -h -L 57600 ttyS0 vt100
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6
[root@161 ~]# ipmitool -I lanplus -H 192.168.180.201 -U root -P opendoor sol activate