linux smartctl 命令,Linux下硬盘检测工具smartmontools(smartctl)使用方法

linux smartctl 命令,Linux下硬盘检测工具smartmontools(smartctl)使用方法安装:yuminstallsmartmontoolshelp:#smartctl–helpsmartctlversion5.38[i686-redhat-linux-gnu]Copyright(C)2002-8BruceAllenHomepageishttp://smartmontools.sourceforge.net/Usage:smartctl[options…

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE稳定放心使用

安装:

yum install smartmontools

help:

#smartctl –help

smartctl version 5.38 [i686-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen

Home page is http://smartmontools.sourceforge.net/

Usage: smartctl [options] device

============================================ SHOW INFORMATION OPTIONS =====

-h, –help, –usage

Display this help and exit

-V, –version, –copyright, –license

Print license, copyright, and version information and exit

-i, –info

Show identity information for device

-a, –all

Show all SMART information for device

================================== SMARTCTL RUN-TIME BEHAVIOR OPTIONS =====

-q TYPE, –quietmode=TYPE (ATA)

Set smartctl quiet mode to one of: errorsonly, silent, noserial

-d TYPE, –device=TYPE

Specify device type to one of: ata, scsi, marvell, sat, 3ware,N

-T TYPE, –tolerance=TYPE (ATA)

Tolerance: normal, conservative, permissive, verypermissive

-b TYPE, –badsum=TYPE (ATA)

Set action on bad checksum to one of: warn, exit, ignore

-r TYPE, –report=TYPE

Report transactions (see man page)

-n MODE, –nocheck=MODE (ATA)

No check if: never, sleep, standby, idle (see man page)

============================== DEVICE FEATURE ENABLE/DISABLE COMMANDS =====

-s VALUE, –smart=VALUE

Enable/disable SMART on device (on/off)

-o VALUE, –offlineauto=VALUE (ATA)

Enable/disable automatic offline testing on device (on/off)

-S VALUE, –saveauto=VALUE (ATA)

Enable/disable Attribute autosave on device (on/off)

======================================= READ AND DISPLAY DATA OPTIONS =====

-H, –health

Show device SMART health status

-c, –capabilities (ATA)

Show device SMART capabilities

-A, –attributes

Show device SMART vendor-specific Attributes and values

-l TYPE, –log=TYPE

Show device log. TYPE: error, selftest, selective, directory,

background, scttemp[sts,hist]

-v N,OPTION , –vendorattribute=N,OPTION (ATA)

Set display OPTION for vendor Attribute N (see man page)

-F TYPE, –firmwarebug=TYPE (ATA)

Use firmware bug workaround: none, samsung, samsung2,

samsung3, swapid

-P TYPE, –presets=TYPE (ATA)

Drive-specific presets: use, ignore, show, showall

============================================ DEVICE SELF-TEST OPTIONS =====

-t TEST, –test=TEST

Run test. TEST: offline short long conveyance select,M-N

pending,N afterselect,[on|off] scttempint,N[,p]

-C, –captive

Do test in captive mode (along with -t)

-X, –abort

Abort any non-captive test on device

=================================================== SMARTCTL EXAMPLES =====

smartctl –all /dev/hda (Prints all SMART information)

smartctl –smart=on –offlineauto=on –saveauto=on /dev/hda

(Enables SMART on first disk)

smartctl –test=long /dev/hda (Executes extended disk self-test)

smartctl –attributes –log=selftest –quietmode=errorsonly /dev/hda

(Prints Self-Test & Attribute errors)

smartctl –all –device=3ware,2 /dev/sda

smartctl –all –device=3ware,2 /dev/twe0

smartctl –all –device=3ware,2 /dev/twa0

(Prints all SMART info for 3rd ATA disk on 3ware RAID controller)

smartctl –all –device=hpt,1/1/3 /dev/sda

(Prints all SMART info for the SATA disk attached to the 3rd PMPort

of the 1st channel on the 1st HighPoint RAID controller)

简单用法:

1、smartctl -a 检查该设备是否已经打开SMART技术。

2、smartctl -s on 如果没有打开SMART技术,使用该命令打开SMART技术。

3、smartctl -t short 后台检测硬盘,消耗时间短;

smartctl -t long 后台检测硬盘,消耗时间长;

smartctl -C -t short 前台检测硬盘,消耗时间短;

smartctl -C -t long 前台检测硬盘,消耗时间长。其实就是利用硬盘SMART的自检程序。

4、smartctl -X 中断后台检测硬盘。

5、smartctl -l selftest 显示硬盘检测日志。

6、smartctl -l error 显示硬盘错误汇总。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/184632.html原文链接:https://javaforall.net

赞 (0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • Android应用setContentView与LayoutInflater加载解析机制源码分析

    Android应用setContentView与LayoutInflater加载解析机制源码分析【工匠若水http://blog.csdn.net/yanbober转载烦请注明出处,尊重分享成果】1背景其实之所以要说这个话题有几个原因:理解xml等控件是咋被显示的原理,通常大家写代码都是直接在onCreate里setContentView就完事,没怎么关注其实现原理。前面分析《Android触摸屏事件派发机制详解与源码分析三(Activity篇)》时提到了一些关于布局嵌套的问题,当

    2022年6月26日
  • 程序员斗图专用表情包,做技术群里最靓的仔!「建议收藏」

    程序员斗图专用表情包,做技术群里最靓的仔!「建议收藏」我们斗图的,不是!我们搞技术的,每天在群里面除了不聊技术,什么都聊!今天小编收集了一堆程序员专用的斗图表情!!分分钟成为一名程序员中的斗图大神!虽然工作敲代码挺枯燥的,要是有了这些神图,就增加很多欢乐了,用图碾压对方,这个爽哦~~哈哈,废话截止,你用的最多的是哪张表情呢?我自己是一名从事了5年前端的老程序员,辞职目前在做讲师,今年年初我花了一个月整理了一份最适合2019年学习的web前…

    2022年11月1日
  • 笔记:基于DCNN的图像语义分割综述

    笔记:基于DCNN的图像语义分割综述写在前面:一篇魏云超博士的综述论文,完整题目为《基于DCNN的图像语义分割综述》,在这里选择性摘抄和理解,以加深自己印象,同时达到对近年来图像语义分割历史学习和了解的目的,博古才能通今!感兴趣的请根据自己情况找来完整文章阅读学习。 图像的语义分割是计算机视觉中重要的基本问题之一,其目标是对图像的每个像素点进行分类,将图像分割为若干个视觉上有意义的或感兴趣的区域,以利于后续的图像分析和视觉理解.…

    2022年5月22日
  • raid 5 raid 10_u盘损坏了还能恢复吗

    raid 5 raid 10_u盘损坏了还能恢复吗介绍:RAID0技术把多块物理硬盘设备(至少两块)通过硬件或软件的方式串联在一起,组成一个大的卷组,并将数据依次写入到各个物理硬盘中。这样一来,在最理想的状态下,硬盘设备的读写性能会提升数倍

    2022年8月3日
  • 在 IDEA 中使用 Git 图文教程

    在 IDEA 中使用 Git 图文教程在IDEA中使用Git图文教程1.配置Git2.创建项目远程仓库3.初始化本地仓库3.连接远程仓库4.提交到本地仓库5.推送到远程仓库6.克隆远程仓库到本地7.分支操作8.总结1.配置Git想要在IDEA中使用Git,首先就需要在IDEA工具中对Git进行相关的配置。打开IDEA设置,之后按照下面图片中的步骤进行操作即可。需要注意的是,在PathGitexecutbale中,也就是设置Git可执行路径中,找到本机电脑上Git的安装位置,

    2022年6月22日
  • win10修改dns服务器地址,教你Win10如何更改首选DNS服务器地址

    win10修改dns服务器地址,教你Win10如何更改首选DNS服务器地址Win10首选DNS服务器地址DNS(DomainNameServer,域名服务器)是进行域名(domainname)和与之相对应的IP地址(IPaddress)转换的服务器,这是专业性的表述,简单来说就是如果DNS出现问题,就会导致电脑可以上QQ,但是不能够上网页的现象,当然了,不管是浏览器也好,还是第三方的安全工具都能针对DNS错误进行修复,但是如果想要自己修改DNS服务器地址的话,…

    2022年5月30日

发表回复

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

关注全栈程序员社区公众号