From 7978b4ed5fa13d22bb61f2aa0800acf9f1eae10f Mon Sep 17 00:00:00 2001 From: zp Date: Thu, 21 Feb 2019 15:55:46 -0600 Subject: [PATCH] Fix disk IO stats --- src/widgets/disk.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/disk.go b/src/widgets/disk.go index 4246cb7..6365eac 100644 --- a/src/widgets/disk.go +++ b/src/widgets/disk.go @@ -116,7 +116,7 @@ func (self *Disk) update() { log.Printf("failed to get partition read/write info from gopsutil: %v. Part: %v", err, Part) continue } - data := ret[Part.Device] + data := ret[strings.Replace(Part.Device, "/dev/", "", -1)] curRead, curWrite := data.ReadBytes, data.WriteBytes if Part.TotalRead != 0 { // if this isn't the first update readRecent := curRead - Part.TotalRead