check_process for threads possible

Roman Fiedler roman.fiedler at telbiomed.at
Thu Feb 5 17:50:38 CET 2009


Thomas Guyot-Sionnest wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 05/02/09 04:19 AM, Roman Fiedler wrote:
>> Hi list,
>>
>> On one machine the count of processes with check_procs and "ps aux"
>> stays the same (17), but the number of threads is increasing until one
>> application breaks. "ps auxH" then lists>  500 elements. Is there a
>> possibility to count these threads using check_procs?
>
> You can manually override the ps command for check-procs - i.e. you
> could add the argument to show threads.
>
> See "./configure --help" and look into config.h for the surrend command
> definition.

Thanks for the tip, I did not know that the plugin uses ps for process 
listing itself. Since I'm lazy recompiling a binary for multiple 
platforms and because I need both normal and extended check_procs, I 
just substituted "/bin/ps" with "/binnps" in the binary and created a 
shell script /binnps with content

#!/bin/bash
/bin/ps axHwo 'stat uid pid ppid vsz rss pcpu comm args'

which then works as expected:

root# ./check_procs -w 100 -c 200
PROCS OK: 17 processes
root# ./check_procs_thread -w 100 -c 200
PROCS OK: 72 processes

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
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