[Nagiosplug-help] Re: check_procs

Tom Welsh twelsh at tcplan.net
Mon Oct 7 10:48:06 CEST 2002


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 

 

 

 


Volker.Aust at premiere.de writes: 

> Hi Tom, 
> 
> check_procs calls a ps-command, this prints a error message on STDERR and
> the plugin reads this and prints the message "System call sent warnings to
> stderr". You can see the
> ps-command-line in the plugins/config.h file in the directory there you
> compile the plugins. The line looks like '#define PS_COMMAND "/bin/ps
> xxxxxxxxxxxxxxx"' where the 'xxxxxxxxxxxxx' are the parameters configured by
> the ./configure-script. What happend when you call this line? 
> 
> -vol 
> 
>> -----Original Message-----
>> From: Tom Welsh [mailto:twelsh at tcplan.net]
>> Sent: Monday, October 07, 2002 6:45 PM
>> To: nagiosplug-help at lists.sourceforge.net
>> Subject: [Nagiosplug-help] check_procs 
>> 
>> 
>> Ive just used check_procs for the first time and am getting 
>> the following 
>> error.  
>> 
>> System call sent to stderr  
>> 
>> I think it may be related to my previous mail about email 
>> setup but wasnt 
>> sure so thought id mail you guys as well.  
>> 
>> any ideas, am i off on the right track as suggested by the faq?  
>> 
>> Cheers  
>> 
>> Tom Welsh 
>> 
>> 
>> -------------------------------------------------------
>> This sf.net email is sponsored by:ThinkGeek
>> Welcome to geek heaven.
>> http://thinkgeek.com/sf
>> _______________________________________________
>> Nagiosplug-help mailing list
>> Nagiosplug-help at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help 
>> 
 




More information about the Help mailing list