(args *MemoryResponse, res *MemoryResponse)
| 113 | } |
| 114 | |
| 115 | func (s *Stats) Memory(args *MemoryResponse, res *MemoryResponse) error { |
| 116 | log.WithFields(log.Fields{ |
| 117 | "plugin": s.GetName(), |
| 118 | "method": "Memory", |
| 119 | }).Debug("Gathering MEM stats") |
| 120 | |
| 121 | v, err := mem.VirtualMemory() |
| 122 | swap, err := mem.SwapMemory() |
| 123 | |
| 124 | if err != nil { |
| 125 | return err |
| 126 | } |
| 127 | |
| 128 | res.Memory = v |
| 129 | res.Swap = swap |
| 130 | return nil |
| 131 | } |
| 132 | |
| 133 | func (s *Stats) DiskSpace(args *StatsArgs, res *StatsResponse) error { |
| 134 | log.WithFields(log.Fields{ |