storage report: add new-vs-used disk verdict, human-readable data units, collect smartctl -i

Disk report now ends with a Conclusion section judging a drive NEW/USED
against loose thresholds (<110% capacity written, <210% read, <7d
uptime, <30 power cycles), listing which ones tripped. Data
Written/Read in the Usage section now scale to TB/PB via
formatBytesHuman instead of always printing raw GB. storageSATCommands
now runs smartctl with -i so SATA/SAS reports get Model/Serial/
Firmware/Capacity, which the Conclusion needs to evaluate the
write/read criteria (previously only -H -A was collected).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-02 12:14:20 +03:00
parent 33bc275da2
commit 5b98005d5d
3 changed files with 117 additions and 13 deletions
+1 -1
View File
@@ -1259,7 +1259,7 @@ func storageSATCommands(devPath string, extended bool) []satJob {
return jobs
}
jobs := []satJob{
{name: "smartctl-health", cmd: []string{"smartctl", "-H", "-A", devPath}},
{name: "smartctl-health", cmd: []string{"smartctl", "-H", "-A", "-i", devPath}},
}
if extended {
jobs = append(jobs, satJob{name: "smartctl-self-test-short", cmd: []string{"smartctl", "-t", "short", devPath}})