Franc Zabkar wrote:
The "r ioctl,2" option for the smartctl command produces an Identify
Device data block in the following format:
===== [IDENTIFY DEVICE] DATA START (BASE-16) =====
000-015: 5a 0c ff 3f 37 c8 10 00 00 00 00 00 3f 00 00 00
016-031: 00 00 00 00 20 20 20 20 20 20 20 20 20 20 20 20
032-047: 56 39 31 53 36 59 32 41 00 00 00 00 04 00 44 53
Unfortunately this makes it difficult to correlate the data with the
tables in the ATA Command specification documents. The tables
organise data in words, not bytes, and the data are little endian.
May I suggest a new output format for this purpose:
0 1 2 3 4 5 6 7 8 9
-------------------------------------------------
0: 0c5a 3fff c837 0010 0000 0000 003f 0000 0000 0000
10: 2020 2020 2020 2020 2020 2020 3956 5331 5936 3259
20: 0041 0000 0400 5344
Thanks for the suggestion.
I'm not sure whether this is worth the effort. The smartctl debug output
can also be converted by a simple script (attached). Its output is also
suitable as input for hdparm for further interpretation:
( ... | ./idbytes2words.pl | cut -c6- | hdparm --Istdin )
Cheers,
Christian
#!/usr/bin/perl
my $skip = 1;
while (<>) {
if ($skip) {
$skip = 0 if (/IDENTIFY.*DATA START/);
next;
}
chomp; tr/\r//d;
last unless (/^(\d\d\d)-\d\d\d:/);
my $n = $1;
last unless (s/ ([^ ][^ ]) ([^ ][^ ])/ \2\1/g);
s/^[^:]*://;
printf("%3d:%s\n", $n/2, $_);
}
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Smartmontools-database mailing list
Smartmontools-database@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/smartmontools-database