-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
podman stats
reports only the container's PID 1 information, which is not so useful for systemd containers
#12400
Labels
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
Comments
giuseppe
added a commit
to giuseppe/libpod
that referenced
this issue
Nov 24, 2021
improve the heuristic to detect the scope that was created for the container. This is necessary with systemd running as PID 1, since it moves itself to a different sub-cgroup, thus stats would not account for other processes in the same container. Closes: containers#12400 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
opened a PR: #12403 |
giuseppe
added a commit
to giuseppe/libpod
that referenced
this issue
Nov 24, 2021
improve the heuristic to detect the scope that was created for the container. This is necessary with systemd running as PID 1, since it moves itself to a different sub-cgroup, thus stats would not account for other processes in the same container. Closes: containers#12400 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
giuseppe
added a commit
to giuseppe/libpod
that referenced
this issue
Nov 24, 2021
improve the heuristic to detect the scope that was created for the container. This is necessary with systemd running as PID 1, since it moves itself to a different sub-cgroup, thus stats would not account for other processes in the same container. Closes: containers#12400 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
giuseppe
added a commit
to giuseppe/libpod
that referenced
this issue
Nov 24, 2021
improve the heuristic to detect the scope that was created for the container. This is necessary with systemd running as PID 1, since it moves itself to a different sub-cgroup, thus stats would not account for other processes in the same container. Closes: containers#12400 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
giuseppe
added a commit
to giuseppe/libpod
that referenced
this issue
Nov 24, 2021
improve the heuristic to detect the scope that was created for the container. This is necessary with systemd running as PID 1, since it moves itself to a different sub-cgroup, thus stats would not account for other processes in the same container. Closes: containers#12400 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
mheon
pushed a commit
to mheon/libpod
that referenced
this issue
Dec 6, 2021
improve the heuristic to detect the scope that was created for the container. This is necessary with systemd running as PID 1, since it moves itself to a different sub-cgroup, thus stats would not account for other processes in the same container. Closes: containers#12400 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> <MH: Fixed cherry-pick conflicts> Signed-off-by: Matthew Heon <mheon@redhat.com>
github-actions
bot
added
the
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
label
Sep 21, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
/kind bug
Description
podman stats
seems to report the container's PID 1 information, and this is perhaps not as useful for systemd containers.Steps to reproduce the issue:
podman stats
Describe the results you received:
The returned stats are for the container's PID 1 only (e.g. systemd) and excludes other processes. This can be confirmed by
strace
ing podman (using memory for this example):If instead the containers' parent cgroup is inspected, a more reasonable number is obtained:
Describe the results you expected:
By default as a user I expected
podman stats
to give me numbers "for the whole container".I imagine there may be a compatibility concern where historically containers have been single-process and thus
podman stats
should continue to report only about PID 1. Perhaps then a flag could be added.Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
I have not tried the latest version of podman, but I have tried with locally built
crun
from a recent commit and that made no difference.Additional environment details (AWS, VirtualBox, physical, etc.):
Base system is centos 8, but running the latest elrepo kernel. systemd configured to use the unified hierarchy. SELinux is in permissive mode.
The text was updated successfully, but these errors were encountered: