Subject: Re: Retrieving SMART information
To: Matthew Fincham <matthewf@cat.co.za>
From: David Maxwell <david@vex.net>
List: netbsd-users
Date: 02/12/2003 10:27:23
On Wed, Feb 12, 2003 at 02:15:30PM +0200, Matthew Fincham wrote:
> Hi
> 
> I am looking to read the SMART information from a Western Digital drive. I
> was wondering if this has been done before, before I dig into what ata
> commands to send :-)

In -current, use:

/sbin/atactl smart status

From 
http://cvsweb.netbsd.org/bsdweb.cgi/src/sbin/atactl/atactl.c

It looks like smart support went in about Aug 5, 2002 but after the 1.6
branch was cut.

Here's the output on my laptop:

# atactl wd0 smart status
SMART supported, SMART enabled
id      value   thresh  crit    collect reliability description
  1     100      46     yes     online  positive    Raw read error rate
  2     100      30     yes     offline positive    Throughput performance
  3     100      25     yes     online  positive    Spin-up time
  4     100       0     no      online  positive    Start/stop count
  5     100      24     yes     online  positive    Reallocated sector count
  7     100      47     yes     online  positive    Seek error rate
  8     100      19     yes     offline positive    Seek time performance
  9      99       0     no      online  positive    Power-on hours count
 10     100      20     yes     online  positive    Spin retry count
 12     100       0     no      online  positive    Device power cycle count
192      99       0     no      online  positive    Power-off retract count
193      98       0     no      online  positive    Load cycle count
194     100       0     no      online  positive    Temperature
195     100       0     no      online  positive    
196     100       0     no      online  positive    Reallocated event count
197     100       0     no      online  positive    Current pending sector
198     100       0     no      offline positive    Offline uncorrectable
199     200       0     no      online  positive    Ultra DMA CRC error count
200     100      60     yes     online  positive    
203     100       0     no      online  positive    

-- 
David Maxwell, david@vex.net|david@maxwell.net --> Although some of you out
there might find a microwave oven controlled by a Unix system an attractive
idea, controlling a microwave oven is easily accomplished with the smallest
of microcontrollers. - Russ Hersch - (Microcontroller primer and FAQ)