nrpe output problems

liamr at umich.edu liamr at umich.edu
Thu Nov 15 03:37:18 CET 2007


I apologize if this is the wrong place to report this.. it seemed more 
like a developer issue than a user issue.

There appear to be some situations where nrpe doesn't send all of the 
output it receives from the scripts it invokes to the network.  I'm 
invoking "sar"..

   command[sar]=/usr/bin/sar -Brcquwv -n SOCK 1 1|grep Average

and I think that strace shows that it receives different information..

7271  read(4, "Average:       proc/s\nAverage:         0.00\nAverage:   
    cswch/s\nAverage:       483.17\nAverage:        CPU     %user     
%nice   %system   %iowait    %steal     %idle\nAverage:        all      
0.00      0.00      0.25      0.00      0.00     99.75\nAverage:     
pgpgin/s pgpgout/s   fault/s  majflt/s  pgfree/s pgscank/s pgscand/s 
pgsteal/s    %vmeff\nAverage:         0.00      0.00     12.87      
0.00     18.81      0.00      0.00      0.00      0.00\nAverage:    
kbmemfree kbmemused  %memused kbbuffers  kbcached kbswpfree kbswpused  
%swpused  kbswpcad\nAverage:       150172   3931940     96.32     24652 
   3660292   8189344     27884      0.34        48\nAverage:    
dentunusd   file-nr  inode-nr    pty-nr\nAverage:        75489       
576     81846         2\nAverage:       totsck    tcpsck    udpsck    
rawsck   ip-frag    tcp-tw\nAverage:           41        18         4   
       0         0         5\nAverage:      runq-sz  plist-sz   ldavg-1 
   ldavg-5  ldavg-15\nAverage:            1       182      0.00      
0.00      0.00\n", 2047) = 1028


than it outputs...

7271  send(5, "\0\2\0\2\215&X\332\0\0Average:       proc/s\nAverage:    
      0.00\nAverage:      cswch/s\nAverage:       483.17\nAverage:      
   CPU     %user     %nice   %system   %iowait    %steal     
%idle\nAverage:        all      0.00      0.00      0.25      0.00      
0.00     99.75\nAverage:     pgpgin/s pgpgout/s   fault/s  majflt/s  
pgfree/s pgscank/s pgscand/s pgsteal/s    %vmeff\nAverage:         0.00 
      0.00     12.87      0.00     18.81      0.00      0.00      0.00  
     0.00\nAverage:    kbmemfree kbmemused  %memused kbbuffers  
kbcached kbswpfree kbswpused  %swpused  kbswpcad\nAverage:       150172 
   3931940     96.32     24652   3660292   8189344     27884      0.34  
       48\nAverage:    dentunusd   file-nr  inode-nr    
pty-nr\nAverage:        75489       576     81846         2\nAverage:   
     totsck    tcpsck    udpsck    rawsck   ip-frag    tcp-tw\nAverage: 
           41        18         4         0         0         
5\nAverage:      runq-sz  plist-sz   ldavg-1   ldavg-5  
ldavg-15\nAverage:            1       182      0.00      0.00      
\0k:", 1036, 0) = 1036

If I issue the sysstat command on the command line, I see the output I 
expect.. and looking at strace, I see that it's getting the correct 
output from sar, but it's not passing on the output in it's entirety to 
the server requesting it via check_nrpe.  I don't think I'm running 
into the size of MAX_INPUT_BUFFER.

I can provide the complete strace if that'd help.   This is on an LFS 
based linux box running 2.6.21.3 (i686), nrpe 2.10 (compiled with 
3.4.5), and sysstat 8.0.2, running check_nrpe both remotely and locally.

Liam

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/




More information about the Developers mailing list