summaryrefslogtreecommitdiff
path: root/pkg/adapter/containers.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-04-09 13:07:27 -0500
committerbaude <bbaude@redhat.com>2019-04-09 15:00:35 -0500
commit23cd1928ec36a80f491b329dda3789b2dac32bcc (patch)
treec52ef533642c22cb3483790afe57e810ac615112 /pkg/adapter/containers.go
parentfe79bdd07e140176dc64ebef8da3eea2ae28b96b (diff)
downloadpodman-23cd1928ec36a80f491b329dda3789b2dac32bcc.tar.gz
podman-23cd1928ec36a80f491b329dda3789b2dac32bcc.tar.bz2
podman-23cd1928ec36a80f491b329dda3789b2dac32bcc.zip
podman-remote ps
add the ability to run ps on containers using the remote client. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/adapter/containers.go')
-rw-r--r--pkg/adapter/containers.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/adapter/containers.go b/pkg/adapter/containers.go
index 1bca99cec..598cde98e 100644
--- a/pkg/adapter/containers.go
+++ b/pkg/adapter/containers.go
@@ -304,3 +304,13 @@ func ReadExitFile(runtimeTmp, ctrID string) (int, error) {
return exitCode, nil
}
+
+// Ps ...
+func (r *LocalRuntime) Ps(c *cliconfig.PsValues, opts shared.PsOptions) ([]shared.PsContainerOutput, error) {
+ maxWorkers := shared.Parallelize("ps")
+ if c.GlobalIsSet("max-workers") {
+ maxWorkers = c.GlobalFlags.MaxWorks
+ }
+ logrus.Debugf("Setting maximum workers to %d", maxWorkers)
+ return shared.GetPsContainerOutput(r.Runtime, opts, c.Filter, maxWorkers)
+}