[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [monit] How to exclude child processes for monitoring?

From: Martin Pala
Subject: Re: [monit] How to exclude child processes for monitoring?
Date: Tue, 18 Mar 2008 22:09:23 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20080129 Iceape/1.1.8 (Debian-1.1.8-4)


the "cpu" test was changed to monitor just the cpu usage of the process and new "totalcpu" test was added which monitors the total cpu usage of the process and its child processes.

The new monit version is expected ca. till the end of April or sooner.

For those who need it sooner ... the cvs version is here:


Martin Pala wrote:

your guess is correct, currently the cpu test checks for total including child processes, this is documented in monit manual as well:

Process only resource tests:

CPU is the CPU usage of the process and its children in
parts of hundred (percent).

I think we should change this and align it with memory test behavior, where by default it checks for the memory of the process itself and optionally including child.

Current syntax ... example:

  if cpu > 60% then ... (including child processes)

  if mem > 100 MB then ... (process itself)

  if totalmem > 1000 MB then ... (including child processes)

=> we can:

1.) add:
  if totalcpu > 60% then ... (including child processes)

2.) change the "if cpu ..." to test just cpu usage of the process itself. We will have to warn users about the behavior change, but it is possible that many users thinks that it works this way already. The "system" service type should handle both "cpu" and "totalcpu" same way.

What does other developers and monit users think?


Ismo Tanskanen wrote:
Hello to all,

I have weird problem. I use monit to monitor mythtv backend. It works great.

Problem is, that I have AMD X2 cpu, and monit somehow sees cpu usage wrong. Mythbackend sometimes locks and starts using 100% cpu (top reading). For some reason monit only shows it using 50%. I think this is due X2 cpu.

This is not problem, I have set cpu limit to 45% what works great in most situations.

But, myth can start processes, like mythtranscode, and mencoder. I think monit sees them as child processes. And, when myth starts those processes, monit suddenly sees it using more than 50% cpu. Are processes using different cpus and monit calculates summary?

At this situation, monit thinks, that myth has reached cpu usage limit, and restarts it. This causes problems to because after restart myth starts those processes again, and again... until whole machine crashes.

So is there a way to monitor mythbackend process, not it's child processes for cpu usage?


- Kane

To unsubscribe:

To unsubscribe:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]