diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-10-23 15:43:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-23 15:43:49 +0200 |
commit | ef556cfecf4d41f63c03eedf127683dad7797e71 (patch) | |
tree | 9d2eb86f75ff52c4d220eaa2117ced3f77889156 /cmd | |
parent | 46ad6bc1faac82555a9e6cfea93536e2a504e2e8 (diff) | |
parent | 77a2bbb1c0df2536638e5a9030cda05d6524513e (diff) | |
download | podman-ef556cfecf4d41f63c03eedf127683dad7797e71.tar.gz podman-ef556cfecf4d41f63c03eedf127683dad7797e71.tar.bz2 podman-ef556cfecf4d41f63c03eedf127683dad7797e71.zip |
Merge pull request #4275 from vrothberg/fix-4274
stats: list all running containers unless specified otherwise
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/stats.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/cmd/podman/stats.go b/cmd/podman/stats.go index 25514ec75..f8c476386 100644 --- a/cmd/podman/stats.go +++ b/cmd/podman/stats.go @@ -35,7 +35,7 @@ var ( statsDescription = "Display percentage of CPU, memory, network I/O, block I/O and PIDs for one or more containers." _statsCommand = &cobra.Command{ - Use: "stats [flags] CONTAINER [CONTAINER...]", + Use: "stats [flags] [CONTAINER...]", Short: "Display a live stream of container resource usage statistics", Long: statsDescription, RunE: func(cmd *cobra.Command, args []string) error { @@ -44,9 +44,6 @@ var ( statsCommand.Remote = remoteclient return statsCmd(&statsCommand) }, - Args: func(cmd *cobra.Command, args []string) error { - return checkAllAndLatest(cmd, args, false) - }, Example: `podman stats --all --no-stream podman stats ctrID podman stats --no-stream --format "table {{.ID}} {{.Name}} {{.MemUsage}}" ctrID`, @@ -92,8 +89,6 @@ func statsCmd(c *cliconfig.StatsValues) error { if ctr > 1 { return errors.Errorf("--all, --latest and containers cannot be used together") - } else if ctr == 0 { - return errors.Errorf("you must specify --all, --latest, or at least one container") } runtime, err := libpodruntime.GetRuntime(getContext(), &c.PodmanCommand) |