利用HP官方提供的hpasm工具包即可检测到服务器的硬件相关状态,起到监控预警作用。
hpasm工具包中,有个工具是hpasmcli,用法如下:
hpasm工具包中,有个工具是hpasmcli,用法如下:
[yejr@imysql ~]# hpasmcli -s 'show' Invalid Arguments SHOW ASR SHOW BOOT SHOW DIMM SHOW F1 SHOW FANS SHOW HT SHOW IML SHOW IPL SHOW NAME SHOW PORTMAP SHOW POWERSUPPLY SHOW PXE SHOW SERIAL [ BIOS | EMBEDDED | VIRTUAL ] SHOW SERVER SHOW TEMP SHOW UID SHOW WOL
其中,重点关注 DIMM(内存)、FANS(风扇)、POWERSUPPLY(电源模块)、SERVER(系统,CPU)、TEMP(温度)。以下是几个列子:
# 查看内存状态
hpasmcli -s 'show dimm'|egrep -i 'module|stat'
Module #: 1
Status: Ok
Module #: 3
Status: Ok
Module #: 5
Status: Ok
Module #: 7
Status: Ok
# 查看温度
[yejr@imysql ~]# hpasmcli -s 'show temp'
Sensor Location Temp Threshold
------ -------- ---- ---------
#0 SYSTEM_BD - -
#1 I/O_ZONE 48C/118F 65C/149F
#2 AMBIENT 20C/68F 40C/104F
#3 CPU#1 41C/105F 95C/203F
#4 CPU#1 41C/105F 95C/203F
#5 POWER_SUPPLY_BAY 30C/86F 60C/140F
#6 CPU#2 41C/105F 95C/203F
#7 CPU#2 41C/105F 95C/203F
# 查看风扇
[yejr@imysql ~]# hpasmcli -s 'show fans'
Fan Location Present Speed of max Redundant Partner Hot-pluggable
--- -------- ------- ----- ------ --------- ------- -------------
#1 POWERSUPPLY_BAY Yes NORMAL 34% Yes 1 No
#2 CPU#2 Yes NORMAL 29% Yes 1 No
#3 CPU#1 Yes NORMAL 37% Yes 1 No