mirror of
https://forgejo.altau.su/lego/lego-monitoring.git
synced 2026-03-10 04:41:10 +00:00
move existing stuff to archive dir (for now)
This commit is contained in:
parent
ae1204449c
commit
4fc491f61a
32 changed files with 0 additions and 0 deletions
|
|
@ -1,25 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
from colorama import Back, Style
|
||||
|
||||
from misc.sensors import Sensors
|
||||
|
||||
|
||||
def pretty_print():
|
||||
s = Sensors.get_temperatures()
|
||||
|
||||
for k, v in s.items():
|
||||
print(f"{Back.CYAN}{k}{Style.RESET_ALL}")
|
||||
|
||||
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} ({s.current_avail_percentage}%) GiB")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
pretty_print()
|
||||
Loading…
Add table
Add a link
Reference in a new issue