R-330: the agent sends SMART 187/188/199 (raw; omitted when unknown)
gates / gates (push) Successful in 53s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
2026-10-06 22:01:01 +02:00
parent 74b5eae5b0
commit adaf86ad57
4 changed files with 88 additions and 1 deletions
+11
View File
@@ -44,6 +44,9 @@ const (
ataReallocatedSectorCt = 5
ataCurrentPending = 197
ataOfflineUncorrect = 198
ataReportedUncorrect = 187 // R-330
ataCommandTimeout = 188 // R-330
ataUDMACRCErrorCount = 199 // R-330
)
// parseSMART maps smartctl JSON to a hub.SmartSummary, handling SATA + NVMe and degrading
@@ -85,6 +88,12 @@ func parseSMART(raw []byte) hub.SmartSummary {
s.PendingSectors = intPtr(int(a.Raw.Value))
case ataOfflineUncorrect:
s.OfflineUncorrectable = intPtr(int(a.Raw.Value))
case ataReportedUncorrect:
s.ReportedUncorrect = int64Ptr(a.Raw.Value)
case ataCommandTimeout:
s.CommandTimeout = int64Ptr(a.Raw.Value)
case ataUDMACRCErrorCount:
s.UDMACRCErrors = int64Ptr(a.Raw.Value)
}
}
}
@@ -142,3 +151,5 @@ func parseThinPoolMetadata(raw []byte) (float64, bool) {
}
func intPtr(v int) *int { return &v }
func int64Ptr(v int64) *int64 { return &v }