[Nagiosplug-checkins] nagiosplug configure.in,1.142,1.143

M. Sean Finney seanius at users.sourceforge.net
Tue May 24 17:44:55 CEST 2005


Update of /cvsroot/nagiosplug/nagiosplug
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30401

Modified Files:
	configure.in 
Log Message:
fixes for check_procs:
- added support for printing the pid in all the ps outputs
- don't use the proc name to ignore self, use the pid vs getpid().
- initialize procetime to null string otherwise -vvv can have funny results


Index: configure.in
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/configure.in,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -d -r1.142 -r1.143
--- configure.in	1 May 2005 19:50:15 -0000	1.142
+++ configure.in	25 May 2005 00:43:20 -0000	1.143
@@ -593,58 +593,69 @@
 AC_PATH_PROG(PATH_TO_PS,ps)
 
 AC_MSG_CHECKING(for ps syntax)
+dnl Some gnu/linux systems (debian for one) don't like -axwo and need axwo.
+dnl so test for this first...
+if ps axwo 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \
+	egrep -i ["^ *STAT +[UCOMAND]+ +VSZ +RSS +USER +UID +PID +PPID +COMMAND"] > /dev/null
+then
+	ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
+	ac_cv_ps_command="$PATH_TO_PS axwo 'stat uid pid ppid vsz rss pcpu comm args'"
+	ac_cv_ps_format="%s %d %d %d %d %d %f %s %n"
+	ac_cv_ps_cols=9
+	AC_MSG_RESULT([$ac_cv_ps_command])
+
 dnl For OpenBSD 3.2 & 3.3. Must come before ps -weo
 dnl Should also work for FreeBSD 5.2.1 and 5.3
 dnl  STAT UCOMM              VSZ   RSS USER      PPID COMMAND
-if ps -axwo 'stat comm vsz rss user uid ppid args' 2>/dev/null | \
-	egrep -i ["^ *STAT +[UCOMAND]+ +VSZ +RSS +USER +UID +PPID +COMMAND"] > /dev/null
+elif ps -axwo 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \
+	egrep -i ["^ *STAT +[UCOMAND]+ +VSZ +RSS +USER +UID +PID +PPID +COMMAND"] > /dev/null
 then
-	ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
-	ac_cv_ps_command="$PATH_TO_PS -axwo 'stat uid ppid vsz rss pcpu comm args'"
-	ac_cv_ps_format="%s %d %d %d %d %f %s %n"
-	ac_cv_ps_cols=8
+	ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
+	ac_cv_ps_command="$PATH_TO_PS -axwo 'stat uid pid ppid vsz rss pcpu comm args'"
+	ac_cv_ps_format="%s %d %d %d %d %d %f %s %n"
+	ac_cv_ps_cols=9
 	AC_MSG_RESULT([$ac_cv_ps_command])
 
 dnl Some *BSDs have different format for ps. This is mainly to catch FreeBSD 4. 
 dnl Limitation: Only first 16 chars returned for ucomm field
 dnl Must come before ps -weo
-elif ps -axwo 'stat uid ppid vsz rss pcpu ucomm command' 2>/dev/null | \
-	egrep -i ["^ *STAT +UID +PPID +VSZ +RSS +%CPU +UCOMM +COMMAND"] > /dev/null
+elif ps -axwo 'stat uid pid ppid vsz rss pcpu ucomm command' 2>/dev/null | \
+	egrep -i ["^ *STAT +UID +PID +PPID +VSZ +RSS +%CPU +UCOMM +COMMAND"] > /dev/null
 then
-	ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
-	ac_cv_ps_command="$PATH_TO_PS -axwo 'stat uid ppid vsz rss pcpu ucomm command'"
-	ac_cv_ps_format="%s %d %d %d %d %f %s %n"
-	ac_cv_ps_cols=8
+	ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
+	ac_cv_ps_command="$PATH_TO_PS -axwo 'stat uid pid ppid vsz rss pcpu ucomm command'"
+	ac_cv_ps_format="%s %d %d %d %d %d %f %s %n"
+	ac_cv_ps_cols=9
 	AC_MSG_RESULT([$ac_cv_ps_command])
 
 dnl  STAT UCOMM              VSZ   RSS USER       UID  PPID COMMAND
-elif ps -weo 'stat comm vsz rss user uid ppid etime args' 2>/dev/null | \
-	egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[ELAPSD]+ +[RGSCOMDNA]+"] >/dev/null
+elif ps -weo 'stat comm vsz rss user uid pid ppid etime args' 2>/dev/null | \
+	egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[ID]+ +P[PID]+ +[ELAPSD]+ +[RGSCOMDNA]+"] >/dev/null
 then
