Update gopsutil dependency

closes #1233
This commit is contained in:
Cameron Sparr
2016-05-19 15:05:08 +01:00
parent f176c28a56
commit 56aee1ceee
10 changed files with 62 additions and 61 deletions

View File

@@ -11,7 +11,7 @@ import (
type CPUStats struct {
ps PS
lastStats []cpu.CPUTimesStat
lastStats []cpu.TimesStat
PerCPU bool `toml:"percpu"`
TotalCPU bool `toml:"totalcpu"`
@@ -105,7 +105,7 @@ func (s *CPUStats) Gather(acc telegraf.Accumulator) error {
return nil
}
func totalCpuTime(t cpu.CPUTimesStat) float64 {
func totalCpuTime(t cpu.TimesStat) float64 {
total := t.User + t.System + t.Nice + t.Iowait + t.Irq + t.Softirq + t.Steal +
t.Guest + t.GuestNice + t.Idle
return total