omit cache from memory usage stat

This commit is contained in:
Bradley Cicenas 2017-08-11 14:44:52 +00:00
parent 954aaeb06b
commit 55a356bbec

View File

@ -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))
}