Discussion:
[smartmontools-support] Parsing the attribute table from smartctl -A output
Preet
2016-11-29 03:02:33 UTC
Permalink
Hi all,

I'm trying to parse the attribute table that's printed when smartctl
is called with the -A option. Specifically I'd like to get the data
for each 'cell' under the row:

ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE
UPDATED WHEN_FAILED RAW_VALUE

I know that entries under RAW_VALUE can have multiple pieces of
information since some vendors pack multiple things in the raw value.
ie a RAW_VALUE entry may look like "36 (Min/Max 34/38)"

However can I be sure there's only ever one token (contiguous string
without any in-between whitespace) for the rest of the headings? I
haven't come across any examples where there's more than one, but I
want to be sure.


Pris

------------------------------------------------------------------------------
Christian Franke
2016-12-09 20:01:27 UTC
Permalink
Post by Preet
I'm trying to parse the attribute table that's printed when smartctl
is called with the -A option. Specifically I'd like to get the data
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE
UPDATED WHEN_FAILED RAW_VALUE
I know that entries under RAW_VALUE can have multiple pieces of
information since some vendors pack multiple things in the raw value.
ie a RAW_VALUE entry may look like "36 (Min/Max 34/38)"
However can I be sure there's only ever one token (contiguous string
without any in-between whitespace) for the rest of the headings? I
haven't come across any examples where there's more than one, but I
want to be sure.
This is true for both formats of the attribute table (-f old, -f brief).

Thanks,
Christian

Loading...