linux系统查看硬盘的使用时间:+ I- V3 M! m. \9 @, X* K% u) `( t, F
Centos:- yum -y install smartmontools
复制代码 Ubuntu/Debian:- apt-get install smartmontools
复制代码- ATTRIBUTE_NAME
8 E* ^' j# n- ~: \# ]/ r1 {& [) v2 P' ? - Raw_Read_Error_Rate0 l o, r1 x+ w. n# m2 f# y
- Spin_Up_Time6 I& |9 S' Y2 s& ]" B( ]% R9 \
- Start_Stop_Count; i, k1 _ @; ~
- Reallocated_Sector_Ct
. d( N. n5 E' h/ I' E. }+ [! B% _ - Seek_Error_Rate
9 x) e2 z( T6 e! R# E) y8 D - Power_On_Hours
1 m ]. R3 Q. T - Spin_Retry_Count
. R/ u- c: d, W' k# V) O3 D+ }. L - Calibration_Retry_Count0 l+ s- V% Q8 r( ~9 k2 r$ f6 U
- Power_Cycle_Count
& v( K. Z8 @- \& t - G-Sense_Error_RatePower-Off_Retract_Count- X. D" J. Q- l8 h R, a
- Load_Cycle_Count% @' F, A7 M& x* } E8 {, M5 i
- Temperature_Celsius
* ?- W; e1 Y3 H - Reallocated_Event_Count
; r9 p2 H7 { }8 l& K X# D - Current_Pending_Sector
* [3 M5 x# S6 u( z8 I1 Z' r) C - Offline_Uncorrectable
& o7 B+ N( \+ b6 d/ n C - UDMA_CRC_Error_Count
6 m/ o9 |: I% E* v0 ]4 p6 K# H - Multi_Zone_Error_Rate' u2 c) K6 |- H! L
复制代码- Power_On_Hours:是硬盘使用的总时间) v$ @+ v0 h* L
- Load_Cycle_Count:是加载循环计数
4 E& @9 L h* I g/ v K/ K - Temperature_Celsius:硬盘的英文温度
0 z! G, J' ]/ D' U5 ~. } - 直接输入下列命令,查询你所关心的:
, y- Z7 S( C$ l4 r- z7 V - sudo smartctl -a /dev/sda |egrep 'Load_Cycle_Count|Power_On_Hours|Temperature_Celsius'
复制代码
* J+ ~( ]1 l6 {$ o2 ~) t& I* O8 K
7 K8 G0 j2 ^* _3 t |