首页 > 系统相关 >Linux系统下如何查看硬盘剩余使用寿命?

Linux系统下如何查看硬盘剩余使用寿命?

时间:2024-07-13 09:59:42浏览次数:18  
标签:self supported 硬盘 Linux test 使用寿命 Offline data SMART

1、使用smartclt命令查看硬盘的smart信息,如以下范例:

smartctl -a /dev/sdb

smartctl 6.5 2016-05-07 r4318 [x86_64-linux-4.14.0-49.15.x86_64] (local build)

Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===

Device Model:     SAMSUNG MZ7LH480HAHQ-00005

Serial Number:     S45PNA0M540908

LU WWN Device Id:    5 002538 e001d842c

Firmware Version:    HXT7404Q

User Capacity:      480,103,981,056 bytes [480 GB]

Sector Sizes:      512 bytes logical, 4096 bytes physical

Rotation Rate:      Solid State Device

Form Factor:      2.5 inches

Device is:        Not in smartctl database [for details use: -P showall]

ATA Version is:     Unknown(0x0ffc), ACS-4 T13/BSR INCITS 529 revision 5

SATA Version is:    SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)

Local Time is:      Tue Oct 19 16:03:51 2021 CST

SMART support is:    Available - device has SMART capability.

SMART support is:    Enabled

=== START OF READ SMART DATA SECTION ===

SMART Status not supported: ATA return descriptor not supported by controller firmware

SMART overall-health self-assessment test result: PASSED

Warning: This result is based on an Attribute check.

General SMART Values:

Offline data collection status:  (0x00)Offline data collection activity

               was never started.

               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:            (    0) seconds.

Offline data collection

capabilities:             (0x53) SMART execute Offline immediate.

                         Auto Offline data collection on/off support.

                   Suspend Offline collection upon new

                   command.

                   No Offline surface scan supported.

                   Self-test supported.

                   No 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:    (   2) minutes.

Extended self-test routine

recommended polling time:    (  35) minutes.

SCT capabilities:         (0x003d)  SCT Status supported.

              SCT Error Recovery Control supported.

              SCT Feature Control supported.

              SCT Data Table supported.

1

 

SMART Error Log Version: 1

No Errors Logged

SMART Self-test log structure revision number 1

No self-tests have been logged.  [To run self-tests, use: smartctl -t]

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.

smartctl -a /dev/sdc

smartctl 6.5 2016-05-07 r4318 [x86_64-linux-4.14.0-49.15.x86_64] (local build)

Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===

Device Model:     SAMSUNG MZ7LH480HAHQ-00005

Serial Number:     S45PNA2MC20956

LU WWN Device Id:   5 002538 e19c1c198

Firmware Version:   HXT7404Q

User Capacity:     480,103,981,056 bytes [480 GB]

Sector Sizes:     512 bytes logical, 4096 bytes physical

Rotation Rate:     Solid State Device

Form Factor:      2.5 inches

Device is:        Not in smartctl database [for details use: -P showall]

ATA Version is:     Unknown(0x0ffc), ACS-4 T13/BSR INCITS 529 revision 5

SATA Version is:    SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)

Local Time is:     Tue Oct 19 16:03:51 2021 CST

SMART support is:   Available - device has SMART capability.

SMART support is:   Enabled

=== START OF READ SMART DATA SECTION ===

SMART Status not supported: ATA return descriptor not supported by controller firmware

SMART overall-health self-assessment test result: PASSED

Warning: This result is based on an Attribute check.

General SMART Values:

Offline data collection status:  (0x00)Offline data collection activity

               was never started.

               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:            (    0) seconds.

Offline data collection

capabilities:                 (0x53) SMART execute Offline immediate.

                  Auto Offline data collection on/off support.

                  Suspend Offline collection upon new

                  command.

                  No Offline surface scan supported.

                  Self-test supported.

                  No 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:    (   2) minutes.

Extended self-test routine

recommended polling time:    (  35) minutes.

SCT capabilities:         (0x003d)  SCT Status supported.

                SCT Error Recovery Control supported.

                SCT Feature Control supported.

                SCT Data Table supported.

2

 

SMART Error Log Version: 1

No Errors Logged

SMART Self-test log structure revision number 1

No self-tests have been logged.  [To run self-tests, use: smartctl -t]

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.

2、三星的硬盘根据smart信息中的177项判断硬盘的剩余寿命,如以下信息:

