Expand description
SMART health from smartctl JSON files.
Reading SMART data needs root, and rigtop never runs as root nor loosens
device permissions. Instead a root systemd timer (see contrib/collect/)
runs smartctl -j -a for every drive and writes one JSON file per device
into a directory (default /var/lib/rigtop/smart). This module only parses
those files.
Files are re-parsed only when their modification time changes, so polling
every second costs a stat per drive.
Structs§
- Smart
Reader - Reads and caches SMART result files from a directory.
Functions§
- parse_
json - Extracts the fields rigtop shows from
smartctl -j -aoutput.