Linux - ContainersThis forum is for the discussion of all topics relating to Linux containers. Docker, LXC, LXD, runC, containerd, CoreOS, Kubernetes, Mesos, rkt, and all other Linux container platforms are welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have used atop succesfully in the past with other setups, but not with linux containers. The case scenario is this:
1. I install atop in the LXD machine
2. I run some hoggy process inside the container
3. Atop shows the running process, so you can actively find out which containers runs it.
What about when you want to find out which container was running a process some hours ago? Is it possible to see in atop under which cgroup was running it?
atop can only check the currently running processes. There is no way "to find out which container was running a process some hours ago" (with atop).
atop itself cannot handle containers.
"atop can only check the currently running processes."
Well, not exactly as long as you can check the history of atop depending on the interval you set in it's config. You can actively see which container is running the process on the go, the question is if you can somehow check it out from the history of it.
"Containers" really have nothing to do with this essential question. What you're looking for is some kind of history of what has happened in the past ... and you also wish to be able to link a particular host process-id to a container.
This necessarily requires that some historical record exists – produced by the container manager –*which will enable you to associate the "pid" of a now-long-gone process with the container-id that was responsible for originally spawning it. I am not presently aware of any tool which does this.
Whenever a process is "running in a container," from the host operating system's perspective it is simply "an ordinary process, running on the host, but wearing rose-colored glasses." Unlike a virtual machine, there is no physical thing which corresponds to "a container." It is simply a set of parameters – system settings.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.