[Nagiosplug-devel] BUG: check_proc doeas not work under FreeBSD 4

Tomasz Pilat poncki.lists at axelspringer.com.pl
Fri Dec 17 10:55:06 CET 2004


Hello.

This one well be quick...

Environment:

FreeBSD  4.10-STABLE  #410:  Fri  Jul 30 17:39:00 CEST 2004 (/proc not mounted)
check_procs (nagios-plugins 1.4.0alpha2) 1.2

Problem:

check_proc does not see processes with command line longer than 16
bytes (not counting arguments). For example:

# ps auxw | grep syslo[g]
root        190  0.0  0.1  1196  588  ??  Ss   22Oct04  70:45.58 /usr/sbin/syslogd -4 -s -cc -l /jails/named/dev/log

# ./check_procs -C syslogd
PROCS OK: 0 processes with command name 'syslogd'

but:

# ./check_procs -C syslog
PROCS OK: 1 process with command name 'syslog' -> /usr/sbin/syslog (16 bytes)

Cause:

Plugin executes "/bin/ps -axwo 'state uid ppid vsz rss pcpu command command'", and gets

Ss       0     1  1196  588  0.0 /usr/sbin/syslog /usr/sbin/syslogd -4 -s -cc -l /jails/named/dev/log

but should execute "/bin/ps -axwo 'state uid ppid vsz rss pcpu command'" and get

Ss       0     1  1196  588  0.0 /usr/sbin/syslogd -4 -s -cc -l /jails/named/dev/log

(taking command-line from 7th column makes '-a' option unusable too).

HTH,
Ponc
--
Tomasz Piłat                          http://poncki.freebsd.pl./
AXEL SPRINGER POLSKA Sp. z o.o.       PONC-RIPE | PGPKEY-EDEB47FC 

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on e-mail/Usenet?





More information about the Devel mailing list