From 084241a37b5d3f680228e6bd6cb50f9d0507a365 Mon Sep 17 00:00:00 2001 From: Aleksa Sarai Date: Sat, 12 Mar 2016 14:45:30 +1100 Subject: [PATCH] client: stats: fill in stats info on client This code was lost in a rebase in the PIDs cgroup merge, fix it so that `docker stats` actually shows statistics from the PIDs cgroup. Signed-off-by: Aleksa Sarai --- api/client/stats_helpers.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/client/stats_helpers.go b/api/client/stats_helpers.go index 5c88b7424d..404c3ff196 100644 --- a/api/client/stats_helpers.go +++ b/api/client/stats_helpers.go @@ -116,6 +116,7 @@ func (s *containerStats) Collect(cli client.APIClient, streamStats bool, waitFir s.NetworkRx, s.NetworkTx = calculateNetwork(v.Networks) s.BlockRead = float64(blkRead) s.BlockWrite = float64(blkWrite) + s.PidsCurrent = v.PidsStats.Current s.mu.Unlock() u <- nil if !streamStats { @@ -137,6 +138,7 @@ func (s *containerStats) Collect(cli client.APIClient, streamStats bool, waitFir s.NetworkTx = 0 s.BlockRead = 0 s.BlockWrite = 0 + s.PidsCurrent = 0 s.mu.Unlock() // if this is the first stat you get, release WaitGroup if !getFirst {