Commit Graph

3 Commits

Author SHA1 Message Date
Doug Rabson bb57c1631c libpod: add 'pod top' support on FreeBSD
This shares code with 'container top' which runs ps on the host,
filtering for the containers that are part of the pod.
(*Container).jailName is modified to take into account the possiblity
that the container is in a pod - this also fixes stats reporting for
pods on FreeBSD.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2023-07-28 10:52:20 +01:00
Stefan Grundmann a6a207673e libpod: fix FreeBSD 'podman-remote top' default behaviour
use the 'pf -ef' compatible default when the descriptor argument
of Top() is []string{""} or []string{}

why:

the call to Top() in

pkg/api/handlers/compat/containers_top.go#L62C3-L62C3

passes []string{""} descriptors whenever ps_args is empty (the
default value for libpod requests) because of golang strings.Split()
semantics.

[NO NEW TESTS NEEDED]

Signed-off-by: Stefan Grundmann <sg2342@googlemail.com>
2023-07-23 03:01:00 +00:00
Doug Rabson 9e6b37ec1d libpod: Add support for 'podman top' on FreeBSD
This simply runs ps(1) on the host and filters for processes inside the
container.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-10-17 16:43:53 +01:00