15 lines
299 B
Python
Executable file
15 lines
299 B
Python
Executable file
#!/usr/bin/python3
|
|
import sys
|
|
|
|
from hwmon import HardwareMonitor
|
|
|
|
if __name__ == "__main__":
|
|
human_readable = False
|
|
|
|
for arg in sys.argv:
|
|
if arg == "-h":
|
|
human_readable = True
|
|
|
|
hwmon = HardwareMonitor()
|
|
hwmon.check_all()
|
|
print(hwmon.get_json(human_readable))
|