[Nagiosplug-checkins] CVS: nagiosplug configure.in,1.27,1.28

Karl DeBisschop kdebisschop at users.sourceforge.net
Thu Nov 21 18:34:05 CET 2002


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

Modified Files:
	configure.in 
Log Message:
get long args output to work on linux check_procs, actually works this time (needs OpenBSD testing)

Index: configure.in
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/configure.in,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** configure.in	22 Nov 2002 01:31:59 -0000	1.27
--- configure.in	22 Nov 2002 02:33:43 -0000	1.28
***************
*** 403,421 ****
  dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs)
  dnl  STAT UCOMM              VSZ   RSS USER       UID  PPID COMMAND
! if ps -w -w -e -o 'stat comm vsz rss user uid ppid args' 2> /dev/null | egrep '^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+' > /dev/null
  then
  	AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf])
  	AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[Variable list for sscanf of 'ps' output])
! 	AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -axo 'stat user ppid args'",[Verbatim command to execute for ps in check_netsaint])
  	EXTRAS="$EXTRAS check_nagios"
! 	AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -axo 'stat uid ppid comm args'",[Verbatim command to execute for ps in check_procs])
  	AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n",[Format string for scanning ps output in check_procs])
! 	AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -axo 'vsz comm'",[Verbatim command to execute for ps in check_vsz])
  	AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[Format string for scanning ps output in check_vsz])
! 	AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -axo 'rss comm'",[Verbatim command to execute for ps in check_rss])
  	AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[Format string for scanning ps output in check_rss])
!   echo "      ps syntax... $PATH_TO_PS -axo 'stat comm vsz rss user ppid args'"
! 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
  then
  	AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf])
--- 403,420 ----
  dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs)
  dnl  STAT UCOMM              VSZ   RSS USER       UID  PPID COMMAND
! if [ps -weo '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]
  then
  	AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf])
  	AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[Variable list for sscanf of 'ps' output])
! 	AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -weo 'stat user ppid args'",[Verbatim command to execute for ps in check_netsaint])
  	EXTRAS="$EXTRAS check_nagios"
! 	AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -weo 'stat uid ppid comm args'",[Verbatim command to execute for ps in check_procs])
  	AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n",[Format string for scanning ps output in check_procs])
! 	AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -weo 'vsz comm'",[Verbatim command to execute for ps in check_vsz])
  	AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[Format string for scanning ps output in check_vsz])
! 	AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -weo 'rss comm'",[Verbatim command to execute for ps in check_rss])
  	AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[Format string for scanning ps output in check_rss])
!   echo "      ps syntax... $PATH_TO_PS -weo 'stat comm vsz rss user ppid args'"
! 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]
  then
  	AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf])
***************
*** 431,435 ****
    echo "      ps syntax... $PATH_TO_PS -axo 'stat comm vsz rss user ppid args'"
  dnl AIX 4.3.3 - needs verification.
! 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
  then
  	AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf])
--- 430,434 ----
    echo "      ps syntax... $PATH_TO_PS -axo 'stat comm vsz rss user ppid args'"
  dnl AIX 4.3.3 - needs verification.
! 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]
  then
  	AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf])
***************
*** 444,448 ****
  	AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[])
    echo "      ps syntax... $PATH_TO_PS -ao 'stat comm vsz rss user ppid args'"
! 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
  then
  	AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf])
--- 443,447 ----
  	AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[])
    echo "      ps syntax... $PATH_TO_PS -ao 'stat comm vsz rss user ppid args'"
! 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]
  then
  	AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf])
***************
*** 457,461 ****
  	AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[])
          echo "      ps syntax... $PATH_TO_PS -eo 's  comm vsz rss user ppid args'"
! 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
  then
  	AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf])
--- 456,460 ----
  	AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[])
          echo "      ps syntax... $PATH_TO_PS -eo 's  comm vsz rss user ppid args'"
! 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]
  then
  	AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf])
***************
*** 470,474 ****
  	AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[])
  	echo "      ps syntax... $PATH_TO_PS -Ao 's comm vsz rss'"
! 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
  then
  	AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
