Smartctl
The virtual machine does not support this tool I mainly use it to view the health of this function, the other use of less, as mark after the use of the time to see it
(1) detection is turned on
/dev/sda2 is a device name, you can write the device name to be detected, n is the terminal number, I do not add-D megaraid,0 when the terminal prompt as follows
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/85/8D/wKioL1eoT-jyeRCjAABtBRGhQsQ397.png "title=" Sogou 20160808172428.png "alt=" Wkiol1eot-jyercjaabtbrghqsq397.png "/>
[Email protected] ~]# smartctl-i-D megaraid,0/dev/sda2 | grep device device Type:diskdevice supports SMART and is Disabled//view supported but off state
(2) Turn on smart
[Email protected] ~]# smartctl--smart=on--offlineauto=on--saveauto=on-d megaraid,0/dev/sda2
Detect if Open
[Email protected] ~]# Smartctl-i-D megaraid,0/dev/sda2|grep devicedevice Type:diskdevice supports SMART and is enabled//already enabled state
(3) View health status
[Email protected] ~]# smartctl-h-D megaraid,0/dev/sda2 | grep Smartsmart Health Status:ok
(4) Display device manufacturers and properties
[[email protected] ~]# smartctl -a -d megaraid,0 /dev/sda2smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-504.el6.x86_64] (Local build) Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.netCurrent drive temperature: 34 c //Device Current Temperature drive trip temperature: 68 c //Drive trip temperature (inaccurate, big God can tell) elements in grown defect list: 0Vendor (Seagate) cache information Blocks sent to initiator = 426726713 blocks received from initiator = 2972125000 blocks read from cache and sent to initiator = 532160568 number&Nbsp;of read and write commands whose size <= segment size = 71965320 Number of read and write commands whose size > segment size = 33vendor (Seagate/hitachi) factory Information number of hours powered up = 37215.42 number of minutes until next internal smart test = 2
(5) Display hard drive history error message
[[email protected] ~]# smartctl -l error -d megaraid,0 /dev/ sda2smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-504.el6.x86_64] (local Build) copyright (C) 2002-12 by bruce allen, http:// smartmontools.sourceforge.neterror counter log: Errors Corrected by total correction gigabytes total ECC rereads/ errors algorithm processed uncorrected fast | delayed rewrites corrected invocations [10^9 bytes] errorsread: 157102965 0 0 157102965 157102965 3898.788 0write: 0 0 0 0 0 5959.977 0verify: 1984547768 0 0 1984547768 1984547768 46628.006 0non-medium error count: 5
(6) HDD self-test
[[email protected] ~]# smartctl--test=test-d megaraid,0/dev/sda2 >/var/log/smart_short.logsmartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-504.el6.x86_64] (local build) Copyright (C) 2002-12 by Bruce Allen,/HTTP/ Smartmontools.sourceforge.net=======> INVALID ARGUMENT to-t: test=======> VALID ARGUMENTS are:offline, short, Lon G, conveyance, Force, Vendor,n, Select,m-n, Pending,n, Afterselect,[on|off] <=======//You can use these parameters, or you can input the output into a file us e smartctl-h to get a usage summary
Interrupt self-Test
[Email protected] ~]# Smartctl-x-D megaraid,0/dev/sda2 smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-50 4.EL6.X86_64] (local build) Copyright (C) 2002-12 by Bruce Allen, Http://smartmontools.sourceforge.netSelf Test returned W Ithout Error
Show hard Drive test information
[[email protected] ~]# smartctl -l selftest -d megaraid,0 /dev/ sda2smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-504.el6.x86_64] (local Build) copyright (C) 2002-12 by bruce allen, http:// smartmontools.sourceforge.netsmart self-test lognum test Status segment lifetime lba_first_err [SK ASC ASQ] Description number (Hours) # 1 background long Aborted (By user command) &NBSP;&Nbsp;16 37215 - [- - -]# 2 background short Completed 16 37215 - [- - -]# 3 Background long Completed 16 1 - [ - - -]# 4 background short completed 16 0 - [- - -]
(7) Show All information
[[email protected] ~]# smartctl -a -d megaraid,0 /dev/sda2 smartctl 5.43 2012-06-30 r3573 [x86_64- linux-2.6.32-504.el6.x86_64] (Local build) copyright (C) 2002-12 by Bruce allen, http://smartmontools.sourceforge.netvendor: SEAGATE Product: ST3300657SS Revision: ES64User Capacity: 300,000,000,000 bytes [300 GB]Logical block size: 512 byteslogical unit id: 0x5000c50043b38c53serial Number: 6sj3p4sgdevice type: disktransport protocol: saslocal time is: mon aug 8 18:02:21 2016 cstdevice supports smart and is EnabledTemperature Warning EnabledSMART Health Status: OKCurrent drive temperature: 35 cdrive trip temperature: 68 celements in grown defect list: 0vendor (Seagate) cache information Blocks sent to initiator = 431906112 blocks received from initiator = 2980399378 blocks read from cache and sent to initiator = 532720120 number of read and write commands whose size <= segment size = 71975696 Number of read and write commands whose size > segment size = 33vendor (Seagate/hitachi) factory information number of hours powered up = 37216.00 number of minutes until next internal smart test = 27error counter log: Errors Corrected by Total Correction gigabytes total ECC rereads/ errors algorithm processed uncorrected fast | delayed rewrites corrected invocations [10^9 bytes] errorsread: 157150833 0 0 157150833 157150833 3900.082 0write: 0 0 0 0 0 5961.649 0verify: 1984547768 0 0 1984547768 1984547768 46628.006 0Non-medium error count: 5SMART Self-test logNum Test Status segment lifetime lba_ first_err [sk asc asq] description number (Hours) # 1 background long aborted (By user command) 16 37215 - [- - -]# 2 Background short Completed 16 37215 - [- - -]# 3 Background long completed 16 1 - [- - -]# 4 Background short Completed 16 0 - [- - -]Long (Extended) self test duration: 3200 seconds [53.3 minutes ]
Hdparm
[Email protected] ~]# hdparm-t/dev/sda/dev/sda:timing buffered disk reads:894 MB in 3.00 seconds = 297.79 mb/sec
Hdsentinel
This tool I installed a few times have problems, after the implementation of the information is very few, I think it is the problem of their own outfit, but repeatedly check nothing wrong, and then go directly to the official website to see, only to find that the Linux version does exist this problem, many systems or servers are not supported. But the version of Windows is still available. The author in reply to the Netizen said will continue to develop the Linux version, the latest version will be published on the official website, please look forward to.
[Email protected] ~]# mkdir hdsential[[email protected] ~]# CD hdsential/[[email protected] hdsential]# lshdsentinel_00 8_x64.zip[[email protected] hdsential]# unzip Hdsentinel_008_x64.zip[[email protected] hdsential]# Lshdsentinel Hdsentinel_008_x64.zip[[email protected] hdsential]# chmod +x hdsentinel[[email protected] hdsential]# CP Hdsentinel/ Usr/bin/[[email protected] hdsential]# Hdsentinel
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/85/8F/wKioL1eoeRjA41QeAACWX8mb2Iw098.png "title=" Sogou 20160808202018.png "alt=" Wkiol1eoerja41qeaacwx8mb2iw098.png "/>
This article is from the "Court of the Odd Tree" blog, please be sure to keep this source http://zhangdl.blog.51cto.com/11050780/1835789
Linux small knowledge of hard disk health status detection