diff options
Diffstat (limited to 'devices/cpu_cpu.go')
-rw-r--r-- | devices/cpu_cpu.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/devices/cpu_cpu.go b/devices/cpu_cpu.go index a1d20cd..42eff2e 100644 --- a/devices/cpu_cpu.go +++ b/devices/cpu_cpu.go @@ -23,7 +23,11 @@ func init() { } for i := 0; i < len(vals); i++ { key := fmt.Sprintf(formatString, i) - cpus[key] = int(vals[i]) + v := vals[i] + if v > 100 { + v = 100 + } + cpus[key] = int(v) } return nil } |