JavaScript must be enabled in order for you to see "WP Copy Data Protect" effect. However, it seems JavaScript is either disabled or not supported by your browser. To see full result of "WP Copy Data Protector", enable JavaScript by changing your browser options, then try again.

Usage about the command of smartctl under the CentOS 6.x


Well, well, well, it’s time to post a rubbish! I have a doubt about monitoring the health of hard disk for a long time, and everybody know the management information about the hardware raid(HWR) through the utility from vendor(Like LSI MSM). How do we monitor the hard disks with the method about AHCI/IDE or ESRT2? Let’s keep reading:
1) Check the package and enable the related service about the smartctl
#yum -y install smartmontools
#rpm -qa | grep -i smart
smartmontools-5.42-2.el5
#service smartd start
#chkconfig !!:1 on

2) Check the func about your HDD that’s be supported
#smartctl -i /dev/sda
smartctl 5.42 2011-10-20 r3458 [x86_64-linux-2.6.18-348.12.1.el5] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
Vendor: SEAGATE
Product: ST32000444SS
Revision: KS68
User Capacity: 2,000,398,934,016 bytes [2.00 TB]
Logical block size: 512 bytes
Logical Unit id: 0x5000c500348055df
Serial number: 9WM6KYAG
Device type: disk
Transport protocol: SAS
Local Time is: Sat Sep 5 10:44:01 2015 CST
Device supports SMART and is Enabled
Temperature Warning Disabled or Not Supported
#smartctl -s on -d scsi /dev/sda
smartctl 5.42 2011-10-20 r3458 [x86_64-linux-2.6.18-348.12.1.el5] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
Informational Exceptions (SMART) enabled
Temperature warning enabled

3) Decide the method about the HDD self-test(Execute a test for one time)
#smartctl -t /dev/sda
smartctl 5.42 2011-10-20 r3458 [x86_64-linux-2.6.18-348.12.1.el5] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
=======> INVALID ARGUMENT TO -t: /dev/sda
=======> VALID ARGUMENTS ARE: offline, short, long, conveyance, vendor,N, select,M-N, pending,N, afterselect,[on|off] <=======
Use smartctl -h to get a usage summary
#smartctl -l /dev/sda
smartctl 5.42 2011-10-20 r3458 [x86_64-linux-2.6.18-348.12.1.el5] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
=======> INVALID ARGUMENT TO -l: /dev/sda
=======> VALID ARGUMENTS ARE: error, selftest, selective, directory[,g|s], xerror[,N][,error], xselftest[,N][,selftest], background, sasphy[,reset], sataphy[,reset], scttemp[sts,hist], scttempint,N[,p], scterc[,N,M], devstat[,N], ssd, gplog,N[,RANGE], smartlog,N[,RANGE] <=======
Use smartctl -h to get a usage summary

4) Review the result from the test of smartctl
#smartctl -a /dev/sda
smartctl 5.42 2011-10-20 r3458 [x86_64-linux-2.6.18-348.12.1.el5] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
Vendor: SEAGATE
Product: ST32000444SS
Revision: KS68
User Capacity: 2,000,398,934,016 bytes [2.00 TB]
Logical block size: 512 bytes
Logical Unit id: 0x5000c500348055df
Serial number: 9WM6KYAG
Device type: disk
Transport protocol: SAS
Local Time is: Sat Sep 5 10:51:26 2015 CST
Device supports SMART and is Enabled
Temperature Warning Enabled
SMART Health Status: OK
Current Drive Temperature: 36 C
Drive Trip Temperature: 68 C
Manufactured in week 25 of year 2011
Specified cycle count over device lifetime: 10000
Accumulated start-stop cycles: 58
Specified load-unload count over device lifetime: 300000
Accumulated load-unload cycles: 58
Elements in grown defect list: 0
Vendor (Seagate) cache information
Blocks sent to initiator = 1090317933
Blocks received from initiator = 664228964
Blocks read from cache and sent to initiator = 1325636618
Number of read and write commands whose size <= segment size = 119495651
Number of read and write commands whose size > segment size = 0
Vendor (Seagate/Hitachi) factory information
number of hours powered up = 34921.02
number of minutes until next internal SMART test = 34
Error counter log:
Errors Corrected by Total Correction Gigabytes Total
ECC rereads/ errors algorithm processed uncorrected
fast | delayed rewrites corrected invocations [10^9 bytes] errors
read: 154566790 4 0 154566794 154566794 4936.284 0
write: 0 0 0 0 0 4818.826 0
verify: 399360 0 0 399360 399360 11.416 0
Non-medium error count: 58
SMART Self-test log
Num Test Status segment LifeTime LBA_first_err [SK ASC ASQ]
Description number (hours)
# 1 Background long Completed 16 6 - [- - -]
# 2 Background short Completed 16 1 - [- - -]
Long (extended) Self Test duration: 18500 seconds [308.3 minutes]
#smartctl -H /dev/sda
smartctl 5.42 2011-10-20 r3458 [x86_64-linux-2.6.18-348.12.1.el5] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
SMART Health Status: OK
#smartctl -l error /dev/sda
smartctl 5.42 2011-10-20 r3458 [x86_64-linux-2.6.18-348.12.1.el5] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
Error counter log:
Errors Corrected by Total Correction Gigabytes Total
ECC rereads/ errors algorithm processed uncorrected
fast | delayed rewrites corrected invocations [10^9 bytes] errors
read: 154566812 4 0 154566816 154566816 4936.284 0
write: 0 0 0 0 0 4818.827 0
verify: 399360 0 0 399360 399360 11.416 0
Non-medium error count: 58

5) Test the badblocks through the command(Impact the life of HDDs because of busy RW)
#badblocks -v /dev/sda -o badblocks.txt
◎、Above information is brief introduction about the command of smartctl, and I refer this website to survey this command, you can google it if you have more interesting. That's all for today, see younext time!

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 
This site is protected by WP-CopyRightPro