File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,6 @@ func (p *Push) Push(args []*PushPair) error {
53
53
return iface .push (args )
54
54
}
55
55
56
- // {{key}} {{value}}
57
56
type PushFormat string
58
57
type PushPair struct {
59
58
key string
Original file line number Diff line number Diff line change @@ -264,16 +264,17 @@ func parseCPUStatus(s string) error {
264
264
if err != nil {
265
265
return err
266
266
}
267
- total := 0
268
- for i := 2 ; i < 11 ; i ++ {
267
+ used := sys + user
268
+ total := used
269
+ for i := 3 ; i < 8 ; i ++ {
269
270
v , err := strconv .Atoi (fields [i ])
270
271
if err != nil {
271
272
return err
272
273
}
273
274
total += v
274
275
}
275
276
Status .CPU [i ].TimeSequence .Update (& cpuOneTimeStatus {
276
- Used : user + sys ,
277
+ Used : used ,
277
278
Total : total ,
278
279
})
279
280
}
You can’t perform that action at this time.
0 commit comments