-	ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos]"
-	ac_cv_ps_command="$PATH_TO_PS -weo 'stat uid ppid vsz rss pcpu etime comm args'"
-	ac_cv_ps_format="%s %d %d %d %d %f %s %s %n"
-	ac_cv_ps_cols=9
+	ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos]"
+	ac_cv_ps_command="$PATH_TO_PS -weo 'stat uid pid ppid vsz rss pcpu etime comm args'"
+	ac_cv_ps_format="%s %d %d %d %d %d %f %s %s %n"
+	ac_cv_ps_cols=10
 	AC_MSG_RESULT([$ac_cv_ps_command])
 
 dnl FreeBSD
-elif ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | \
-	egrep -i ["^STAT +COMMAND +VSZ +RSS +UID +USER +PPID"] >/dev/null
+elif ps waxco 'state command vsz rss uid user pid ppid' 2>/dev/null | \
+	egrep -i ["^STAT +COMMAND +VSZ +RSS +UID +USER +PID +PPID"] >/dev/null
 then
-	ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
-	ac_cv_ps_command="$PATH_TO_PS waxco 'state uid ppid vsz rss pcpu command command'"
-	ac_cv_ps_format="%s %d %d %d %d %f %s %n"
-	ac_cv_ps_cols=8
+	ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
+	ac_cv_ps_command="$PATH_TO_PS waxco 'state uid pid ppid vsz rss pcpu command command'"
+	ac_cv_ps_format="%s %d %d %d %d %d %f %s %n"
+	ac_cv_ps_cols=9
 	AC_MSG_RESULT([$ac_cv_ps_command])
 
 dnl BSD-like mode in RH 6.1
