From 04470dd4cea6b4ebce8c715f1b467115107778bb Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Fri, 15 Jan 2021 01:41:49 -0800 Subject: [PATCH] return mem in bytes --- agent/process_windows.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent/process_windows.go b/agent/process_windows.go index f1f705a..dda1c39 100644 --- a/agent/process_windows.go +++ b/agent/process_windows.go @@ -10,7 +10,7 @@ import ( type ProcessMsg struct { Name string `json:"name"` Pid int `json:"pid"` - Mem string `json:"memory_percent"` + MemBytes uint64 `json:"membytes"` Username string `json:"username"` UID int `json:"id"` CPU string `json:"cpu_percent"` @@ -40,7 +40,7 @@ func (a *WindowsAgent) GetProcsRPC() []ProcessMsg { ret = append(ret, ProcessMsg{ Name: p.Name, Pid: p.PID, - Mem: ByteCountSI(m.Resident), + MemBytes: m.Resident, Username: user, UID: i, CPU: fmt.Sprintf("%.1f", cpu),