[Nagiosplug-checkins] CVS: nagiosplug configure.in,1.96,1.97

Ton Voon tonvoon at users.sourceforge.net
Tue Sep 16 07:15:08 CEST 2003


Update of /cvsroot/nagiosplug/nagiosplug
In directory sc8-pr-cvs1:/tmp/cvs-serv4084

Modified Files:
	configure.in 
Log Message:
Support for AIX ps command and cleanup of configure's ps checks


Index: configure.in
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/configure.in,v
retrieving revision 1.96
retrieving revision 1.97
diff -C2 -r1.96 -r1.97
*** configure.in	11 Sep 2003 08:02:04 -0000	1.96
--- configure.in	16 Sep 2003 14:14:53 -0000	1.97
***************
*** 635,639 ****
  	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"
! 	EXTRAS="$EXTRAS check_nagios"
  	AC_MSG_RESULT([$ac_cv_ps_command])
  
--- 635,639 ----
  	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_MSG_RESULT([$ac_cv_ps_command])
  
***************
*** 645,649 ****
  	ac_cv_ps_command="$PATH_TO_PS -weo 'stat uid ppid vsz rss pcpu comm args'"
  	ac_cv_ps_format="%s %d %d %d %d %f %s %n"
! 	EXTRAS="$EXTRAS check_nagios"
  	AC_MSG_RESULT([$ac_cv_ps_command])
  
--- 645,649 ----
  	ac_cv_ps_command="$PATH_TO_PS -weo '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_MSG_RESULT([$ac_cv_ps_command])
  
***************
*** 655,659 ****
  	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"
! 	EXTRAS="$EXTRAS check_nagios"
  	AC_MSG_RESULT([$ac_cv_ps_command])
  
--- 655,659 ----
  	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_MSG_RESULT([$ac_cv_ps_command])
  
***************
*** 665,669 ****
  	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"
! 	EXTRAS="$EXTRAS check_nagios"
  	AC_MSG_RESULT([$ac_cv_ps_command])
  
--- 665,669 ----
  	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_MSG_RESULT([$ac_cv_ps_command])
  
***************
*** 676,680 ****
  	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"
! 	EXTRAS="$EXTRAS check_nagios"
  	AC_MSG_RESULT([$ac_cv_ps_command])
  
--- 676,680 ----
  	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_MSG_RESULT([$ac_cv_ps_command])
  
***************
*** 689,693 ****
  	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"
! 	EXTRAS="$EXTRAS check_nagios"
  	AC_MSG_RESULT([$ac_cv_ps_command])
  
--- 689,693 ----
  	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_MSG_RESULT([$ac_cv_ps_command])
  
***************
*** 699,706 ****
  	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"
! 	EXTRAS="$EXTRAS check_nagios"
  	AC_MSG_RESULT([$ac_cv_ps_command])
  
! dnl AIX 4.3.3 - needs verification. This works for 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
--- 699,706 ----
  	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_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
***************
*** 709,713 ****
  	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"]
! 	EXTRAS="$EXTRAS check_nagios"
  	AC_MSG_RESULT([$ac_cv_ps_command])
  
--- 709,713 ----
  	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_MSG_RESULT([$ac_cv_ps_command])
  
***************
*** 718,724 ****
  	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"
! 	EXTRAS="$EXTRAS check_nagios"
  	AC_MSG_RESULT([$ac_cv_ps_command])
  
  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
--- 718,734 ----
  	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_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
+ 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_MSG_RESULT([$ac_cv_ps_command - with no RSS])
+ 
  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
***************
*** 727,731 ****
  	ac_cv_ps_command="$PATH_TO_PS -Ao 's uid ppid vsz rss pcpu comm args'"
  	ac_cv_ps_format="%s %d %d %d %d %f %s %n"
! 	EXTRAS="$EXTRAS check_nagios"
  	AC_MSG_RESULT([$ac_cv_ps_command])
  
--- 737,741 ----
  	ac_cv_ps_command="$PATH_TO_PS -Ao '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_MSG_RESULT([$ac_cv_ps_command])
  
***************
*** 736,740 ****
  	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"