-elif ps waxno 'state comm vsz rss uid user ppid args' 2>/dev/null | \
-	egrep -i ["^S +COMMAND +VSZ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null
+elif ps waxno 'state comm vsz rss uid user pid ppid args' 2>/dev/null | \
+	egrep -i ["^S +COMMAND +VSZ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null
 then
-	ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
-	ac_cv_ps_command="$PATH_TO_PS waxno 'state uid ppid vsz rss pcpu comm args'"
-	ac_cv_ps_format="%s %d %d %d %d %f %s %n"
-	ac_cv_ps_cols=8
+	ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
+	ac_cv_ps_command="$PATH_TO_PS waxno 'state uid pid ppid vsz rss pcpu comm args'"
+	ac_cv_ps_format="%s %d %d %d %d %d %f %s %n"
+	ac_cv_ps_cols=9
 	AC_MSG_RESULT([$ac_cv_ps_command])
 
 dnl SunOS 4.1.3:
@@ -653,10 +664,10 @@
 elif ps -laxnwww 2>/dev/null | head -1 | \
 	egrep -i ["^ *F(LAGS)? +UID +PID +PPID +CP +PRI +NI +(SZ)|(VSZ)|(SIZE) +RSS +WCHAN +STAT? +TTY? +TIME +COMMAND"] >/dev/null
 then
-	ac_cv_ps_varlist="[&procuid,&procppid,&procvsz,&procrss,procstat,&pos,procprog]"
+	ac_cv_ps_varlist="[&procuid,&procpid,&procppid,&procvsz,&procrss,procstat,&pos,procprog]"
 	ac_cv_ps_command="$PATH_TO_PS -laxnwww"
-	ac_cv_ps_format="%*s %d %*s %d %*s %*s %*s %d %d %*s %s %*s %*s %n%s"
-	ac_cv_ps_cols=8
+	ac_cv_ps_format="%*s %d %d %d %*s %*s %*s %d %d %*s %s %*s %*s %n%s"
+	ac_cv_ps_cols=9
 	AC_MSG_RESULT([$ac_cv_ps_command])
 
 dnl Debian Linux / procps v1.2.9:
@@ -666,109 +677,110 @@
 elif ps laxnwww 2>/dev/null | \
 	egrep -i ["^ *F(LAGS)? +UID +PID +PPID +PRI +NI +(VSZ)|(SIZE) +RSS +WCHAN +STAT? TTY +TIME +COMMAND"] >/dev/null
 then
-	ac_cv_ps_varlist="[&procuid,&procppid,procstat,&procvsz,&procrss,&pos,procprog]"
+	ac_cv_ps_varlist="[&procuid,&procpid,&procppid,procstat,&procvsz,&procrss,&pos,procprog]"
 	ac_cv_ps_command="$PATH_TO_PS laxnwww"
-	ac_cv_ps_format="%*s %d %*s %d %*s %*s %d %d %*s %s %*s %*s %n%s"
-	ac_cv_ps_cols=8
+	ac_cv_ps_format="%*s %d %d %d %*s %*s %d %d %*s %s %*s %*s %n%s"
+	ac_cv_ps_cols=9
 	AC_MSG_RESULT([$ac_cv_ps_command])
 
 dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs)
-elif ps -axo 'stat comm vsz rss user uid ppid args' 2>/dev/null | \
-	egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
+elif ps -axo 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \
+	egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
 then
-	ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
-	ac_cv_ps_command="$PATH_TO_PS -axo 'stat uid ppid vsz rss pcpu comm args'"
-	ac_cv_ps_format="%s %d %d %d %d %f %s %n"
-	ac_cv_ps_cols=8
+	ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
+	ac_cv_ps_command="$PATH_TO_PS -axo 'stat uid pid ppid vsz rss pcpu comm args'"
+	ac_cv_ps_format="%s %d %d %d %d %d %f %s %n"
+	ac_cv_ps_cols=9
 	AC_MSG_RESULT([$ac_cv_ps_command])
 
 dnl Tru64 - needs %*[ +] in PS_FORMAT
-elif ps -ao 'stat comm vsz rss user uid ppid args' 2>/dev/null | \
-	egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
+elif ps -ao 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \
+	egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
 then
-	ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
-	ac_cv_ps_command="$PATH_TO_PS -ao 'stat uid ppid vsz rss pcpu comm args'"
-	ac_cv_ps_format=["%s%*[ +] %d %d %d %d %f %s %n"]
-	ac_cv_ps_cols=8
+	ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
+	ac_cv_ps_command="$PATH_TO_PS -ao 'stat uid pid ppid vsz rss pcpu comm args'"
+	ac_cv_ps_format=["%s%*[ +] %d %d %d %d %d %f %s %n"]
+	ac_cv_ps_cols=9
 	AC_MSG_RESULT([$ac_cv_ps_command])
 
-elif ps -eo 's comm vsz rss user uid ppid args' 2>/dev/null | \
-	egrep -i ["^S[TAUES]* +C[OMDNA]+ +[VSIZE]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
+XXX
+elif ps -eo 's comm vsz rss user uid pid ppid args' 2>/dev/null | \
+	egrep -i ["^S[TAUES]* +C[OMDNA]+ +[VSIZE]+ +U[SER]+ +U[ID]+ +P[PID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
 then
-	ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
-	ac_cv_ps_command="$PATH_TO_PS -eo 's uid ppid vsz rss pcpu comm args'"
-	ac_cv_ps_format="%s %d %d %d %d %f %s %n"
-	ac_cv_ps_cols=8
+	ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procpid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
+	ac_cv_ps_command="$PATH_TO_PS -eo 's uid pid ppid vsz rss pcpu comm args'"
+	ac_cv_ps_format="%s %d %d %d %d %d %f %s %n"
+	ac_cv_ps_cols=9
 	AC_MSG_RESULT([$ac_cv_ps_command])
 
 dnl AIX 4.3.3 and 5.1 do not have an rss field
-elif ps -eo 'stat uid ppid vsz pcpu comm args' 2>/dev/null | \
-	egrep -i ["^ *S[TAUES]* +UID +PPID +VSZ +%CPU +COMMAND +COMMAND"] >/dev/null
+elif ps -eo 'stat uid pid ppid vsz pcpu comm args' 2>/dev/null | \
+	egrep -i ["^ *S[TAUES]* +UID +PID +PPID +VSZ +%CPU +COMMAND +COMMAND"] >/dev/null
 then
-	ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procpcpu,procprog,&pos]"
-	ac_cv_ps_command="$PATH_TO_PS -eo 'stat uid ppid vsz pcpu comm args'"
-	ac_cv_ps_format="%s %d %d %d %f %s %n"
-	ac_cv_ps_cols=7
+	ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procpid,&procvsz,&procpcpu,procprog,&pos]"
+	ac_cv_ps_command="$PATH_TO_PS -eo 'stat uid pid ppid vsz pcpu comm args'"
+	ac_cv_ps_format="%s %d %d %d %d %f %s %n"
+	ac_cv_ps_cols=8
 	AC_MSG_RESULT([$ac_cv_ps_command - with no RSS])
 
 dnl Solaris 2.6
-elif ps -Ao 's comm vsz rss uid user ppid args' 2>/dev/null | \
-	egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null
+elif ps -Ao 's comm vsz rss uid user pid ppid args' 2>/dev/null | \
+	egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null
 then
-	ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
-	ac_cv_ps_command="$PATH_TO_PS -Ao 's uid ppid vsz rss pcpu comm args'"
+	ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procpid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
+	ac_cv_ps_command="$PATH_TO_PS -Ao 's uid pid ppid vsz rss pcpu comm args'"
 	# There must be no space between the %s and %n due to a wierd problem in sscanf where
 	# it will return %n as longer than the line length
-	ac_cv_ps_format="%s %d %d %d %d %f %s%n"
-	ac_cv_ps_cols=8
+	ac_cv_ps_format="%s %d %d %d %d %d %f %s%n"
+	ac_cv_ps_cols=9
 	AC_MSG_RESULT([$ac_cv_ps_command])
 
-elif ps -Ao 'status comm vsz rss uid user ppid args' 2>/dev/null | \
-	egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null
+elif ps -Ao 'status comm vsz rss uid user pid ppid args' 2>/dev/null | \
+	egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null
 then
-	ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
-	ac_cv_ps_command="$PATH_TO_PS -Ao 'status uid ppid vsz rss pcpu comm args'"
-	ac_cv_ps_format="%s %d %d %d %d %f %s %n"
-	ac_cv_ps_cols=8
+	ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procpid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
+	ac_cv_ps_command="$PATH_TO_PS -Ao 'status uid pid ppid vsz rss pcpu comm args'"
+	ac_cv_ps_format="%s %d %d %d %d %d %f %s %n"
+	ac_cv_ps_cols=9
 	AC_MSG_RESULT([$ac_cv_ps_command])
 
-elif ps -Ao 'state comm vsz rss uid user ppid args' 2>/dev/null | \
-	egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null
+elif ps -Ao 'state comm vsz rss uid user pid ppid args' 2>/dev/null | \
+	egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null
 then
-	ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
-	ac_cv_ps_command="$PATH_TO_PS -Ao 'state uid ppid vsz rss pcpu comm args'"
-	ac_cv_ps_format="%s %d %d %d %d %f %s %n"
-	ac_cv_ps_cols=8
+	ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procpid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
+	ac_cv_ps_command="$PATH_TO_PS -Ao 'state uid pid ppid vsz rss pcpu comm args'"
+	ac_cv_ps_format="%s %d %d %d %d %d %f %s %n"
+	ac_cv_ps_cols=9
 	AC_MSG_RESULT([$ac_cv_ps_command])
 
 dnl wonder who takes state instead of stat
-elif ps -ao 'state command vsz rss user ppid args' 2>/dev/null | \
-	egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null
+elif ps -ao 'state command vsz rss user pid ppid args' 2>/dev/null | \
+	egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null
 then
-	ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
-	ac_cv_ps_command="$PATH_TO_PS -ao 'state uid ppid vsz rss pcpu command args'"
-	ac_cv_ps_format="%s %d %d %d %d %f %s %n"
-	ac_cv_ps_cols=7
+	ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procpid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
+	ac_cv_ps_command="$PATH_TO_PS -ao 'state uid pid ppid vsz rss pcpu command args'"
+	ac_cv_ps_format="%s %d %d %d %d %d %f %s %n"
+	ac_cv_ps_cols=8
 	AC_MSG_RESULT([$ac_cv_ps_command])
 
 dnl IRIX 53
 elif ps -el 2>/dev/null | \
 	egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null
 then
-	ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&pos,procprog]"
+	ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procpid,&procvsz,&procrss,&pos,procprog]"
 	ac_cv_ps_command="$PATH_TO_PS -el (IRIX 53)"
