Quantcast

Parsing the attribute table from smartctl -A output

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Parsing the attribute table from smartctl -A output

Preet
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

------------------------------------------------------------------------------
_______________________________________________
Smartmontools-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/smartmontools-support
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Parsing the attribute table from smartctl -A output

Christian Franke
Preet wrote:

> 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.

This is true for both formats of the attribute table (-f old, -f brief).

Thanks,
Christian


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Smartmontools-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/smartmontools-support
Loading...