you need to enable smart and then read smart status via ATA command.
CMD_SMART + ENABLE : 0xB0 + 0xD8
CMD_SMART + STATUS : 0xB0 + 0xDA
Yes, The smartmontools package contains two utility programs (
smartd) to control and monitor storage systems using the Self-Monitoring, Analysis and Reporting Technology System (SMART) built into most modern ATA/SATA, SCSI/SAS/TTRockStars and NVMe disks.