-	ac_cv_ps_format="%*s %s %d %*s %d %*s %*s %*s %*s %d %d %*s %*s %*s %n%s"
-	ac_cv_ps_cols=7
+	ac_cv_ps_format="%*s %s %d %d %d %*s %*s %*s %*s %d %d %*s %*s %*s %n%s"
+	ac_cv_ps_cols=8
 	AC_MSG_RESULT([$ac_cv_ps_command])
 
 dnl IRIX 63
 elif ps -el 2>/dev/null | \
 	egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +P +ADDR +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null
 then
-	ac_cv_ps_varlist="[procstat,&procuid,&procppid,&pos,procprog]"
+	ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procpid,&pos,procprog]"
 	ac_cv_ps_command="$PATH_TO_PS -el (IRIX 63)"
-	ac_cv_ps_format="%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s"
-	ac_cv_ps_cols=5
+	ac_cv_ps_format="%*s %s %d %d %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s"
+	ac_cv_ps_cols=6
 	AC_MSG_RESULT([$ac_cv_ps_command])
 
 dnl AIX 4.1:
@@ -777,20 +789,20 @@
 elif ps -el 2>/dev/null | \
 	egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +ADDR +SZ +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null
 then
-	ac_cv_ps_varlist="[procstat,&procuid,&procppid,&pos,procprog]"
+	ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procpid,&pos,procprog]"
 	ac_cv_ps_command="$PATH_TO_PS -el (AIX 4.1 and HP-UX)"
