fix: resolve infinite loop on nfs share discovery

feat: switched to dynamic coretemp for defpoll temp
This commit is contained in:
2026-04-07 13:38:59 +04:00
parent 98cdb8808e
commit 54f98286a6
2 changed files with 26 additions and 3 deletions
+22
View File
@@ -0,0 +1,22 @@
import os
import sys
import subprocess
class DiskMonitor:
def __init__(self, path="/"):
self.path = path
def get_free_gb(self):
try:
st = os.statvfs(self.path)
free_bytes = st.f_bavail * st.f_frsize
return round(free_bytes / (1024**3), 1)
except Exception:
return 0.0
def push_update(self):
sys.stdout.write(f"{self.get_free_gb()}\n")
sys.stdout.flush()
if __name__ == "__main__":
DiskMonitor().push_update()