(1)序列号为:S45PNA0M540908的sdb硬盘,177项的VALUE和WORST都是86,说明硬盘的寿命剩余86%。

Vendor Specific SMART Attributes with Thresholds:

3

 

(2)序列号为:S45PNA2MC20956的sdc硬盘,177项的VALUE和WORST都是92,说明硬盘的寿命剩余92%。

Vendor Specific SMART Attributes with Thresholds:

4

 

标签:self,supported,硬盘,Linux,test,使用寿命,Offline,data,SMART
From: https://blog.csdn.net/qq_27815483/article/details/140252402

相关文章

  • Linux系统下Emulex FC HBA驱动安装及固件升级
    一、下载FCHBA卡驱动下载地址:https://www.broadcom.cn/support/download-search?pg=Legacy+Products&pf=Legacy+FC+Host+Bus+Adapters&pn=LPe16002B+FC+Host+Bus+Adapter&pa=Driver&po=&dk=&pl=&l=false二、下载FCHBA卡固件下载地址:https://www.broadcom.cn......
  • Linux 中 WIFI 和热点的使用
    之前一直在ubuntu的图形界面中使用,突然需要在ARM板上打开热点,一时给弄蒙了,在此记录一下一、网卡命令显示所有网络信息sudoiplinkshow关闭或打开网络sudoiplinksetwlan0downsudoiplinksetwlan0up激活或启动网络sudoifconfigwlan0up设置i......
  • 如何对Linux系统进行基准测试5工具UnixBench
    UnixBenchUnixBench是一款跨平台基准测试工具,用于评估各种类Unix系统(包括Linux、BSD和macOS)的系统性能。它提供了一套全面的测试套件,可评估系统性能的不同方面,包括:系统调用:此测试衡量进行系统调用的开销,系统调用是应用程序与操作系统内核交互的主要方式。文件系统:此测试评......
  • Linux fileformat error: bad interpreter: No such file or directory
    背景在windows下新建的sh文件,copy到linux下有的会报错,一般是格式问题默认情况下windows格式会在段落末尾有CR、LF,但是Unix格式只有LF示例执行sh脚本文件./file.sh-bash:./file.sh:/bin/sh^M:坏的解释器:没有那个文件或目录或者报badinterpreter:Nosuchfileordire......
  • 【Linux】构建项目
    cmake--build<dir>[<options>][--<build-tool-options>]cmake--build--preset<preset>[<options>][--<build-tool-options>]命令选项1、--build<dir>构建项目,这个选项是必须的(除非指定preset)而且必须是第一个。2、--preset<p......
  • Linux权限理解
    Linux用户的概念Linux下有两种用户:超级用户(root)、普通用户。超级用户:可以再linux系统下做任何事情,不受限制普通用户:在linux下做有限的事情。超级用户的命令提示符是“#”,普通用户的命令提示符是“$”。角色切换普通用户切换到超级用户[yuan@VM_0_12_centos......
  • 【香菇带你学Linux】Linux系统中磁盘管理LVM与挂载
    Linux系统中磁盘管理LVM与挂载本文以属于Linux系统基本概念,如果以查找教程教程,解决问题为主,只需要查看本文后半部分。如需要系统性学习请查看本文前半部分。本文操作极容易导致主机无法自动重启,请慎重操作。操作前务必要进行备份操作!文章目录Linux系统中磁盘管理LVM与......
  • 应急响应命令(Linux)
    netstat-anultp查看进程(用来判断开启了哪些服务等)ls-al查看目录下所有文件,包括隐藏文件ls-alt查看目录下所有文件,包括隐藏文件,按时间顺序排序cataccess.log|wc-l查看文件的行数wc-l是查看文件行数的意思cat-eaccess.log|grep1.php查找a......
  • Linux入门---(一)
    VIM编辑器1.一般模式:2.编辑模式3.命令模式:%s/old/new/g替换当前匹配到的所有old为new小tips:......
  • 【Linux】Linux操作系统
    Linux基本指令os概念与定位本节内容:Linux操作系统讲解os概念与定位操作系统(OperatingSystem,简称OS)是管理和控制计算机硬件与软件资源的计算机程序。总的来讲,操作系统是一款做软硬件管理的软件。了解操作系统的同时,需要对计算机上的其他部分有一定的了解:从硬......