python library to access low-level detail of drive (SMART, scsi generic, ata security, etc)

2.9k views Asked by At

Is there any python library to access low-level disk details?

I need:

  • SMART attributes
  • Serial number
  • Firmware version
  • SATA Phy counters
  • SMART Extended Self-test log records
  • Enclosure/letter/sg-device mapping
  • ATA Security command access
  • SCSI generic access (sg_inq, sg_format, etc)

Any ideas, outside of parsing output of smartctl, hdparm and sg3-utils?

Thanks!

2

There are 2 answers

3
markus On BEST ANSWER

I dont know if this is of any help but you might get some of the point you mentioned done with it thought

1
Oleksandr Kravchuk On

pySMART does at least some of this. It is a wrapper for smartmontools though.