[Lxc-users] /proc/stat

C Anthony Risinger anthony at extof.me
Thu Jan 6 08:02:13 UTC 2011


On Wed, Jan 5, 2011 at 9:33 PM, Sergio Daniel Troiano
<sergio.troiano at elserver.com> wrote:
>
> Anthony,
>
> I need to know the state (waiting i/o ,running or runnable) of every porcess within each container.
> what you told me only shows PID's created within the container .
> May be i haven't   explained clearly.

or maybe i just glazed it too quickly :-)

> I know i can see that watching the file /proc/stat but it is a global state.
> I need to watch the field called "procs_running" separated for each container.

i'm not sure off-hand as i haven't actually used LXC in some time, but
everything useful will be in the cgroup hierarchy; /proc is not
containerized, AFAIK... indefinitely.  if the cgroup you've mounted
includes all of the `modules` (i forget the actual term), you will
have many pseudo files to use, and one or a combination of them likely
has the information you seek.

sorry i can't be more specific, but everything you can use will be in
cgroup; you'll have to forget about /proc :-( though you may also
consider putting each process into it's own cgroup... just depends of
whether that makes sense in you're use case.

C Anthony




More information about the lxc-users mailing list