Linux 查看硬盘通电时间
-
今天买了台9刀的便宜(垃圾)独服,通上电,想看看硬盘用了多久。就顺手记录一下 Linux 下查看硬盘通电时间的操作吧,其实也比较简单。
查看硬盘通电时间
Ubuntu / Debian:
apt install smartmontools smartctl -A /dev/sda
CentOS:yum install smartmontools smartctl -A /dev/sda
其中
/dev/sda
是硬盘编号,第一块一般是/dev/sda
,如果有多块硬盘,第二块就是/dev/sdb
,以此类推。报告说明
一般我们会看到如下的输出:
root@185a140b120c93:~# smartctl -A /dev/sda smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.13.11-041311-generic] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org === START OF READ SMART DATA SECTION === SMART Attributes Data Structure revision number: 10 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x0033 120 120 050 Pre-fail Always - 0/0 5 Retired_Block_Count 0x0033 100 100 003 Pre-fail Always - 0 9 Power_On_Hours_and_Msec 0x0032 076 076 000 Old_age Always - 21343h+10m+10.810s 12 Power_Cycle_Count 0x0032 081 081 000 Old_age Always - 19663 171 Program_Fail_Count 0x000a 000 000 000 Old_age Always - 0 172 Erase_Fail_Count 0x0032 000 000 000 Old_age Always - 0 174 Unexpect_Power_Loss_Ct 0x0030 000 000 000 Old_age Offline - 19660 177 Wear_Range_Delta 0x0000 000 000 000 Old_age Offline - 4 181 Program_Fail_Count 0x000a 000 000 000 Old_age Always - 0 182 Erase_Fail_Count 0x0032 000 000 000 Old_age Always - 0 187 Reported_Uncorrect 0x0012 100 100 000 Old_age Always - 0 189 Airflow_Temperature_Cel 0x0000 029 060 000 Old_age Offline - 29 (Min/Max -22/60) 194 Temperature_Celsius 0x0022 029 060 000 Old_age Always - 29 (Min/Max -22/60) 195 ECC_Uncorr_Error_Count 0x001c 120 120 000 Old_age Offline - 0/0 196 Reallocated_Event_Count 0x0033 100 100 003 Pre-fail Always - 0 201 Unc_Soft_Read_Err_Rate 0x001c 120 120 000 Old_age Offline - 0/0 204 Soft_ECC_Correct_Rate 0x001c 120 120 000 Old_age Offline - 0/0 230 Life_Curve_Status 0x0013 100 100 000 Pre-fail Always - 100 231 SSD_Life_Left 0x0013 026 026 010 Pre-fail Always - 0 233 SandForce_Internal 0x0032 000 000 000 Old_age Always - 128184 234 SandForce_Internal 0x0032 000 000 000 Old_age Always - 189875 241 Lifetime_Writes_GiB 0x0032 000 000 000 Old_age Always - 189875 242 Lifetime_Reads_GiB 0x0032 000 000 000 Old_age Always - 64285
其中的“9”,“Power_On_Hours_and_Msec”,就是硬盘通电时间,可以看到我这块硬盘已经通电 21343h+10m+10.810s,算下来有两年半了,真是垃圾。
推荐阅读
- 上一篇: Linux查看独立服务器硬盘信息(通电时间)
- 下一篇: Linux执行Shell脚本的4种方法
文章标签:
版权声明: 本文除特别说明外均由 麒麟在线 原创
本文链接: https://www.70ol.com/jishu/35.html,尊重共享,欢迎转载,请自觉添加本文链接,谢谢!
分享本文: 请填写您的分享代码。
呃 本文暂时没人评论 来添加一个吧
发表评论