Board.KolibriOS.org
https://board.kolibrios.org/

HDD S.M.A.R.T
https://board.kolibrios.org/viewtopic.php?f=1&t=2735
Page 1 of 1

Author:  Mario_r4 [ Tue Jun 24, 2014 2:47 pm ]
Post subject:  HDD S.M.A.R.T

Задумался над реализацией сабжа, но информации по собственно низкоуровневому доступу шиш да маленько. Нашел статью на хабре, по похоже там уже тоже со встроенными средствами Шиндовс работа идет. Из остального только описание. Если у кого есть информация по непосредственному (низкоуровневому) программированию поделитесь пожалуйста.

Author:  SoUrcerer [ Tue Jun 24, 2014 3:09 pm ]
Post subject:  Re: HDD S.M.A.R.T

Возможно, поможет: http://www.smartmontools.org/wiki/TocDo ... Attributes
http://www.smartmontools.org/browser/tr ... s_scsi.xml

Author:  buyerninety [ Tue Jun 24, 2014 5:59 pm ]
Post subject:  Re: HDD S.M.A.R.T

Interesting discussion giving some interesting background information and
some opinions regarding the S.M.A.R.T feature;
http://www.dslreports.com/forum/r288672 ... ID-234-is-

Author:  Mario_r4 [ Wed Jun 25, 2014 6:28 am ]
Post subject:  Re: HDD S.M.A.R.T

buyerninety
Thank you! Your link will probably be useful.

Probably here this part of the text - this is what I need:
Spoiler: Show
If you want to reverse-engineer this, you can use smartctl -H -r ataioctl,2 /dev/sda to dump the full payload data. The ATA command for SMART attribute retrieval is 0xb0 ("SMART READ DATA" / "SMART READ ATTRIBUTE VALUES"), feature request 0xd0. The hexadecimal data you get back are all the attributes and their values. For the format of most (but not all) of the data, you will need to read the smartmontools source code. Taken from my own code comments:
Code:
+/*
+ * Obtain SMART attributes and their values
+ *
+ * Feature 0xd0 result (see ATA8-ACS, section 7.53.6.2, table 49):
+ *
+ * The 512-byte result of SMART READ DATA is documented per ATA8-ACS
+ * specification, section 7.53.6.2, table 49.  However, you'll find
+ * bytes 0-361 marked "Vendor specific"; these are (mostly) the
+ * actual SMART attributes themselves.  Example:
+ *
+ * Offset   Size (B)  Description
+ * -------- --------- ---------------------------------------------------
+ * 0        2         SMART attribute revision (16-bit, big endian)
+ * 2        12        SMART attribute data entry #0
+ * 14       12        SMART attribute data entry #1
+ * .....
+ * 348      12        SMART attribute data entry #29
+ * .....              <see ATA8-ACS specification from here onwards>
+ * -------- --------- ---------------------------------------------------
+ *
+ * The SMART attribute data format is completely undocumented.  It
+ * consists of 12 bytes per attribute in the following format:
+ *
+ * Offset   Size (B)  Description
+ * -------- --------- ---------------------------------------------------
+ * 0        1         Attribute ID number
+ * 1        2         Attribute flags
+ * 3        1         Attribute CURRENT value (adjusted)
+ * 4        1         Attribute WORST value (adjusted)
+ * 5        6         Attribute data
+ * 11       1         <reserved - 0x00>
+ * -------- --------- ---------------------------------------------------
+ */

Author:  SoUrcerer [ Wed Jun 25, 2014 7:06 am ]
Post subject:  Re: HDD S.M.A.R.T

Ого, похоже, всё просто.

Author:  Mario_r4 [ Wed Jun 25, 2014 8:57 am ]
Post subject:  Re: HDD S.M.A.R.T

SoUrcerer wrote:
Ого, похоже, всё просто.

Ага, также как просто скомпилировать NetSurf для Колибри - вроде все очевидно, но есть нюансы.

Page 1 of 1 All times are UTC+03:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/