查询硬盘SMART信息

命令功能

查询指定硬盘的SMART信息。

命令格式

hiraidadm ccontroller_id:eenclosure_id:sslot_id show smart

参数说明

参数

参数说明

取值

controller_id

控制卡的ID。

查询控制卡ID请参见查询控制卡列表

enclosure_id

硬盘所在框位的ID。

查询硬盘所在框位ID请参见查询控制卡硬盘列表

slot_id

硬盘所在槽位的ID。

查询硬盘所在槽位ID请参见查询控制卡硬盘列表

使用指南

回显中主要字段的含义如表1所示。
表1 回显说明

命令格式

硬盘类型

字段

含义

举例

hiraidadm ccontroller_id:eenclosure_id:sslot_id show

SATA

ID

某一检测项目的ID。

1

ATTRIBUTE_NAME

制造商定义的属性值。

Raw_Read_Error_Rate

FLAG

属性操作标志。

0x000b

VALUE

当前值,是各ID项在硬盘运行时根据实测原始数据通过公式计算的结果。253意味着最好情况,1意味着最坏情况。

100

WORST

最差值,硬盘运行时各ID项曾出现过的最小的value。

086

THRESH

临界值,厂商指定的表示某一项目可靠性的门限值。

016

TYPE

属性的类型。prefail意味着硬盘即将发生失效;oldage表示磁盘不会发生故障;

Pre fail

UPDATED

属性更新频率。

Always

RAW_VALUE

制造商定义的原始值,从VALUE派生

0

SAS

请参见Smartctl工具。

使用实例

查询硬盘SMART信息(SATA)。
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
[root@localhost ~]# hiraidadm c0:e0:s0 show smart
========================================== Hiraidadm   Information ===========================================
    Name: hiraidadm
    Version: 1.2.0.2
    Build Time: Nov 15 2022 22:07:55
==============================================================================================================
==============================================================================================================
    Status Code = 0
    Status = Success
    Description = None
==============================================================================================================
              Man-made SMART Attributes with Thresholds
--------------------------------------------------------------------------------------------------------------
ID    ATTRIBUTE_NAME           FLAG     VALUE  WORST  THRESH  TYPE      UPDATED   RAW_VALUE
1     Raw_Read_Error_Rate      0x000b   100    086    016     Pre fail  Always    0
2     Throughput_Performance   0x0005   129    127    054     Pre fail  Offline   104
3     Spin_Up_Time             0x0007   143    100    024     Pre fail  Always    295 (Average 295)
4     Start_Stop_Count         0x0012   100    100    000     Old age   Always    681
5     Reallocated_Sector_Ct    0x0033   100    100    005     Pre fail  Always    25
7     Seek_Error_Rate          0x000b   100    100    067     Pre fail  Always    0
8     Seek_Time_Performance    0x0005   128    128    020     Pre fail  Offline   18
9     Power_On_Hours           0x0012   100    100    000     Old age   Always    4321
10    Spin_Retry_Count         0x0013   100    100    060     Pre fail  Always    0
12    Power_Cycle_Count        0x0032   100    100    000     Old age   Always    681
192   Power-Off_Retract_Count  0x0032   097    097    000     Old age   Always    3702
193   Load_Cycle_Count         0x0012   097    097    000     Old age   Always    3702
194   Temperature_Celsius      0x0002   181    127    000     Old age   Always    33 (Min/Max 19/47)
196   Reallocated_Event_Count  0x0032   100    100    000     Old age   Always    25
197   Current_Pending_Sector   0x0022   100    100    000     Old age   Always    1306
198   Offline_Uncorrectable    0x0008   053    053    000     Old age   Offline   11321
199   UDMA_CRC_Error_Count     0x000a   200    200    000     Old age   Always    0
--------------------------------------------------------------------------------------------------------------
查询硬盘SMART信息(SAS)。
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
[root@localhost ~]# hiraidadm c0:e0:s6 show smart
========================================== Hiraidadm   Information ===========================================
    Name: hiraidadm
    Version: 1.2.2.0
    Build Time: Dec 19 2022 21:45:23
==============================================================================================================
==============================================================================================================
    Status Code = 0
    Status = Success
    Description = None
==============================================================================================================
=== START OF READ SMART DATA SECTION ===
SMART Health Status: OK

Current Drive Temperature:     27 C
Drive Trip Temperature:        65 C

Accumulated power on time, hours:minutes 4575:29
Manufactured in week 08 of year 2020
Specified cycle count over device lifetime:  50000
Accumulated start-stop cycles:  1691
Specified load-unload count over device lifetime:  600000
Accumulated load-unload cycles:  7098
Elements in grown defect list: 0

Error counter log:
           Errors Corrected by           Total   Correction     Gigabytes    Total
               ECC          rereads/    errors   algorithm      processed    uncorrected
           fast | delayed   rewrites  corrected  invocations   [10^9 bytes]  errors
read:      50805        9         0         0          0     304806.171           0
write:         0        0         0         0          0       4452.857           0
verify:        0        0         0         0          0        167.168           0

Non-medium error count:      354

SMART Self Test log
Num  Test              Status                 segment  LifeTime  LBA_first_err [SK ASC ASQ]
     Description                              number   (hours)
# 1  Background long   Completed                   -      22                 - [-   -    -]
# 2  Background short  Completed                   -      20                 - [-   -    -]
# 3  Background long   Completed                   -       9                 - [-   -    -]

Long (extended) Self Test duration: 3917 seconds [65.3 minutes]