changed useage calculation

This commit is contained in:
2025-03-09 19:12:54 -04:00
parent 02e1de0be2
commit 83aa8dcf91

View File

@ -1376,10 +1376,9 @@ class SystemHealthMonitor:
logger.debug(f"Skipping excluded mountpoint: {mountpoint}") logger.debug(f"Skipping excluded mountpoint: {mountpoint}")
continue continue
# Get usage percentage directly from parts[4]
usage_percent = float(parts[4].rstrip('%'))
size_value = self._convert_size_to_bytes(parts[1]) # For total size size_value = self._convert_size_to_bytes(parts[1]) # For total size
used_value = self._convert_size_to_bytes(parts[2]) # For used size used_value = self._convert_size_to_bytes(parts[2]) # For used size
usage_percent = (used_size / total_size) * 100 if total_size > 0 else 0
filesystem = { filesystem = {
'mountpoint': mountpoint, 'mountpoint': mountpoint,
'total': parts[1], 'total': parts[1],