Removes boot partition as a drive check
This commit is contained in:
@ -293,12 +293,16 @@ class SystemHealthMonitor:
|
||||
|
||||
def _is_physical_disk(self, device_path):
|
||||
"""
|
||||
Check if the device is a physical SATA, NVMe, or MMC disk.
|
||||
|
||||
Check if the device is a physical SATA, NVMe, or MMC disk, excluding system partitions.
|
||||
|
||||
:param device_path: Path to the device
|
||||
:return: Boolean indicating if it's a physical disk
|
||||
:return: Boolean indicating if it's a relevant physical disk
|
||||
"""
|
||||
excluded_mounts = ['/boot', '/boot/efi']
|
||||
if any(device_path.startswith(mount) for mount in excluded_mounts):
|
||||
return False
|
||||
return bool(re.match(r'/dev/(sd[a-z]|nvme\d+n\d+|mmcblk\d+)', device_path))
|
||||
|
||||
def _check_smart_health(self, device: str) -> Dict[str, Any]:
|
||||
"""
|
||||
Check comprehensive SMART health metrics for a drive.
|
||||
@ -609,8 +613,6 @@ def main():
|
||||
|
||||
# Check network health synchronously
|
||||
network_health = monitor._check_network_status()
|
||||
logger.info(f"Network health: {network_health}")
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"An unexpected error occurred: {e}")
|
||||
sys.exit(1)
|
||||
|
||||
Reference in New Issue
Block a user