LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Containers
User Name
Password
Linux - Containers This 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


Reply
  Search this Thread
Old 11-15-2021, 04:41 AM   #1
comboloid12
LQ Newbie
 
Registered: Nov 2021
Posts: 2

Rep: Reputation: Disabled
Using atop with linux containers


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?
 
Old 11-15-2021, 05:02 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,924

Rep: Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319
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.
 
Old 11-15-2021, 05:48 AM   #3
comboloid12
LQ Newbie
 
Registered: Nov 2021
Posts: 2

Original Poster
Rep: Reputation: Disabled
"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.
 
Old 11-15-2021, 06:37 AM   #4
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Perhaps, atopsar can do this.
 
Old 11-17-2021, 03:23 PM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,671
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
"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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Everything You Need to Know about Linux Containers, Part II: Working with Linux Containers (LXC) LXer Syndicated Linux News 0 08-27-2018 01:53 PM
LXer: Starch Linux: OpenBSD Atop Arch's Linux Kernel LXer Syndicated Linux News 0 01-25-2013 10:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Containers

All times are GMT -5. The time now is 03:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration