aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in159
1 files changed, 42 insertions, 117 deletions
diff --git a/configure.in b/configure.in
index 18eefe69..2a0120f5 100644
--- a/configure.in
+++ b/configure.in
@@ -622,13 +622,9 @@ 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_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]"
- ac_cv_ps_command="$PATH_TO_PS -weo 'stat uid ppid comm args'"
+ 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 %s %n"
- ac_cv_vsz_command="$PATH_TO_PS -weo 'vsz comm'"
- ac_cv_vsz_format="%d %s"
- ac_cv_rss_command="$PATH_TO_PS -weo 'rss comm'"
- ac_cv_rss_format="%d %s"
EXTRAS="$EXTRAS check_nagios"
AC_MSG_RESULT([$ac_cv_ps_command])
@@ -636,13 +632,9 @@ 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_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]"
- ac_cv_ps_command="$PATH_TO_PS waxco 'state uid ppid command command'"
+ 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 %s %n"
- ac_cv_vsz_command="$PATH_TO_PS waxco 'vsz command'"
- ac_cv_vsz_format="%d %s"
- ac_cv_rss_command="$PATH_TO_PS waxco 'rss command'"
- ac_cv_rss_format="%d %s"
EXTRAS="$EXTRAS check_nagios"
AC_MSG_RESULT([$ac_cv_ps_command])
@@ -650,13 +642,9 @@ 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_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]"
- ac_cv_ps_command="$PATH_TO_PS waxno 'state uid ppid comm args'"
+ 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 %s %n"
- ac_cv_vsz_command="$PATH_TO_PS waxno 'vsz comm'"
- ac_cv_vsz_format="%d %s"
- ac_cv_rss_command="$PATH_TO_PS waxno 'rss comm'"
- ac_cv_rss_format="%d %s"
EXTRAS="$EXTRAS check_nagios"
AC_MSG_RESULT([$ac_cv_ps_command])
@@ -665,13 +653,9 @@ dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND
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_cv_ps_varlist="[&procuid,&procppid,procstat,&pos,procprog]"
+ 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 %*s %*s %*s %s %*s %*s %n%s"
- ac_cv_vsz_command="$PATH_TO_PS laxnwww"
- ac_cv_vsz_format="%*s %*s %*s %*s %*s %*s %*s %d"
- ac_cv_rss_command="$PATH_TO_PS laxnwww"
- ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %*s %d"
+ 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])
@@ -682,13 +666,9 @@ 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_cv_ps_varlist="[&procuid,&procppid,procstat,&pos,procprog]"
+ 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 %*s %*s %*s %s %*s %*s %n%s"
- ac_cv_vsz_command="$PATH_TO_PS laxnwww"
- ac_cv_vsz_format="%*s %*s %*s %*s %*s %*s %d"
- ac_cv_rss_command="$PATH_TO_PS laxnwww"
- ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %d"
+ 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])
@@ -696,13 +676,9 @@ dnl OpenBSD (needs to come early because -exo appears to work, but does not give
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_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]"
- ac_cv_ps_command="$PATH_TO_PS -axo 'stat uid ppid comm args'"
+ 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 %s %n"
- ac_cv_vsz_command="$PATH_TO_PS -axo 'vsz comm'"
- ac_cv_vsz_format="%d %s"
- ac_cv_rss_command="$PATH_TO_PS -axo 'rss comm'"
- ac_cv_rss_format="%d %s"
EXTRAS="$EXTRAS check_nagios"
AC_MSG_RESULT([$ac_cv_ps_command])
@@ -710,65 +686,45 @@ dnl AIX 4.3.3 - needs verification. This works for Tru64 - needs %*[ +] in PS_FO
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,procprog,&pos]"
- ac_cv_ps_command="$PATH_TO_PS -ao 'stat uid ppid comm args'"
+ 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 %s %n"]]"
- ac_cv_vsz_command="$PATH_TO_PS -ao 'vsz comm'"
- ac_cv_vsz_format="%d %s"
- ac_cv_rss_command="$PATH_TO_PS -ao 'rss comm'"
- ac_cv_rss_format="%d %s"
EXTRAS="$EXTRAS check_nagios"
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
then
- ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]"
- ac_cv_ps_command="$PATH_TO_PS -eo 's uid ppid comm args'"
+ 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 %s %n"
- ac_cv_vsz_command="$PATH_TO_PS -eo 'vsz comm'"
- ac_cv_vsz_format="%d %s"
- ac_cv_rss_command="$PATH_TO_PS -eo 'rss comm'"
- ac_cv_rss_format="%d %s"
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
then
- ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]"
- ac_cv_ps_command="$PATH_TO_PS -Ao 's uid ppid comm args'"
+ 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 %s %n"
- ac_cv_vsz_command="$PATH_TO_PS -Ao 'vsz comm'"
- ac_cv_vsz_format="%d %s"
- ac_cv_rss_command="$PATH_TO_PS -Ao 'rss comm'"
- ac_cv_rss_format="%d %s"
EXTRAS="$EXTRAS check_nagios"
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
then
- ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]"
- ac_cv_ps_command="$PATH_TO_PS -Ao 'status uid ppid comm args'"
+ 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 %s %n"
- ac_cv_vsz_command="$PATH_TO_PS -Ao 'vsz comm'"
- ac_cv_vsz_format="%d %s"
- ac_cv_rss_command="$PATH_TO_PS -Ao 'rss comm'"
- ac_cv_rss_format="%d %s"
EXTRAS="$EXTRAS check_nagios"
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
then
- ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]"
- ac_cv_ps_command="$PATH_TO_PS -Ao 'state uid ppid comm args'"
+ 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 %s %n"
- ac_cv_vsz_command="$PATH_TO_PS -Ao 'vsz comm'"
- ac_cv_vsz_format="%d %s"
- ac_cv_rss_command="$PATH_TO_PS -Ao 'rss comm'"
- ac_cv_rss_format="%d %s"
EXTRAS="$EXTRAS check_nagios"
AC_MSG_RESULT([$ac_cv_ps_command])
@@ -776,13 +732,9 @@ 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_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]"
- ac_cv_ps_command="$PATH_TO_PS -ao 'state uid ppid command args'"
+ 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 %s %n"
- ac_cv_vsz_command="$PATH_TO_PS -ao 'vsz command'"
- ac_cv_vsz_format="%d %s"
- ac_cv_rss_command="$PATH_TO_PS -ao 'rss command'"
- ac_cv_rss_format="%d %s"
EXTRAS="$EXTRAS check_nagios"
AC_MSG_RESULT([$ac_cv_ps_command])
@@ -790,13 +742,9 @@ 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,&pos,procprog]"
+ 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 %*s %*s %*s %*s %*s %n%s"
- ac_cv_vsz_command="$PATH_TO_PS -el"
- ac_cv_vsz_format="%*s %*s %*s %*s %d"
- ac_cv_rss_command="$PATH_TO_PS -el"
- ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d"
+ ac_cv_ps_format="%*s %s %d %*s %d %*s %*s %*s %*s %d %d %*s %*s %*s %n%s"
AC_MSG_RESULT([$ac_cv_ps_command])
dnl IRIX 63
@@ -806,10 +754,6 @@ 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_vsz_command="$PATH_TO_PS -el"
- ac_cv_vsz_format="%*s %*s %*s %*s %d"
- ac_cv_rss_command="$PATH_TO_PS -el"
- ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d"
AC_MSG_RESULT([$ac_cv_ps_command])
dnl AIX 4.1:
@@ -821,39 +765,28 @@ 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_vsz_command="$PATH_TO_PS -el"
- ac_cv_vsz_format="%*s %*s %*s %*s %*s %*s %*s %*s %*s %d"
- ac_cv_rss_command="$PATH_TO_PS -el"
- ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %*s %*s %d"
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,procstat,&pos,procprog]"
+ 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 %*s %*s %*s %s %*s %*s %n%s"
- ac_cv_vsz_command="$PATH_TO_PS glaxen"
- ac_cv_vsz_format="%*s %*s %*s %*s %*s %*s %d"
- ac_cv_rss_command="$PATH_TO_PS glaxen"
- ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %d"
+ ac_cv_ps_format="%*s %d %*s %d %*s %*s %d %d %*s %s %*s %*s %n%s"
AC_MSG_RESULT([$ac_cv_ps_command])
dnl MacOSX / Darwin
dnl TODO: MacOSX has commands with spaces which will cause problems to PS_FORMAT
-dnl STAT VSZ RSS UID USER PPID UCOMM COMMAND
-dnl Ss 1308 272 0 root 0 init /sbin/init
-elif ps waxo 'state vsz rss uid user ppid ucomm command' 2>/dev/null | \
- egrep -i ["^STAT +VSZ +RSS +UID +USER +PPID +UCOMM +COMMAND"] >/dev/null
+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 | \
+ egrep -i ["^STAT +VSZ +RSS +UID +PPID +%CPU +UCOMM +COMMAND"] >/dev/null
then
- ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]"
- ac_cv_ps_command="$PATH_TO_PS waxo 'state uid ppid ucomm command'"
- ac_cv_ps_format="%s %d %d %s %n"
- ac_cv_vsz_command="$PATH_TO_PS waxco 'vsz command'"
- ac_cv_vsz_format="%d %s"
- ac_cv_rss_command="$PATH_TO_PS waxco 'rss command'"
- ac_cv_rss_format="%d %s"
+ 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_MSG_RESULT([$ac_cv_ps_command])
@@ -864,12 +797,12 @@ 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
+ #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
@@ -882,14 +815,6 @@ 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(VSZ_COMMAND,"$ac_cv_vsz_command",
- [Verbatim command to execute for ps in check_vsz])
-AC_DEFINE_UNQUOTED(VSZ_FORMAT,"$ac_cv_vsz_format",
- [Format string for scanning ps output in check_vsz])
-AC_DEFINE_UNQUOTED(RSS_COMMAND,"$ac_cv_rss_command",
- [Verbatim command to execute for ps in check_rss])
-AC_DEFINE_UNQUOTED(RSS_FORMAT,"$ac_cv_rss_format",
- [Format string for scanning ps output in check_rss])
AC_PATH_PROG(PATH_TO_DF,df)
AC_PATH_PROG(PATH_TO_BDF,bdf)