Smartmontools is an open source disk control, monitoring tool that can run on Linux,unix,bsd,solaris,mac os,os/2,cygwin and Windows, and it can also run from the boot CD or boot floppy, supporting ata/ Atapi/sata-3 (to-8) bits of hard disk and SCSI hard disk, also support tape device, its home in smartmontools.sourceforge.net, actually it is a software package, including two utilities: Smartctl and SMATD. The hard drive it monitors must have the S.M.A.R.T feature, which is currently available on all hard drives, but it is usually not turned on by default, there are two ways to turn this feature on: 1) via the BIOS setup option 2) through the SMARTCTL command. It allows you to test the health of your hard disk and alert you before a failure occurs.
Installation under Ubuntu:
sudo apt-get install smartmontools
SMARTCTL command format
smartctl[options]device
Common options:
-h : 显示帮助信息-V : 显示版本信息-i : 显示设备的身份信息(SN 厂家等信息)-a : 显示设备的全部SMART信息-x : 显示设备的详细信息-H : 查看硬盘健康状态
Example:
$ sudo smartctl-a/dev/sdasmartctl 5.41 2011-06-09 r3365 [i686-linux-3.2.0-29-generic-pae] (local build) Copyright (C) 20 02-11 by Bruce Allen, http://smartmontools.sourceforge.net===START ofInformation Section===device Model:vbox harddiskserial Number: vb9cc1f7fa-596D5552firmware Version:1.0UserCapacity: the,949,672,960bytes [42.9Gb]sectorSize: +Bytes Logical/physicaldevice is: not inchSmartctlDatabase[ forDetails use:-P showall]ata Version is:6ATA Standard is: ata/atapi-6Published, ANSI INCITS361-2002Local Time is: Fri Jul - One: $: - -Hktsmart Support is: Unavailable-device lacks smart capability. The above results are run on the virtual machine and the virtual machine does not support SMART technology. But it still takes the firmware version and the SN
Another machine that supports smart technology and opens the smart message:
SMARTCTL 6.2 2013-07-26 r3841 [i686-linux-3.16.0-30-generic] (local build) Copyright (C) 2002-13, Bruce Allen, Christian Fr Anke, www.smartmontools.org===START ofInformation Section===model family:hitachi/hgst Travelstar z7k500device model:hgst hts725050a7e630serial Number: Tf0500wj2g3ddvlu WWN Device Id:5 theCca7C5e298f7firmware version:gh2oa420UserCapacity: -,107,862,016bytes [ -Gb]sector Sizes: +Bytes Logical,4096Bytes Physicalrotation Rate:7200Rpmdevice is:inchSmartctlDatabase[ forDetails use:-PShow]ata Version is: Ata8-acs t13/1699-D Revision6SATA Version is: SATA2.6,6.0GB/S ( Current:3.0GB/s)Local Time is: Fri Jul - A:xx: - -Cstsmart Support is: Available-device has SMART capability. SMART Support is: Enabled
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Linux Smartmontools Tools