Skip to content
Permalink
Browse files

Add more logging for Disk widget

  • Loading branch information...
cjbassi committed Dec 5, 2018
1 parent a3c934e commit cfcb48986207dd1c2f930f8788cbdc342e388691
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/widgets/disk.go
@@ -96,7 +96,7 @@ func (self *Disk) update() {
for _, Part := range self.Partitions {
usage, err := psDisk.Usage(Part.Mount)
if err != nil {
log.Printf("failed to get partition usage statistics from gopsutil: %v. Part.Mount: %v", err, Part.Mount)
log.Printf("failed to get partition usage statistics from gopsutil: %v. Part: %v", err, Part)
}
Part.UsedPercent = int(usage.UsedPercent)

@@ -105,7 +105,7 @@ func (self *Disk) update() {

ret, err := psDisk.IOCounters("/dev/" + Part.Device)
if err != nil {
log.Printf("failed to get partition read/write info from gopsutil: %v. Part.Device: %v", err, Part.Device)
log.Printf("failed to get partition read/write info from gopsutil: %v. Part: %v", err, Part)
}
data := ret[Part.Device]
curRead, curWrite := data.ReadBytes, data.WriteBytes

0 comments on commit cfcb489

Please sign in to comment.
You can’t perform that action at this time.