Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

smart(8) Call for Testing

3 views
Skip to first unread message

Michael Dexter

unread,
Mar 26, 2018, 2:54:10 PM3/26/18
to

Hello all,

As you may or may not know, Chuck Tuffli has developed a simple,
scripting-friendly S.M.A.R.T. utility for FreeBSD that is designed to be
included in base once proven. To that end, smart(8) is ready for testing
on the broadest selection of disk and controller combinations possible.

smart(8) is available in ports and packages today in sysutils/smart

Quick start:

pkg install smart
smart ada0

(That's it!)

You should see a list of raw SMART values in the format of <Log Page ID>
<Attribute ID> <Attribute value> (See the GitHub readme for an
explanation of the Log Page ID.


Usage: smart [-htxi] [-a <attribute id>] <device name>
-h, --help
-t, --threshold : also print out the threshold values
-x, --hex : print the values out in hexadecimal
-a, --attribute : print a specific attribute
-i, --info : print general device information
-v, --version : print the version and copyright


Repos:

https://bitbucket.org/ctuffli/smart
https://github.com/ctuffli/smart

IF you should encounter an errors such as no output for your device,
please submit a ticket at either of the above sites with the output of:

uname -a
camcontrol devlist -v
camcontrol identify <device>
smartctl -a /dev/<device>

Should Chuck say, "I think I've fixed it, please rebuild it!", run:

$ hg clone https://ctu...@bitbucket.org/ctuffli/smart
$ cd smart && make
$ sudo ./smart <device>

Thank you!

Michael Dexter
_______________________________________________
freeb...@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-fs
To unsubscribe, send any mail to "freebsd-fs-...@freebsd.org"

Stefan Esser

unread,
Mar 27, 2018, 5:24:54 AM3/27/18
to
Am 26.03.18 um 20:52 schrieb Michael Dexter:
> As you may or may not know, Chuck Tuffli has developed a simple,
> scripting-friendly S.M.A.R.T. utility for FreeBSD that is designed to be
> included in base once proven. To that end, smart(8) is ready for testing on
> the broadest selection of disk and controller combinations possible.
>
> IF you should encounter an errors such as no output for your device, please
> submit a ticket at either of the above sites with the output of:
>
> uname -a
> camcontrol devlist -v
> camcontrol identify <device>
> smartctl -a /dev/<device>

Hi Michael and Chuck,

not sure, whether this is a problem, but I get a surprising result for my 6GB
WD-Red SATA drives:

# smart -it /dev/ada0
Device WDC WD60EFRX-68TGBN1
Revision 82.00A82
Serial WD-WX21DC42E411
208 1 47 0 200 200 0
208 3 39 0 213 196 8333
208 4 50 0 100 100 35
208 5 51 0 200 200 0
208 7 46 0 200 200 0
208 9 50 0 68 68 23695
208 10 50 0 100 253 0
208 11 50 0 100 253 0
208 12 50 0 100 100 33
208 192 50 0 200 200 26
208 193 50 0 200 200 758
208 194 34 0 109 101 43
208 196 50 0 200 200 0
208 197 50 0 200 200 0
208 198 48 0 100 253 0
208 199 50 0 200 200 0
208 200 8 0 100 253 0
208 5 197 2 0 0 0
208 1 10 0 0 0 0

The last two rows re-use attribute IDs seen before, are out of order and do
not report the values I'd expect. These rows are missing from the smartctl -a
output:

ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED
WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always
- 0
3 Spin_Up_Time 0x0027 213 196 021 Pre-fail Always
- 8333
4 Start_Stop_Count 0x0032 100 100 000 Old_age Always
- 35
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always
- 0
7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always
- 0
9 Power_On_Hours 0x0032 068 068 000 Old_age Always
- 23695
10 Spin_Retry_Count 0x0032 100 253 000 Old_age Always
- 0
11 Calibration_Retry_Count 0x0032 100 253 000 Old_age Always
- 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always
- 33
192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always
- 26
193 Load_Cycle_Count 0x0032 200 200 000 Old_age Always
- 758
194 Temperature_Celsius 0x0022 109 101 000 Old_age Always
- 43
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always
- 0
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always
- 0
198 Offline_Uncorrectable 0x0030 100 253 000 Old_age Offline
- 0
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always
- 0
200 Multi_Zone_Error_Rate 0x0008 100 253 000 Old_age Offline
- 0

Should the last two lines of smart output be omitted (e.g. by filtering
based on their flag value?).

BTW: an option to print fixed width columns with headings or CSV format
with header line (or e.g. JSON) might be useful.

And: While the first three columns are documented, the -t output is not.

Regards, STefan

Michael Dexter

unread,
Mar 27, 2018, 3:24:10 PM3/27/18
to
On 3/27/18 9:45 AM, Miroslav Lachman wrote:
> What is the purpose of this utility and why it should be in base if
> almost everyone will need to write something to do the "real job" or
> "pkg install smartmontools".
>
> Maybe I just don't see something...

Scriptability. smartmontools output is not parsing-friendly and
generally, an operatory only wants four or so key values such as hours,
temperature and a variation on reallocated sectors. This facilitates
that and with a license that would allow its inclusion in base.

Michael

Michael Dexter

unread,
Mar 31, 2018, 1:22:11 AM3/31/18
to
On 3/29/18 6:43 AM, Lev Serebryakov wrote:
> Monitoring of values and alerting is VERY important (number of
> Relocations is main indicator of spinning HDD health and when it raises
> it must be known ASAP)

Another metric that frequently came up during outreach was any sudden
increase in disk latency, usually indicating that you have between one
and 24 hours to replace the device. I am curious what people are doing
now to determine such changes in latency and where they feel such
monitoring should exist in the stack.

As for SNMP and friends, I consider those way up the stack with tools
like smart(8) simply providing a building block.

Michael
0 new messages