linux命令s---smartctl

文章目录

    • 对硬盘进行健康检测
    • 查看设备详细信息

对硬盘进行健康检测

smartctl -iaH /dev/sdc
linux命令s---smartctl_第1张图片

查看设备详细信息

smartctl -a /dev/sdc

主要有如下关键信息:
Device Model: INTEL SSDSCKJB150G7
Serial Number: PHDW816402EJ150A
User Capacity: 150,039,945,216 bytes [150 GB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Host_Write_GB //表示已经写入的容量

smartctl version 5.38 [x86_64-unknown-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
version 1.3.9 Brainaire/Hikvision, Beijing Copyright (C) 2017-12-12, wangtt

=== START OF INFORMATION SECTION ===
Device Model:     INTEL SSDSCKJB150G7
Serial Number:    PHDW816402EJ150A
LU WWN Device Id: 5 5cd2e4 14f3406dd
Firmware Version: N2010121
User Capacity:    150,039,945,216 bytes [150 GB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotate Rate:      Non-rotating
Form Factor:      M.2
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   10|ACS-3 T13/2161-D revision 5
ATA Standard is:  Not recognized. Minor revision code: 0x6d
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Fri Jun 28 20:19:25 2019 CST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x02) Offline data collection activity
                                        was completed without error.
                                        Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0) The previous self-test routine completed
                                        without error or no self-test has ever 
                                        been run.
Total time to complete Offline 
data collection:                 (   2) seconds.
Offline data collection
capabilities:                    (0x79) SMART execute Offline immediate.
                                        No Auto Offline data collection support.
                                        Suspend Offline collection upon new
                                        command.
                                        Offline surface scan supported.
                                        Self-test supported.
                                        Conveyance Self-test supported.
                                        Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                                        power-saving mode.
                                        Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                                        General Purpose Logging supported.
Short self-test routine 
recommended polling time:        (   1) minutes.
Extended self-test routine
recommended polling time:        (   2) minutes.
Conveyance self-test routine
recommended polling time:        (   2) minutes.
SCT capabilities:              (0x003d) SCT Status supported.
                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0032   100   100   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       7681
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       100
170 Available_Reserved_Space0x0033   100   100   010    Pre-fail  Always       -       0
171 Program_Fail_Ct         0x0032   100   100   000    Old_age   Always       -       0
172 Erase_Fail_Ct           0x0032   100   100   000    Old_age   Always       -       0
174 Unexpected_PowerLoss    0x0032   100   100   000    Old_age   Always       -       85
175 PowerLoss_Protect_Fail  0x0033   100   100   010    Pre-fail  Always       -       17060/9341/129
183 SATA_Downshift_Cnt      0x0032   100   100   000    Old_age   Always       -       0
184 E2E_Err_Detection_Cnt   0x0033   100   100   090    Pre-fail  Always       -       0
187 Uncorrectable_err_Cnt   0x0032   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   067   059   000    Old_age   Always       -       33 (Lifetime Min/Max 22/44)
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       85
194 Temperature_Celsius     0x0022   100   100   000    Old_age   Always       -       42
197 Pending_Sector_Cnt      0x0012   100   100   000    Old_age   Always       -       0
199 UDMA_CRC_Error_Count    0x003e   100   100   000    Old_age   Always       -       0
225 Host_writes             0x0032   100   100   000    Old_age   Always       -       11124
226 Timed_wl_media_wear     0x0032   100   100   000    Old_age   Always       -       2170
227 Timed_wl_hr/w_ratio     0x0032   100   100   000    Old_age   Always       -       9
228 Timed_wl_Timer(Minutes) 0x0032   100   100   000    Old_age   Always       -       460144
232 Available_Reserved_Space0x0033   100   100   010    Pre-fail  Always       -       0
233 Media_Wearout_Indicator 0x0032   098   098   000    Old_age   Always       -       0
234 Thermal_Throttle_Status 0x0032   100   100   000    Old_age   Always       -       0
241 Host_Write_GB           0x0032   100   100   000    Old_age   Always       -       11124
242 Host_Read_GB            0x0032   100   100   000    Old_age   Always       -       1147

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
\# 1  Short offline       Completed without error       00%      6465         -
\# 2  Short offline       Aborted by host               90%      6465         -
\# 3  Short offline       Completed without error       00%      2416         -
\# 4  Short offline       Completed without error       00%      2416         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

你可能感兴趣的:(linux命令)