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 {
5353 return iface .push (args )
5454}
5555
56- // {{key}} {{value}}
5756type PushFormat string
5857type PushPair struct {
5958 key string
Original file line number Diff line number Diff line change @@ -264,16 +264,17 @@ func parseCPUStatus(s string) error {
264264 if err != nil {
265265 return err
266266 }
267- total := 0
268- for i := 2 ; i < 11 ; i ++ {
267+ used := sys + user
268+ total := used
269+ for i := 3 ; i < 8 ; i ++ {
269270 v , err := strconv .Atoi (fields [i ])
270271 if err != nil {
271272 return err
272273 }
273274 total += v
274275 }
275276 Status .CPU [i ].TimeSequence .Update (& cpuOneTimeStatus {
276- Used : user + sys ,
277+ Used : used ,
277278 Total : total ,
278279 })
279280 }
You can’t perform that action at this time.
0 commit comments