Skip to content

Commit

Permalink
influxdata#4375 - use memory usage without memory cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Mathevet committed Jul 6, 2018
1 parent a0ece79 commit 4c9603d
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 @@ -527,11 +527,11 @@ func gatherContainerStats(

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 4c9603d

Please sign in to comment.