(args int, res *CpuResponse)
| 95 | } |
| 96 | |
| 97 | func (s *Stats) Cpu(args int, res *CpuResponse) error { |
| 98 | log.WithFields(log.Fields{ |
| 99 | "plugin": s.GetName(), |
| 100 | "method": "Cpu", |
| 101 | }).Debug("Gathering CPU stats") |
| 102 | |
| 103 | t, err := cpu.Times(false) |
| 104 | i, err := cpu.Info() |
| 105 | if err != nil { |
| 106 | return err |
| 107 | } |
| 108 | |
| 109 | res.Times = t |
| 110 | res.Info = i |
| 111 | |
| 112 | return nil |
| 113 | } |
| 114 | |
| 115 | func (s *Stats) Memory(args *MemoryResponse, res *MemoryResponse) error { |
| 116 | log.WithFields(log.Fields{ |