Linux smartmontools and linuxsmartmontools
Smartmontools is an open-source Disk control and monitoring tool that runs on Linux, Unix, BSD, Solaris, Mac OS, OS/2, Cygwin, and Windows, it can also run from the boot disc or boot floppy disk, supporting ATA/ATAPI/SATA-3 (to-8) bit hard disk and SCSI hard disk, as well as tape equipment, its hometown is smartmontools.sourceforge.net. In fact, it is a software package, including two utilities: smartctl and smatd. The hard disk it monitors must have S. m.A. r. T feature. Currently, all hard disks have this feature, but this feature is usually not enabled by default. There are two ways to enable this feature: 1) enable this feature through BIOS (option 2) use the smartctl command. It can be used to test the health status of the hard disk and provide early warnings before a fault occurs.
Install in Ubuntu:
sudo apt-get install smartmontools
Smartctl Command Format
smartctl [options] device
Common options:
-H: Display help information-V: display version information-I: Display Device identity information (SN manufacturer and other information)-a: display all SMART information of the device-x: display Device details-H: view disk health status
Example:
$ Sudo smartctl-a/dev/sdasmartctl 5.41 r3365 [i686-linux-3.2.0-29-generic-pae] (local build) Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net === start of information section === Device Model: VBOX HARDDISKSerial Number: VB9cc1f7fa-596d5552Firmware Version: 1.0 User Capacity: 42,949,672,960 bytes [42.9 GB] Sector Size: 512 bytes logical/physicalDevice is: Not in sm Artctl database [for details use:-P showall] ATA Version is: 6ATA Standard is: ATA/ATAPI-6 published, ansi incits 361-2002Local Time is: Fri Jul 24 11:57:33 2015 HKTSMART support is: unavailable-device lacks SMART capability. the above results run on virtual machines. virtual machines do not support SMART technology. However, the firmware version and SN are still obtained.
Another machine that supports SMART technology and enables SMART information:
smartctl 6.2 2013-07-26 r3841 [i686-linux-3.16.0-30-generic] (local build)Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org=== START OF INFORMATION SECTION ===Model Family: Hitachi/HGST Travelstar Z7K500Device Model: HGST HTS725050A7E630Serial Number: TF0500WJ2G3DDVLU WWN Device Id: 5 000cca 7c5e298f7Firmware Version: GH2OA420User Capacity: 500,107,862,016 bytes [500 GB]Sector Sizes: 512 bytes logical, 4096 bytes physicalRotation Rate: 7200 rpmDevice is: In smartctl database [for details use: -P show]ATA Version is: ATA8-ACS T13/1699-D revision 6SATA Version is: SATA 2.6, 6.0 Gb/s (current: 3.0 Gb/s)Local Time is: Fri Jul 24 12:00:18 2015 CSTSMART support is: Available - device has SMART capability.SMART support is: Enabled
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.