MCPcopy Create free account
hub / github.com/bytesizedhosting/bcd / Memory

Method Memory

plugins/stats/stats.go:115–131  ·  view source on GitHub ↗
(args *MemoryResponse, res *MemoryResponse)

Source from the content-addressed store, hash-verified

113}
114
115func (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
133func (s *Stats) DiskSpace(args *StatsArgs, res *StatsResponse) error {
134 log.WithFields(log.Fields{

Callers

nothing calls this directly

Calls 1

GetNameMethod · 0.65

Tested by

no test coverage detected