diff --git a/src/de/p1st/monitor/loggers/drive.py b/src/de/p1st/monitor/loggers/drive.py index 9ad24ea..3944dc8 100644 --- a/src/de/p1st/monitor/loggers/drive.py +++ b/src/de/p1st/monitor/loggers/drive.py @@ -96,7 +96,13 @@ class DriveLogger(Logger): :param device: For example `/dev/sda` or `/dev/disk/by-uuid/` :return: Temperature in celsius """ - returncode, stdout, stderr = execute_capture(['smartctl', '-j', '-a', f'{device}']) + + # -j: JSON output. + # -a: Print all SMART device information. + # For NVMe, this is equivalent to: '-H -i -c -A -l error -l selftest'. + # -H: Print health status. + # -A: Prints only the vendor specific SMART Attributes. + returncode, stdout, stderr = execute_capture(['smartctl', '-j', '-A', f'{device}']) if returncode != 0: raise LoggerReadEx(f'smartctl failed with returncode {returncode}\nstdout: {stdout}\nstderr: {stderr}')