[Nagiosplug-help] RE: check_procs

Volker.Aust at premiere.de Volker.Aust at premiere.de
Tue Oct 8 00:37:05 CEST 2002


Hi Tom,

> -----Original Message-----
> From: Tom Welsh [mailto:twelsh at tcplan.net]
> Sent: Monday, October 07, 2002 7:47 PM
> To: Volker.Aust at premiere.de
> Cc: nagiosplug-help at lists.sourceforge.net
> Subject: Re: check_procs
> 
> 
> Hi Volker. 
> 
> The line is defined in plugin/congig.h as follows 
> 
> #define PS_COMMAND "/bin/ps -axo 'stat uid ppid comm args'"
> #define PS_FORMAT "%s %d %d %s %n"
> #define PS_RAW_COMMAND "/bin/ps -axo 'stat user ppid args'"
> #define PS_VARLIST procstat,&procuid,&procppid,procprog,&pos 
> 
> when i run "/bin/ps -axo 'stat uid ppid comm args'
> I get the following output...
> pod-163:/home/twelsh/# /bin/ps -axo 'stat user ppid args'
> Bad syntax, perhaps a bogus '-'?   <<----- AHH maybe prob
> STAT USER      PPID COMMAND
> S    root         0 init [2]
> SW   root         1 [keventd]
> SWN  root         0 [ksoftirqd_CPU0]
> SW   root         0 [kswapd]
> SW   root         0 [bdflush]
> SW   root         0 [kupdated]
> SW   root         1 [kjournald]
> SW   root         1 [kjournald] 
> 
> when you rin the command as "/bin/ps axo 'stat uid ppid comm args'
> I get the following results 
> 
> pod-163:/home/twelsh/bin/ps axo 'stat uid ppid comm args'
> STAT   UID  PPID COMMAND          COMMAND
> S        0     0 init             init [2]
> SW       0     1 keventd          [keventd]
> SWN      0     0 ksoftirqd_CPU0   [ksoftirqd_CPU0]
> SW       0     0 kswapd           [kswapd]
> SW       0     0 bdflush          [bdflush]
> SW       0     0 kupdated         [kupdated]
> SW       0     1 kjournald        [kjournald]
> SW       0     1 kjournald        [kjournald] 
> 
> 
> So is that a sysV thing. How do i get it to compile without the '-'? 
> 
> cheers 
> 
> Tom 
> 

My first try would be to edit the config.h (delete the '-') and do a make.
On my two Nagios systems (solaris8 x86 prod and redhat 6.2 test) the
configure has found the right options for the ps-command. So I have no
testing ground.

-vol




More information about the Help mailing list