From 55a356bbec4607c0a9137c602e205645a6a27dda Mon Sep 17 00:00:00 2001 From: Bradley Cicenas Date: Fri, 11 Aug 2017 14:44:52 +0000 Subject: [PATCH] omit cache from memory usage stat --- connector/collector/docker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connector/collector/docker.go b/connector/collector/docker.go index 960e224..07bcff3 100644 --- a/connector/collector/docker.go +++ b/connector/collector/docker.go @@ -89,7 +89,7 @@ func (c *Docker) ReadCPU(stats *api.Stats) { } func (c *Docker) ReadMem(stats *api.Stats) { - c.MemUsage = int64(stats.MemoryStats.Usage) + c.MemUsage = int64(stats.MemoryStats.Usage - stats.MemoryStats.Stats.Cache) c.MemLimit = int64(stats.MemoryStats.Limit) c.MemPercent = percent(float64(c.MemUsage), float64(c.MemLimit)) }