--- 469,473 ----
  	AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[])
  	echo "      ps syntax... $PATH_TO_PS -Ao 's comm vsz rss'"
! 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]
  then
  	AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
***************
*** 483,487 ****
  	AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[])
  	echo "      ps syntax... $PATH_TO_PS -Ao 'status comm vsz rss'"
! 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
  then
  	AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
--- 482,486 ----
  	AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[])
  	echo "      ps syntax... $PATH_TO_PS -Ao 'status comm vsz rss'"
! 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]
  then
  	AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
***************
*** 497,501 ****
  	echo "      ps syntax... $PATH_TO_PS -Ao 'state comm vsz rss'"
  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
  then
  	AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
--- 496,500 ----
  	echo "      ps syntax... $PATH_TO_PS -Ao 'state comm vsz rss'"
  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]
  then
  	AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
***************
*** 511,515 ****
  	echo "      ps syntax... $PATH_TO_PS -ao 'state command vsz rss'"
  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
  then
  	AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
--- 510,514 ----
  	echo "      ps syntax... $PATH_TO_PS -ao 'state command vsz rss'"
  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]
  then
  	AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
***************
*** 525,529 ****
  	echo "      ps syntax... $PATH_TO_PS -Ao 'state command vsz rss'"
  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
  then
  	AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
--- 524,528 ----
  	echo "      ps syntax... $PATH_TO_PS -Ao 'state command vsz rss'"
  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]
  then
  	AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
***************
*** 539,543 ****
  	echo "      ps syntax... $PATH_TO_PS -waxco 'state comm vsz rss'"
  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_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
--- 538,542 ----
  	echo "      ps syntax... $PATH_TO_PS -waxco 'state comm vsz rss'"
  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_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
***************
*** 551,555 ****
  	echo "      ps syntax... $PATH_TO_PS -el"
  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_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
--- 550,554 ----
  	echo "      ps syntax... $PATH_TO_PS -el"
  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_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
***************
*** 565,569 ****
  dnl  F  UID  PID  PPID  CP  PRI  NI  SZ  RSS  WCHAN  STAT  TT  TIME  COMMAND
  dnl
! elif ps -laxnwww 2>/dev/null | egrep -i "^ *F(LAGS)? +UID +PID +PPID +CP +PRI +NI +(SZ)|(VSZ)|(SIZE) +RSS +WCHAN +STAT? +TTY? +TIME +COMMAND" >/dev/null
  then
  	AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
--- 564,568 ----
  dnl  F  UID  PID  PPID  CP  PRI  NI  SZ  RSS  WCHAN  STAT  TT  TIME  COMMAND
  dnl
! elif [ps -laxnwww 2>/dev/null | egrep -i "^ *F(LAGS)? +UID +PID +PPID +CP +PRI +NI +(SZ)|(VSZ)|(SIZE) +RSS +WCHAN +STAT? +TTY? +TIME +COMMAND" >/dev/null]
  then
  	AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
***************
*** 582,586 ****
  dnl    100     0     1     0   0   0    776    76  c0131c8c   S  ffff  0:11 init [2]
  dnl
! 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_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
--- 581,585 ----
  dnl    100     0     1     0   0   0    776    76  c0131c8c   S  ffff  0:11 init [2]
  dnl
! 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_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
***************
*** 599,603 ****
  dnl     F S      UID   PID  PPID   C PRI NI ADDR  SZ  RSS   WCHAN    TTY  TIME CMD
  dnl    303 A        0     0     0 120  16 -- 1c07  20   24              -  0:45 swapper
! 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_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
--- 598,602 ----
  dnl     F S      UID   PID  PPID   C PRI NI ADDR  SZ  RSS   WCHAN    TTY  TIME CMD
  dnl    303 A        0     0     0 120  16 -- 1c07  20   24              -  0:45 swapper
! 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_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
***************
*** 611,615 ****
  	echo "      ps syntax... $PATH_TO_PS -el"
  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_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
--- 610,614 ----
  	echo "      ps syntax... $PATH_TO_PS -el"
  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_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])





More information about the Commits mailing list