Drive tile counts each source device once (a bind mount doubled nexus's NVMe)

fs.* sensors carry a source label; Top.tsx dedupes by it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Mitchell-Johnson
2026-11-11 00:06:33 -08:00
co-authored by Claude Opus 5.5
parent 574d9855ce
commit a6d7ff436f
5 changed files with 12 additions and 4 deletions
+3
View File
@@ -137,6 +137,9 @@ func flatten(s Sample, want func(id string) bool) []sensors.Sensor {
if x.Disk != "" {
lbl = append(lbl, "disk", x.Disk)
}
if x.Source != "" {
lbl = append(lbl, "source", x.Source)
}
f.add(p+".size", x.Mount+" size", "bytes", "B", float64(x.Size), s.fsT, none, lbl...)
f.add(p+".used", x.Mount+" used", "bytes", "B", float64(x.Used), s.fsT, upTo(float64(x.Size)), lbl...)
f.add(p+".used_pct", x.Mount+" used", "usage", "%", ratio(x.Used, x.Size), s.fsT, pct, lbl...)