On 9/2/14 at 8:14 PM, [email protected] (Aryeh Leib Taurog) pronounced:

On Tue, Sep 02, 2014 at 12:44:43PM -0400, Chris McDonough wrote:
On 09/02/2014 05:03 AM, Steve Piercy - Website Builder wrote:
Is there a CPU monitoring plugin utility for Supervisor, like memmon in
superlance monitors memory?

Theoretically, the data is available.  memmon uses "ps" to get the
memory size of prorcesses, and could get the CPU usage data from ps
as well.

But CPU usage is typically a lot more dynamic than memory usage, and
some sort of restart trigger based on "using too much (or too
little) CPU" would be very application- and environment-specific,
and not easily generalizable.  I think you would be forced to write
your own event listener, possibly starting from the code in memmon.

One could monitor cpu time and compare it with real time. That should be reasonably easy, since both increase monotonically.

On modern linux systems, cgroups also provides a mechanism for limiting resource consumption, including cpu usage.

Thanks, y'all.  I reckoned that monitoring CPU would be a challenge.

I got elbows deep in 'ps' and learned a few things, like -o to give me pretty output.

    ps -u<user> -o pid,pcpu,pmem,command

I'm reading and re-reading cgroups docs, but I'm having a hard time absorbing it.
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/ch01.html

Anyone have a "cgroups for Dummies" reference?

--steve

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy              Website Builder              Soquel, CA
<[email protected]>               <http://www.StevePiercy.com/>

_______________________________________________
Supervisor-users mailing list
[email protected]
https://lists.supervisord.org/mailman/listinfo/supervisor-users

Reply via email to