服务器如果是debian系统,可以用以下方法查看硬盘的使用时间,从而来判断硬盘的寿命

安装smartmontoos

apt-get install smartmontools

然后运行

smartctl  -A /dev/sda

  1 Raw_Read_Error_Rate     0x000f   200   200   051    Pre-fail  Always       -
       0
  3 Spin_Up_Time            0x0003   220   219   021    Pre-fail  Always       -
       6000
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -
       206
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -
       0
  7 Seek_Error_Rate         0x000f   200   200   051    Pre-fail  Always       -
       0
  9 Power_On_Hours          0x0032   078   078   000    Old_age   Always       -
       16449

 10 Spin_Retry_Count        0x0013   100   100   051    Pre-fail  Always       -
       0
 11 Calibration_Retry_Count 0x0012   100   100   051    Old_age   Always       -
       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -
       204
194 Temperature_Celsius     0x0022   112   091   000    Old_age   Always       -
       40
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -
       0
197 Current_Pending_Sector  0x0012   200   200   000    Old_age   Always       -
       0
198 Offline_Uncorrectable   0x0010   200   200   000    Old_age   Offline      -
       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -
       0
200 Multi_Zone_Error_Rate   0x0009   200   200   051    Pre-fail  Offline      -
       0

 

其中,Power_On_Hours就是硬盘的使用时间了。

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注