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.
_______________________________________________
Supervisor-users mailing list
Supervisor-users@lists.supervisord.org
https://lists.supervisord.org/mailman/listinfo/supervisor-users

Reply via email to