Fix disk IO stats

This commit is contained in:
zp 2019-02-21 15:55:46 -06:00
parent 0ed7e58984
commit 7978b4ed5f
1 changed files with 1 additions and 1 deletions

View File

@ -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