Removed disk performance testing
This commit is contained in:
@ -930,29 +930,6 @@ class SystemHealthMonitor:
|
||||
smart_health['severity'] = 'WARNING'
|
||||
smart_health['issues'].extend(recent_errors)
|
||||
|
||||
smart_health['performance_metrics'] = {
|
||||
'read_speed': None,
|
||||
'write_speed': None,
|
||||
'access_time': None
|
||||
}
|
||||
|
||||
# Quick performance test
|
||||
try:
|
||||
perf_result = subprocess.run(
|
||||
['hdparm', '-Tt', device],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
text=True
|
||||
)
|
||||
|
||||
for line in perf_result.stdout.split('\n'):
|
||||
if 'buffered disk reads' in line:
|
||||
smart_health['performance_metrics']['read_speed'] = float(line.split()[0])
|
||||
elif 'cached reads' in line:
|
||||
smart_health['performance_metrics']['cached_speed'] = float(line.split()[0])
|
||||
except:
|
||||
pass # Skip performance metrics if hdparm fails
|
||||
|
||||
logger.debug(f"=== SMART Health Check for {device} ===")
|
||||
logger.debug("Raw SMART attributes:")
|
||||
for attr, value in smart_health['attributes'].items():
|
||||
|
||||
Reference in New Issue
Block a user