<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.24.1.1">
</HEAD>
<BODY>
Anthony,<BR>
<BR>
I need to know the state (waiting i/o ,running or runnable) of every porcess within each container.<BR>
what you told me only shows PID's created within the container .<BR>
May be i haven't   explained clearly.<BR>
<BR>
I know i can see that watching the file /proc/stat but it is a global state.<BR>
I need to watch the field called "procs_running" separated for each container.<BR>
<BR>
Thanks!<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<PRE>
<B><I>Sergio D. Troiano</I></B>
<I>Development Team.</I>

<IMG SRC="cid:1294284430.6765.0.camel@linux-i1mn" ALIGN="bottom" BORDER="0">
<I>Av. de los Incas 3085</I>
<I>(C1426ELA) Capital Federal </I>
</PRE>
</TD>
</TR>
</TABLE>
<BR>
<BR>
On Wed, 2011-01-05 at 16:24 -0600, C Anthony Risinger wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
On Wed, Jan 5, 2011 at 2:14 PM, Sergio Daniel Troiano
<<A HREF="mailto:sergio.troiano@elserver.com">sergio.troiano@elserver.com</A>> wrote:
>
> Hi,
>
> i'm using LXC and it works excellent!
>
> The only problem that i found is the information within the container on the file called /proc/stat is global.,
> I have got a lot of containers which must send out their stat information (in special the value called "procs_running")  because other server uses those data to calculate a kind of "load balance".
>
> I need to know how many processes are running or ready to run  diferentiating each container.
>
> I've tried to get the total  looking up in every /proc/pid/status (Field "State:") then addend each "running" match i could get the result.
>
> But it was not  possible  because my while script has got a high frequency (it is necesary because i need to get an average)
> The result is a high load on my server

you'll want to mount the cgroup filesystem (you probably already have)
and look in it for all kinds of goodies and psuedo-files relating to
your containers.  the one your looking for is called `tasks`.

C Anthony

</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>