Opened 5 years ago

Closed 5 years ago

#346 closed task (fixed)

Implement "-l devstat" using smartlog if gplog failed

Reported by: Alex Samorukov Owned by: Alex Samorukov
Priority: minor Milestone: Release 6.4
Component: smartctl Version: 6.3
Keywords: ata Cc: Christian Franke

Description (last modified by Alex Samorukov)

On Darwin (OSX) ATA_LOG_EXT command is not implemented, as well as on some other outdated ATA interfaces. However i found that device statistic is readable using smartlog 0x04 page.

This is sample output with my dirty hack for darwin:

Device Statistics (SMART Log 0x04)
Page Offset Size         Value  Description
  1  =====  =                =  == General Statistics (rev 2) ==
  1  0x008  4              544  Lifetime Power-On Resets
  1  0x010  4              413  Power-on Hours
  1  0x018  6       4466199876  Logical Sectors Written
  1  0x020  6         23335260  Number of Write Commands
  1  0x028  6       4027657571  Logical Sectors Read
  1  0x030  6         16200567  Number of Read Commands
  4  =====  =                =  == General Errors Statistics (rev 1) ==
  4  0x008  4                0  Number of Reported Uncorrectable Errors
  4  0x010  4                0  Resets Between Cmd Acceptance and Completion
  6  =====  =                =  == Transport Statistics (rev 1) ==
  6  0x008  4                0  Number of Hardware Resets
  6  0x010  4                0  Number of ASR Events
  6  0x018  4                0  Number of Interface CRC Errors
  7  =====  =                =  == Solid State Device Statistics (rev 1) ==
  7  0x008  1                0~ Percentage Used Endurance Indicator
                              |_ ~ normalized value

Correct logic on -ldevstat should be:

  1. Check if gplog is supported
  2. If not - check if SMART log page 0x04 available and use it as fallback

Also os_darwin.cpp needs to be converted to the new interface (#103) to support multi-sector requests.

Change History (5)

comment:1 Changed 5 years ago by Alex Samorukov

Owner: set to Alex Samorukov
Status: newassigned

comment:2 Changed 5 years ago by Alex Samorukov

Description: modified (diff)
Keywords: ata added

comment:3 Changed 5 years ago by Alex Samorukov

Component: allsmartctl

comment:4 Changed 5 years ago by Christian Franke

Cc: Christian Franke added

comment:5 Changed 5 years ago by Alex Samorukov

Resolution: fixed
Status: assignedclosed

Implemented in the r3979

Note: See TracTickets for help on using tickets.