Opened 10 years ago

Last modified 10 years ago

#346 closed task

Implement "-l devstat" using smartlog if gplog failed — at Initial Version

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

Description

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:

  • Check if gplog is supported
  • 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 (0)

Note: See TracTickets for help on using tickets.