mirror of
https://forgejo.altau.su/lego/lego-monitoring.git
synced 2026-03-10 04:41:10 +00:00
ram and cpu monitoring
This commit is contained in:
parent
5bbcf95015
commit
4fd3391c70
5 changed files with 93 additions and 8 deletions
|
|
@ -14,6 +14,12 @@ def pretty_print():
|
|||
for sensors in v:
|
||||
print(f"{sensors.sensor_label}: {sensors.current_temp}°C")
|
||||
|
||||
print()
|
||||
s = Sensors.get_cpu()
|
||||
print(f"Used CPU: {s.current_load}%")
|
||||
s = Sensors.get_ram()
|
||||
print(f"Available RAM: {(s.current_avail / 1024**3):.2f} GiB")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
pretty_print()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue