MCPcopy Create free account
hub / github.com/MertJSX/folderhost / GetAllServicesRAM

Method GetAllServicesRAM

utils/service_utils/ram_management.go:136–150  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

134}
135
136func (sm *ServiceManager) GetAllServicesRAM() map[string]int64 {
137 sm.Mu.RLock()
138 defer sm.Mu.RUnlock()
139
140 result := make(map[string]int64)
141 for name, s := range sm.Services {
142 s.mu.RLock()
143 if s.Status == "running" && s.PID > 0 {
144 ram, _ := getProcessTreeRAM(s.PID)
145 result[name] = ram
146 }
147 s.mu.RUnlock()
148 }
149 return result
150}
151
152func (sm *ServiceManager) StartMonitoring(name string) {
153 sm.Mu.RLock()

Callers

nothing calls this directly

Calls 1

getProcessTreeRAMFunction · 0.85

Tested by

no test coverage detected