hwmonitor/hwmon-service/init.py

16 lines
299 B
Python
Raw Normal View History

2024-10-18 22:51:22 +03:00
#!/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))