We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35bfe69 commit 1550882Copy full SHA for 1550882
pkg/systemstatsmonitor/disk_collector.go
@@ -269,7 +269,16 @@ func (dc *diskCollector) collect() {
269
if dc.mBytesUsed == nil {
270
return
271
}
272
+
273
+ // to make sure that the rows are not duplicated
274
+ // we display only the only one row even if there are
275
+ // mutiple rows for the same disk.
276
+ seen := make(map[string]bool)
277
for _, partition := range partitions {
278
+ if seen[partition.Device] {
279
+ continue
280
+ }
281
+ seen[partition.Device] = true
282
usageStat, err := disk.Usage(partition.Mountpoint)
283
if err != nil {
284
glog.Errorf("Failed to retrieve disk usage for %q: %v", partition.Mountpoint, err)
0 commit comments