summaryrefslogtreecommitdiff
path: root/cmd/podman/stats.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-08-08 15:16:01 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-17 07:55:36 +0000
commitbf741b3ea30f9431775f03cca081758efcb780b1 (patch)
tree07e1b78dc585c2f4c70c04ef49b8c7cd92d59193 /cmd/podman/stats.go
parent1b87fbc591bf13bc7ba55d5a70334237fe8620d7 (diff)
downloadpodman-bf741b3ea30f9431775f03cca081758efcb780b1.tar.gz
podman-bf741b3ea30f9431775f03cca081758efcb780b1.tar.bz2
podman-bf741b3ea30f9431775f03cca081758efcb780b1.zip
podman pod stats
add the ability to monitor container statistics in a pod. Signed-off-by: baude <bbaude@redhat.com> Closes: #1265 Approved by: rhatdan
Diffstat (limited to 'cmd/podman/stats.go')
-rw-r--r--cmd/podman/stats.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/podman/stats.go b/cmd/podman/stats.go
index cb89b8a9d..6d54147f6 100644
--- a/cmd/podman/stats.go
+++ b/cmd/podman/stats.go
@@ -138,6 +138,10 @@ func statsCmd(c *cli.Context) error {
id := ctr.ID()
if _, ok := containerStats[ctr.ID()]; !ok {
initialStats, err := ctr.GetContainerStats(&libpod.ContainerStats{})
+ if errors.Cause(err) == libpod.ErrCtrRemoved || errors.Cause(err) == libpod.ErrNoSuchCtr {
+ // skip dealing with a container that is gone
+ continue
+ }
if err != nil {
return err
}