diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 70 |
1 files changed, 42 insertions, 28 deletions
diff --git a/configure.in b/configure.in index 37baafa8..09e8e350 100644 --- a/configure.in +++ b/configure.in @@ -634,7 +634,7 @@ 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" - EXTRAS="$EXTRAS check_nagios" + ac_cv_ps_cols=8 AC_MSG_RESULT([$ac_cv_ps_command]) dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND @@ -644,7 +644,7 @@ then ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" 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_cv_ps_cols=8 AC_MSG_RESULT([$ac_cv_ps_command]) dnl FreeBSD @@ -654,7 +654,7 @@ 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" - EXTRAS="$EXTRAS check_nagios" + ac_cv_ps_cols=8 AC_MSG_RESULT([$ac_cv_ps_command]) dnl BSD-like mode in RH 6.1 @@ -664,7 +664,7 @@ 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" - EXTRAS="$EXTRAS check_nagios" + ac_cv_ps_cols=8 AC_MSG_RESULT([$ac_cv_ps_command]) dnl SunOS 4.1.3: @@ -675,7 +675,7 @@ then ac_cv_ps_varlist="[&procuid,&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" - EXTRAS="$EXTRAS check_nagios" + ac_cv_ps_cols=8 AC_MSG_RESULT([$ac_cv_ps_command]) dnl Debian Linux / procps v1.2.9: @@ -688,7 +688,7 @@ then ac_cv_ps_varlist="[&procuid,&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" - EXTRAS="$EXTRAS check_nagios" + ac_cv_ps_cols=8 AC_MSG_RESULT([$ac_cv_ps_command]) dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs) @@ -698,17 +698,17 @@ 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" - EXTRAS="$EXTRAS check_nagios" + ac_cv_ps_cols=8 AC_MSG_RESULT([$ac_cv_ps_command]) -dnl AIX 4.3.3 - needs verification. This works for Tru64 - needs %*[ +] in PS_FORMAT +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 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"] - EXTRAS="$EXTRAS check_nagios" + ac_cv_ps_cols=8 AC_MSG_RESULT([$ac_cv_ps_command]) elif ps -eo 's comm vsz rss user uid ppid args' 2>/dev/null | \ @@ -717,16 +717,26 @@ 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" - EXTRAS="$EXTRAS check_nagios" + 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 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_format="%s %d %d %d %d %f %s %n" - EXTRAS="$EXTRAS check_nagios" + ac_cv_ps_cols=8 AC_MSG_RESULT([$ac_cv_ps_command]) elif ps -Ao 'status comm vsz rss uid user ppid args' 2>/dev/null | \ @@ -735,7 +745,7 @@ 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" - EXTRAS="$EXTRAS check_nagios" + ac_cv_ps_cols=8 AC_MSG_RESULT([$ac_cv_ps_command]) elif ps -Ao 'state comm vsz rss uid user ppid args' 2>/dev/null | \ @@ -744,7 +754,7 @@ 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" - EXTRAS="$EXTRAS check_nagios" + ac_cv_ps_cols=8 AC_MSG_RESULT([$ac_cv_ps_command]) dnl wonder who takes state instead of stat @@ -754,7 +764,7 @@ 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" - EXTRAS="$EXTRAS check_nagios" + ac_cv_ps_cols=7 AC_MSG_RESULT([$ac_cv_ps_command]) dnl IRIX 53 @@ -764,6 +774,7 @@ then ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&pos,procprog]" 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]) dnl IRIX 63 @@ -773,6 +784,7 @@ then ac_cv_ps_varlist="[procstat,&procuid,&procppid,&pos,procprog]" 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]) dnl AIX 4.1: @@ -784,6 +796,7 @@ then ac_cv_ps_varlist="[procstat,&procuid,&procppid,&pos,procprog]" 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]) dnl AIX? @@ -793,6 +806,7 @@ then ac_cv_ps_varlist="[&procuid,&procppid,&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_MSG_RESULT([$ac_cv_ps_command]) dnl MacOSX / Darwin @@ -806,7 +820,7 @@ 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" - EXTRAS="$EXTRAS check_nagios" + ac_cv_ps_cols=7 AC_MSG_RESULT([$ac_cv_ps_command]) dnl UnixWare @@ -816,24 +830,24 @@ then ac_cv_ps_varlist="[procstat,&procuid,&procppid,&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" - #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_cv_ps_cols=7 AC_MSG_RESULT([$ac_cv_ps_command]) else - AC_MSG_WARN([unable to find usable ps syntax]) + AC_MSG_WARN([unable to find usable ps syntax - check_procs and check_nagios will not be compiled]) 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]) +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 jm_LIST_MOUNTED_FILESYSTEMS([list_mounted_fs=yes], [list_mounted_fs=no]) |