HP为linux系统提供了两个硬件管理工具:hpacucli 和 hpasmcli 。hpacucli 工具可以查看HP服务器的Raid状态是否正常,服务器硬盘是否正常,服务器电源是否有故障等信息。hpasmcli 工具可以很详细查看服务器CPU,内存,处理器,电源等的温度信息。

一、hpacucli 的安装使用

1、安装

1[root@localhost ~]# rpm -ivh hpacucli-9.40-12.0.x86_64.rpm

2、查看raid和硬盘状态

普通查看

1[root@localhost ~]# hpacucli ctrl all show config
2Smart Array E200i in Slot 0 (Embedded)    (sn: PR97MP2834    )
3  array A (SAS, Unused Space: 0  MB)
4      logicaldrive 1 (558.7 GB, RAID 5, OK)
5      physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 300 GB, OK)
6      physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 300 GB, OK)
7      physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 300 GB, OK)

详细查看,由于输出过多,这里只列出部分关键内容:

 1[root@localhost ~]# hpacucli ctrl all show config detail
 2……
 3Array: A
 4      Interface Type: SAS
 5      Unused Space: 0  MB
 6      Status: OK
 7      Array Type: Data
 8      Logical Drive: 1
 9        Size: 558.7 GB
10        Fault Tolerance: 5
11        Heads: 255
12        Sectors Per Track: 32
13        Cylinders: 65535
14        Strip Size: 64 KB
15        Full Stripe Size: 128 KB
16        Status: OK
17        Caching:  Enabled
18        Parity Initialization Status: Initialization Completed
19        Unique Identifier: 600508B1001038333420202020200004
20        Disk Name: /dev/cciss/c0d0
21        Mount Points: /boot 200 MB, / 542.5 GB
22        OS Status: LOCKED
23        Logical Drive Label: A0100C5FPR97MP2834    2E7A
24        Drive Type: Data
25      physicaldrive 1I:1:2
26        Port: 1I
27        Box: 1
28        Bay: 2
29        Status: OK
30        Drive Type: Data Drive
31        Interface Type: SAS
32        Size: 300 GB
33        Rotational Speed: 10000
34        Firmware Revision: HPDE
35        Serial Number: 6SE24FXD0000B124L36W
36        Model: HP      EG0300FAWHV
37        PHY Count: 2
38        PHY Transfer Rate: 3.0Gbps, Unknown

二、hpasmcli 工具的使用

1、安装

1[root@localhost ~]# rpm -ivh hp-health-9.40-1602.44.rhel6.x86_64.rpm

2、常用功能

1[root@localhost ~]# hpasmcli -s 'show dimm'    查看内存信息
2[root@localhost ~]# hpasmcli -s 'show TEMP'    查看硬件温度
3[root@localhost ~]# hpasmcli -s 'show fans'    查看风扇信息
4[root@localhost ~]# hpasmcli -s 'show powersupply'    查看电源模块
5[root@localhost ~]# hpasmcli -s 'show server'    查看机器型号,序列号,CPU,内存大小

3、帮助

可以 show的类型比较多,可以通过hpasmcli -s ‘show’ 获取可用的参数,具体如下:

 1[root@localhost ~]# hpasmcli -s 'show'
 2Invalid Arguments
 3    SHOW ASR
 4    SHOW BOOT
 5    SHOW DIMM [ SPD ]
 6    SHOW F1
 7    SHOW FANS
 8    SHOW HT
 9    SHOW IML
10    SHOW IPL
11    SHOW NAME
12    SHOW PORTMAP
13    SHOW POWERMETER
14    SHOW POWERSUPPLY
15    SHOW PXE
16    SHOW SERIAL [ BIOS | EMBEDDED | VIRTUAL ]
17    SHOW SERVER
18    SHOW TEMP
19    SHOW TPM
20    SHOW UID
21    SHOW WOL

上面这些输出实际上和直接ssh登陆ilo口里提供的show命令类似。