mirror of
https://codeberg.org/privacy1st/de-p1st-monitor
synced 2024-11-21 19:33:18 +01:00
feat: read out less (unnecessary) SMART data
This commit is contained in:
parent
136c99d2ba
commit
70e2a16038
@ -96,7 +96,13 @@ class DriveLogger(Logger):
|
||||
:param device: For example `/dev/sda` or `/dev/disk/by-uuid/<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}')
|
||||
|
Loading…
Reference in New Issue
Block a user