Package: nagios-plugins
Version: 1.4-1
Severity: normal

I see in my monitoring:
localhost Total Processes  WARNING   02-19-2005 11:13:39   0d 11h 48m 16s  4/4  
 System call sent warnings to stderr 
(sorry for the long line, that's cut-n-pasted from the web interface)

This is because check_procs invokes ps as
/bin/ps -axwo 'stat uid ppid vsz rss pcpu comm args'

This results in:
steve:~$ /bin/ps -axwo 'stat uid ppid vsz rss pcpu comm args' | head
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
STAT   UID  PPID    VSZ   RSS %CPU COMMAND         COMMAND
...

The Warning line is printed to stderr, resulting in the warn message in
the monitor.  

A note in REQUIREMENTS says:

If you have procps 3.1.15, you will need to run configure and then change
the PS_COMMAND in config.h to remove the "-" from the ps command

Presumably this is also an issue with procps 3.2.5.

Since this is difficult to do in an autobuilt environment, I would
suggest it's probably easier to patch configure.in, where the ps
invocations are defined.  Perhaps patching each line to send stderr to
stdout, and then pipe to head -n1 to catch errors in the invocation?
e.g., 
ps -axwo 'stat uid ppid vsz rss pcpu comm args' 2>&1 | head -n 1 |\ egrep ...

(although 2>&1 may be a bashism, I forget)

If you like, I will work out a patch for this, but as I don't remember
seeing the problem before, I assume you had a fix that just didn't get
forward ported or something.

Please let me know if I can be of assistance, and thanks,

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.10-1-686-smp
Locale: LANG=C, LC_CTYPE=en_US.ISO-8859-15 (charmap=ISO-8859-15) (ignored: 
LC_ALL set to en_US.ISO-8859-15)

Versions of packages nagios-plugins depends on:
ii  bind9-host [host]      1:9.2.4-1         Version of 'host' bundled with BIN
ii  dnsutils               1:9.2.4-1         Clients provided with BIND
ii  fping                  2.4b2-to-ipv6-10  sends ICMP ECHO_REQUEST packets to
ii  iputils-ping [ping]    3:20020927-2      Tools to test the reachability of 
ii  libc6                  2.3.2.ds1-20      GNU C Library: Shared libraries an
ii  libldap2               2.1.30-3          OpenLDAP libraries
ii  libmysqlclient12       4.0.23-7          mysql database client library
ii  libnet-snmp-perl       5.0.1-1           Script SNMP connections
ii  libpq3                 7.4.7-2           PostgreSQL C client library
ii  libssl0.9.7            0.9.7e-3          SSL shared libraries
ii  ntp                    1:4.2.0a+stable-2 Network Time Protocol: network uti
ii  ntp-simple             1:4.2.0a+stable-2 Network Time Protocol: daemon for 
ii  ntpdate                1:4.2.0a+stable-2 The ntpdate client for setting sys
ii  procps                 1:3.2.5-1         /proc file system utilities
ii  qstat                  2.7-1             Command-line tool for querying qua
ii  radiusclient1          0.3.2-8           /bin/login replacement which uses 
ii  smbclient              3.0.10-1          a LanManager-like simple client fo
ii  snmp                   5.1.2-6           NET SNMP (Simple Network Managemen

-- no debconf information

-- 
 -----------------------------------------------------------------
|   ,''`.                                            Stephen Gran |
|  : :' :                                        [EMAIL PROTECTED] |
|  `. `'                        Debian user, admin, and developer |
|    `-                                     http://www.debian.org |
 -----------------------------------------------------------------

Attachment: signature.asc
Description: Digital signature

Reply via email to