Check_cpu

Hugo van der Kooij hvdkooij at vanderkooij.org
Fri Oct 10 23:33:38 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Patrick Morris wrote:
> Hi Hugo!
> 
> On Fri, 10 Oct 2008, Hugo van der Kooij wrote:
> 
>> Patrick Morris wrote:
>>> On Thu, 09 Oct 2008, Michael Fern?ndez M wrote:
>>>
>>>> Hi,
>>>>
>>>> Someone knows a plugin to check the cpu, but only if it's at 90% for 5
>>>> minutes?
>>>>
>>>> I do not need to check the cpu peak.....
>>>>
>>>> Is for Linux... (Centos 5.2)
>>> The standard check_cpu can do this.  Set the max to 90 and the retries
>>> to 5, one minute apart.  It'll check 5 times and alert if the CPU was
>>> over 90 all five times.
>> It will take 5 (not so) random snapshots of the CPU usage at that moment.
>>
>> If you want to monitor averages you could gather statistics wit RRD and
>> read the CPU counter to store those.
>>
>> You can then also use RRD to check for the average over the last N minutes.
>>
>> Sounds like a fun thing to make. But I get a lot of those
>>  in the queue and no immediate need for this particular fun project.
> 
> At the risk of belaboring the point, if the goal is to see if CPU
> remains over 90% for five minutes, and five samples at one-minute
> intervals all say it was over 90%, how would the results be different
> if you were sampling the CPU counter and throwing it into RRD?

At 0:00:00 you CPU is 95% busy, it drops to 9% at 0:00:03, then raises
to 93% at 0:00:54, drops to 7% at 0:01:08, .......

So what is you average if you only check at the whole minutes? And what
if you double the amount of samples?

So the best way is to do this the same way you would do this with
network interfaces. Take an interval and see how much time the CPU spend
in system, nice and user land.

Hugo.

- --
hvdkooij at vanderkooij.org               http://hugo.vanderkooij.org/
PGP/GPG? Use: http://hugo.vanderkooij.org/0x58F19981.asc

	A: Yes.
	>Q: Are you sure?
	>>A: Because it reverses the logical flow of conversation.
	>>>Q: Why is top posting frowned upon?

Bored? Click on http://spamornot.org/ and rate those images.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFI78oNBvzDRVjxmYERArz3AJkBlVsgN0kb2JcBcwgSWsZZRpQgAgCgnKbq
5fDqYbM02PqcjyPM11UY2so=
=46sx
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list