mirror of https://github.com/cjbassi/gotop.git
Fix disk IO stats
This commit is contained in:
parent
0ed7e58984
commit
7978b4ed5f
|
@ -116,7 +116,7 @@ func (self *Disk) update() {
|
||||||
log.Printf("failed to get partition read/write info from gopsutil: %v. Part: %v", err, Part)
|
log.Printf("failed to get partition read/write info from gopsutil: %v. Part: %v", err, Part)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
data := ret[Part.Device]
|
data := ret[strings.Replace(Part.Device, "/dev/", "", -1)]
|
||||||
curRead, curWrite := data.ReadBytes, data.WriteBytes
|
curRead, curWrite := data.ReadBytes, data.WriteBytes
|
||||||
if Part.TotalRead != 0 { // if this isn't the first update
|
if Part.TotalRead != 0 { // if this isn't the first update
|
||||||
readRecent := curRead - Part.TotalRead
|
readRecent := curRead - Part.TotalRead
|
||||||
|
|
Loading…
Reference in New Issue