找回密码
 注册会员
搜索

本文来自

Linux

Linux

订阅|关注

请添加对本版块的简短描述

297

主题

314

帖子

2343

积分

管理员

Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20

积分
2343

[教程] Linux下查看硬盘通电时间及查看硬盘型号

[复制链接]
跳转到指定楼层
楼主
45200 xiaoxiao 发表于 2016-6-23 21:12:10
检测硬盘型号可用以下命令查看:
  1. dmesg | grep ATA
复制代码




检测硬盘通电时间需要安装smartmontools工具:
http://smartmontools.sourceforge.net/

如果是CentOS直接运行:
  1. yum install smartmontools -y
复制代码

如果是Debian/Ubuntu:
  1. apt-get install smartmontools -y
复制代码



然后输入:
注:如果不行就用df看看硬盘名,把sda换了即可
  1. smartctl -A /dev/sda
复制代码


=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   201   200   021    Pre-fail  Always       -       941
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       84
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   040   040   000    Old_age   Always       -       44316
10 Spin_Retry_Count        0x0032   100   253   000    Old_age   Always       -       0
11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       83
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       76
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       84
194 Temperature_Celsius     0x0022   110   086   000    Old_age   Always       -       33
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   200   200   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       0

其中Power_On_Hours就是硬盘使用小时了!

如果是Power_On_Minutes就是硬盘使用分钟,例如:
  9 Power_On_Minutes        0×0032   201   201   000    Old_age   Always       -       649h+23m



回复

使用道具 举报

快速回复 返回顶部 返回列表