mirror of
https://github.com/lzh-1625/go_process_manager.git
synced 2025-10-05 07:56:50 +08:00
add cpu and memery total info
This commit is contained in:
@@ -283,7 +283,7 @@ func (p *ProcessBase) monitorHanler() {
|
||||
}
|
||||
p.AddRecordTime()
|
||||
p.AddCpuUsage(cpuPercent)
|
||||
p.AddMemUsage(float64(memInfo.RSS) / 1024.0)
|
||||
p.AddMemUsage(float64(memInfo.RSS >> 10))
|
||||
// log.Logger.Debugw("进程资源使用率获取成功", "cpu", cpuPercent, "mem", memInfo.RSS)
|
||||
select {
|
||||
case <-ticker.C:
|
||||
|
Reference in New Issue
Block a user