! 	EXTRAS="$EXTRAS check_nagios"
  	AC_MSG_RESULT([$ac_cv_ps_command])
  
--- 746,750 ----
  	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_MSG_RESULT([$ac_cv_ps_command])
  
***************
*** 745,749 ****
  	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"
! 	EXTRAS="$EXTRAS check_nagios"
  	AC_MSG_RESULT([$ac_cv_ps_command])
  
--- 755,759 ----
  	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_MSG_RESULT([$ac_cv_ps_command])
  
***************
*** 755,759 ****
  	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"
! 	EXTRAS="$EXTRAS check_nagios"
  	AC_MSG_RESULT([$ac_cv_ps_command])
  
--- 765,769 ----
  	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_MSG_RESULT([$ac_cv_ps_command])
  
***************
*** 765,768 ****
--- 775,779 ----
  	ac_cv_ps_command="$PATH_TO_PS -el"
  	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_MSG_RESULT([$ac_cv_ps_command])
  
***************
*** 774,777 ****
--- 785,789 ----
  	ac_cv_ps_command="$PATH_TO_PS -el"
  	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_MSG_RESULT([$ac_cv_ps_command])
  
***************
*** 785,788 ****
--- 797,801 ----
  	ac_cv_ps_command="$PATH_TO_PS -el"
  	ac_cv_ps_format="%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %n%s"
+ 	ac_cv_ps_cols=7
  	AC_MSG_RESULT([$ac_cv_ps_command])
  
***************
*** 794,797 ****
--- 807,811 ----
  	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_MSG_RESULT([$ac_cv_ps_command])
  
***************
*** 807,811 ****
  	ac_cv_ps_varlist="[procstat,&procvsz,&procrss,&procuid,&procppid,&procpcpu,procprog,&pos]"
  	ac_cv_ps_format="%s %d %d %d %d %f %s %n"
! 	EXTRAS="$EXTRAS check_nagios"
  	AC_MSG_RESULT([$ac_cv_ps_command])
  
--- 821,825 ----
  	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_MSG_RESULT([$ac_cv_ps_command])
  
***************
*** 817,838 ****
  	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"
! 	#if ps -Ao 'vsz comm' 2>/dev/null | \
! 	#	egrep -i ["^ *VSZ +COMMAND"] >/dev/null
! 	#then
! 	#	ac_cv_vsz_command="$PATH_TO_PS -Ao 'vsz comm'"
! 	#	ac_cv_vsz_format="%*s %d"
! 	#fi
  	AC_MSG_RESULT([$ac_cv_ps_command])
  
  else
! 	AC_MSG_WARN([unable to find usable ps syntax])
  fi
  
! AC_DEFINE_UNQUOTED(PS_VARLIST,$ac_cv_ps_varlist,
! 	[Variable list for sscanf of 'ps' output])
! AC_DEFINE_UNQUOTED(PS_COMMAND,"$ac_cv_ps_command",
! 	[Verbatim command to execute for ps in check_procs])
! AC_DEFINE_UNQUOTED(PS_FORMAT,"$ac_cv_ps_format",
! 	[Format string for scanning ps output in check_procs])
  
  dnl jm_AFS
--- 831,852 ----
  	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_MSG_RESULT([$ac_cv_ps_command])
  
  else
! 	AC_MSG_WARN([unable to find usable ps syntax - check_procs and check_nagios will not be compiled])
  fi
  
! if test -n $ac_cv_ps_varlist ; then
! 	AC_DEFINE_UNQUOTED(PS_VARLIST,$ac_cv_ps_varlist,
! 		[Variable list for sscanf of 'ps' output])
! 	AC_DEFINE_UNQUOTED(PS_COMMAND,"$ac_cv_ps_command",
! 		[Verbatim command to execute for ps in check_procs])
! 	AC_DEFINE_UNQUOTED(PS_FORMAT,"$ac_cv_ps_format",
! 		[Format string for scanning ps output in check_procs])
! 	AC_DEFINE_UNQUOTED(PS_COLS,$ac_cv_ps_cols,
! 		[Number of columns in ps command])
! 	EXTRAS="$EXTRAS check_procs check_nagios"
! fi
  
  dnl jm_AFS





More information about the Commits mailing list