-	ac_cv_ps_format="%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %n%s"
-	ac_cv_ps_cols=5
+	ac_cv_ps_format="%*s %s %d %d %d %*s %*s %*s %*s %*s %*s %*s %*s %n%s"
+	ac_cv_ps_cols=6
 	AC_MSG_RESULT([$ac_cv_ps_command])
 
 dnl AIX?
 elif ps glaxen 2>/dev/null | \
 	egrep -i ["^ *F +UID +PID +PPID +PRI +NI +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND"] >/dev/null
 then
-	ac_cv_ps_varlist="[&procuid,&procppid,&procvsz,&procrss,procstat,&pos,procprog]"
+	ac_cv_ps_varlist="[&procuid,&procpid,&procpid,&procvsz,&procrss,procstat,&pos,procprog]"
 	ac_cv_ps_command="$PATH_TO_PS glaxen"
-	ac_cv_ps_format="%*s %d %*s %d %*s %*s %d %d %*s %s %*s %*s %n%s"
-	ac_cv_ps_cols=7
+	ac_cv_ps_format="%*s %d %d %d %*s %*s %d %d %*s %s %*s %*s %n%s"
+	ac_cv_ps_cols=8
 	AC_MSG_RESULT([$ac_cv_ps_command])
 
 dnl MacOSX / Darwin
@@ -798,24 +810,25 @@
 dnl Some truncation will happen in UCOMM column
 dnl STAT      VSZ    RSS   UID  PPID %CPU UCOMM            COMMAND
 dnl Ss      52756  22496   501     1   6.9 Window Manager   /System/Library/CoreServices/WindowServer -daemon
-elif ps wwaxo 'state vsz rss uid ppid pcpu ucomm command' 2>/dev/null | \
+elif ps wwaxo 'state vsz rss uid pid ppid pcpu ucomm command' 2>/dev/null | \
 	egrep -i ["^STAT +VSZ +RSS +UID +PPID +%CPU +UCOMM +COMMAND"] >/dev/null
 then
-	ac_cv_ps_command="$PATH_TO_PS wwaxo 'state vsz rss uid ppid pcpu ucomm command'"
-	ac_cv_ps_varlist="[procstat,&procvsz,&procrss,&procuid,&procppid,&procpcpu,procprog,&pos]"
-	ac_cv_ps_format="%s %d %d %d %d %f %s %n"
-	ac_cv_ps_cols=7
+	ac_cv_ps_command="$PATH_TO_PS wwaxo 'state vsz rss uid pid ppid pcpu ucomm command'"
+	ac_cv_ps_varlist="[procstat,&procvsz,&procrss,&procuid,&procpid,&procpid,&procpcpu,procprog,&pos]"
+	ac_cv_ps_format="%s %d %d %d %d %d %f %s %n"
+	ac_cv_ps_cols=8
 	AC_MSG_RESULT([$ac_cv_ps_command])
 
 dnl UnixWare 
 elif ps -Al 2>/dev/null | \
 	egrep -i ["^ *F +S +UID +PID +PPID +CLS +PRI +NI +C +ADDR +SZ +WCHAN +TTY +TIME +COMD"] >/dev/null
 then
-	ac_cv_ps_varlist="[procstat,&procuid,&procppid,&pos,procprog]"
+	ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procpid,&pos,procprog]"
 	ac_cv_ps_command="$PATH_TO_PS -Al"
-	ac_cv_ps_format="%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s"
-	ac_cv_ps_cols=7
+	ac_cv_ps_format="%*s %s %d %d %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s"
+	ac_cv_ps_cols=8
 	AC_MSG_RESULT([$ac_cv_ps_command])
+XXX
 
 else
 	AC_MSG_WARN([unable to find usable ps syntax - check_procs and check_nagios will not be compiled])





More information about the Commits mailing list