Tuesday, September 30, 2014
Search
  
Most Popular
Guides
PC Parts
WEB Reviews
Seagate Enterprise Capacity 3.5 V.3 4TB SAS 6Gb/s HDD Review
OCZ Vector 256GB SSD Review @ Custom PC Review
Gigabyte F2A85XM-D3H
NZXT Phantom 630
Auvio Bluetooth Portable Speaker Review
Corsair H90 CPU Cooler Review
BIOSTAR Hi-Fi Z77X (Intel Z77) Motherboard Review
Noctua NH-L9i Cooler Review on Technic3D
Breaking News
Google Offers Unlimited Cloud Storage To Students
Gionee Announced The World's Thinnest Smartphone
MPEG LA Rolls Out HEVC License
PayPal To Become An Independent Publicly Traded Company in 2015
AMD To Showcase ARM Cortex-A57-Based Hadoop on Opteron Processors
SanDisk Introduces New X300 SSD And Client SSD Upgrade Service For Corporate Environments
TSMC and ARM Announce 16nm FinFET Silicon with 64-bit ARM big.LITTLE Technology
Google To Unveil New Music Services
Home > Guides > PC Parts

Friday, April 20, 2007
Linux Hardware Monitoring

2. Smart Status Page 2

- SMART status Page 2

The information will depend on your exact hard drive model and manufacturer, but certain items are certainly present. Of particular note are the items underlined in light blue, but any error should be generally considered suspicious. The power-on time is a good measure of the operating lifetime of your hard drive: expect most drives to fail before 3000 hours (usually within warranty, due to bad construction) and after 20000 hours (old age), which translates to approximately 2 months and a little over 2 years continuous use, respectively. Temperature is generally not very important, unless extreme values are noted. A good operating temperature for most drives is between 10°-40° C. In the example shown above, a 12cm fan blowing directly on the drive cools it to 15° which is OK.

Useful commands are:

View info for drive /dev/sda. Note that the switch -d ata may be needed if your drive is SATA, but is not required for ATA drives.

  1. smartctl -d ata -a /dev/sda

Enable SMART:

  1. smartctl -d ata -s on /dev/sda


Run a short offline test (use smartctl -a, as shown above, to view the results) :

  1. smartctl -d ata -t short /dev/sda

Run a long offline test:

  1. smartctl -d ata -t long /dev/sda

Admittedly, the most interesting part of the smartmontools suite is the ability to run SMART monitoring as a unix deamon. The application is named “smartd” and can be started during the boot process by your initialization scripts (check your distribution for how to do this---may already be started). The configuration of smartd is very simple and requires a single configuration file named “smartd.conf”, which usually resides in /etc/smartd.conf.

Here is an example of a very, very simple smartd.conf file:

  1. # Sample configuration file for smartd. See man smartd.conf.
  2. # Home page is: http://smartmontools.sourceforge.net
  3. # $Id: smartd.conf,v 1.33 2004/01/13 16:53:06 ballen4705 Exp $
  4. # smartd will re-read the configuration file if it receives a HUP
  5. # signal
  6. # The file gives a list of devices to monitor using smartd, with one
  7. # device per line. Text after a hash (#) is ignored, and you may use
  8. # spaces and tabs for white space. You may use '\' to continue lines.
  9. # You can usually identify which hard disks are on your system by
  10. # looking in /proc/ide and in /proc/scsi.
  11. # The word DEVICESCAN will cause any remaining lines in this
  12. # configuration file to be ignored: it tells smartd to scan for all
  13. # ATA and SCSI devices. DEVICESCAN may be followed by any of the
  14. # Directives listed below, which will be applied to all devices that
  15. # are found. Most users should comment out DEVICESCAN and explicitly
  16. # list the devices that they wish to monitor.
  17. DEVICESCAN

The only line of interest is the last one (all previous lines a re comments), which tells smartd to scan for SMART devices and enable monitoring whenever possible. This option does not run any tests.

We can do better than that with a custom smartd.conf file, as follows (file contains only these two lines):

  1. /dev/sda -d ata -s L/../../3/06
  2. /dev/sdb -d ata -s L/../../7/06

This instructs smartd that we have two SMART devices, /dev/sda and /dev/sdb which must be monitored. The “-d ata” switch may be necessary for SATA devices. The last argument “-s L/../../3/18” requests a background hard disk test whenever the expression matches the date. The format is “L” or “S” for a long or short test, respectively and “/MM/DD/d/HH” (month, day of the month, day of the week, 24-hour) for the pattern to be followed. In this case, /dev/sda is scanned on the third day of the week (Wednesday) at 06am, every week, while /dev/sdb is scanned on Sundays, again at 06am.

Everyday short tests can be enabled in addition to weekly long tests. This example runs a short test on drive /dev/sda at 02:00am every day AND a long test every Saturday 03:00am.

  1. /dev/sda -d ata -s (S/../.././02|L/../../6/03)


You can also ask for an email warning if the SMART status reports an error. Here is an example which instructs smartd to send an email in case of any error.

  1. /dev/sda -d ata -s L/../../6/03 -l error -m l33t_hax0r@mymail.net

The output in your log file (syslog) will be rather verbose, but should not cause any worries. Here is an excerpt from my /var/log/messages file:

  1. Apr 1 20:32:16 hagakure smartd[4430]: Device: /dev/sda, SMART Usage Attribute: 194 Temperature_Celsius changed from 193 to 199
  2. Apr 1 21:02:16 hagakure smartd[4430]: Device: /dev/sdb, SMART Usage Attribute: 190 Unknown_Attribute changed from 70 to 71
  3. Apr 1 21:02:16 hagakure smartd[4430]: Device: /dev/sdb, SMART Usage Attribute: 194 Temperature_Celsius changed from 30 to 29

Note that /dev/sda and /dev/sdb report temperatures differently. Smartd also detected a change in an unknown attribute.




Get RSS feed Easy Print E-Mail this Message


 
Home | News | All News | Reviews | Articles | Guides | Download | Expert Area | Forum | Site Info
Site best viewed at 1024x768+ - CDRINFO.COM 1998-2014 - All rights reserved -
Privacy policy - Contact Us .