[Nagiosplug-help] Problem with check_procs on FreeBSD 5.2.1 & 5.3

Voon, Ton Ton.Voon at egg.com
Fri Dec 17 05:15:03 CET 2004


I'm getting a contradiction here. You say:

$ /usr/local/nagios/libexec/check_procs -v -v -v
/bin/ps -weo 'stat uid ppid comm args'
OK - 10 processes running

But then later your config.h from 1.4-alpha3 shows:
#define PS_COMMAND "/bin/ps -weo 'stat uid ppid vsz rss pcpu etime comm
args'"

Are you sure you have compiled check_procs with the 1.4-alpha3 release?

Can you also provide a head -5 of the following:

ps -axwo 'stat comm vsz rss user uid ppid args' 
ps -weo 'stat comm vsz rss user uid ppid etime args' 
ps waxco 'state command vsz rss uid user ppid' 

May need to reorder the ps checks in configure.in. Also, what is your uname
-m, uname -s, uname -r and uname -v output?

Ton

-----Original Message-----
From: Michael Bakker [mailto:michael at securityfocus.de] 
Sent: 17 December 2004 08:30
To: nagiosplug-help at lists.sourceforge.net
Subject: Re: [Nagiosplug-help] Problem with check_procs on FreeBSD 5.2.1 &
5.3


On Thu, Dec 16, 2004 at 02:51:53PM -0000, Voon, Ton wrote:

$ /usr/local/nagios/libexec/check_procs -v -v -v
/bin/ps -weo 'stat uid ppid comm args'
OK - 10 processes running

$ grep -i ps ~/nagios-plugins-1.4.0-alpha3/config.h
/* Define to 1 if you have the `pstat_getdynamic' function. */
/* #undef HAVE_PSTAT_GETDYNAMIC */
/* Number of columns in ps command */
#define PS_COLS 9
/* Verbatim command to execute for ps in check_procs */
#define PS_COMMAND "/bin/ps -weo 'stat uid ppid vsz rss pcpu etime comm
args'"
/* Format string for scanning ps output in check_procs */ #define PS_FORMAT
"%s %d %d %d %d %f %s %s %n"
/* Variable list for sscanf of 'ps' output */
#define PS_VARLIST
procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&
pos
   (4.3BSD, SunOS 4, HP-UX, AIX PS/2) */

When I type 'ps -weo 'stat uid ppid comm args'' I really see only 10
procs:
 
$ ps -weo 'stat uid ppid comm args'
STAT   UID  PPID COMMAND             COMMAND
SLs      0 33671 bash                -bash (bash)
RL+      0 33673 ps                  ps -weo stat uid ppid comm args
ILs+     0     1 getty               /usr/libexec/getty Pc ttyv0
ILs+     0     1 getty               /usr/libexec/getty Pc ttyv1
ILs+     0     1 getty               /usr/libexec/getty Pc ttyv2
ILs+     0     1 getty               /usr/libexec/getty Pc ttyv3
ILs+     0     1 getty               /usr/libexec/getty Pc ttyv4
ILs+     0     1 getty               /usr/libexec/getty Pc ttyv5
ILs+     0     1 getty               /usr/libexec/getty Pc ttyv6
ILs+     0     1 getty               /usr/libexec/getty Pc ttyv7

I've just looked into the portage/package system of this 2 FreeBSD systems
and there is a port for "nagios-plugins" v1.3.1 (net-mgmt/nagios-plugins).
This version of check_procs works fine on FreeBSD 5.2.1 and 5.3! I will make
some diff between this version and your public version if you are interested
in fixing this issue. I'll have to leave now but here some little
information for now:

$ ./work/nagios-plugins-1.3.1/plugins/check_procs -v -v -v /bin/ps -axwo
'stat uid ppid ucomm command' OK - 95 processes running


> Michael,
> 
> What is the output from check_procs -v -v -v ?
> 
> Also, what is the ps command in config.h? If this ps command is not 
> the best one to run for FreeBSD, can you suggest an alternative?
> 
> Ton
> 
> -----Original Message-----
> From: Michael Bakker [mailto:michael at securityfocus.de]
> Sent: 16 December 2004 14:27
> To: nagiosplug-help at lists.sourceforge.net
> Subject: [Nagiosplug-help] Problem with check_procs on FreeBSD 5.2.1 & 5.3
> 
> 
> Hi,
> 
> I've got a problem with the check_procs plugin on systems with FreeBSD 
> 5.2.1 and 5.3:
> 
> $ /usr/local/nagios/libexec/check_procs
> OK - 10 processes running
> 
> There are much more processes running than 10 running - the other 
> problem
> is:
> 
> $ ps auxw | grep [c]ron
> root     419  0.0  0.3  1344  776  ??  Ss   23Jul04   1:38.28
/usr/sbin/cron
> $ /usr/local/nagios/libexec/check_procs -w 1: -C cron
> WARNING - 0 processes running with command name cron
> 
> check_procs from nagios-plugins v1.3.1 and 1.4.0-alpha3 return the 
> same results for me.

-- 
Greets,
Michael Bakker


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Nagiosplug-help mailing list Nagiosplug-help at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
::: Please include plugins version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null

-----------------------------------------
This private and confidential e-mail has been sent to you by Egg.  The Egg
group of companies includes Egg Banking plc registered no. 2999842), Egg
Financial Products Ltd (registered no. 3319027) and Egg Investments Ltd
(registered no. 3403963) which is authorised and regulated by the Financial
Services Authority. Egg Investments Ltd. is entered in the FSA register
under number 190518.     Registered in England and Wales. Registered
offices: 1 Waterhouse Square, 138-142 Holborn, London EC1N 2NA.    If you
are not the intended recipient of this e-mail and have received it in
error, please notify the sender by replying with 'received in error' as the
subject and then delete it from your mailbox.





More information about the Help mailing list