Skip to content

Commit

Permalink
Exclude cached memory on docker input plugin (#4383)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienmathevet authored and glinton committed Jul 17, 2018
1 parent f363e70 commit 4c27862
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/inputs/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,11 +534,11 @@ func parseContainerStats(

if daemonOSType != "windows" {
memfields["limit"] = stat.MemoryStats.Limit
memfields["usage"] = stat.MemoryStats.Usage
memfields["max_usage"] = stat.MemoryStats.MaxUsage

mem := calculateMemUsageUnixNoCache(stat.MemoryStats)
memLimit := float64(stat.MemoryStats.Limit)
memfields["usage"] = uint64(mem)
memfields["usage_percent"] = calculateMemPercentUnixNoCache(memLimit, mem)
} else {
memfields["commit_bytes"] = stat.MemoryStats.Commit
Expand Down

0 comments on commit 4c27862

Please sign in to comment.