From 261695c14c2d768f392cfb774e7940660edaa3d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Guillot?= Date: Tue, 19 Jun 2018 20:55:29 -0700 Subject: [PATCH] Improve memory usage debug log --- daemon/daemon.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daemon/daemon.go b/daemon/daemon.go index fb759482..cdd81ef1 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -32,8 +32,9 @@ func Run(cfg *config.Config, store *storage.Storage) { for { var m runtime.MemStats runtime.ReadMemStats(&m) - logger.Debug("Alloc=%vK, TotalAlloc=%vK, Sys=%vK, NumGC=%v, GoRoutines=%d, NumCPU=%d", - m.Alloc/1024, m.TotalAlloc/1024, m.Sys/1024, m.NumGC, runtime.NumGoroutine(), runtime.NumCPU()) + logger.Debug("Sys=%vK, InUse=%vK, HeapInUse=%vK, StackSys=%vK, StackInUse=%vK, GoRoutines=%d, NumCPU=%d", + m.Sys/1024, (m.Sys-m.HeapReleased)/1024, m.HeapInuse/1024, m.StackSys/1024, m.StackInuse/1024, + runtime.NumGoroutine(), runtime.NumCPU()) time.Sleep(30 * time.Second) } }()