diff options
author | Jeremy T. Bouse <undrgrid@users.sourceforge.net> | 2003-03-10 23:58:16 +0000 |
---|---|---|
committer | Jeremy T. Bouse <undrgrid@users.sourceforge.net> | 2003-03-10 23:58:16 +0000 |
commit | 01d037c990067c9db7fed5bc7210cf0d235894c0 (patch) | |
tree | d71adbc521b78b1ac5608d797553bc96d4caa42f /configure.in | |
parent | 1890b94ddf22dde6b4f4d76d9f39c6e7bdec4bc9 (diff) | |
download | monitoring-plugins-01d037c990067c9db7fed5bc7210cf0d235894c0.tar.gz |
Cleaned up configure for PS and PING to produce cleaner config.h
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@390 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 575 |
1 files changed, 343 insertions, 232 deletions
diff --git a/configure.in b/configure.in index 029b583c..5596e2d5 100644 --- a/configure.in +++ b/configure.in | |||
@@ -53,7 +53,6 @@ SUPPORT="Send email to nagios-users@lists.sourceforge.net if you have questions\ | |||
53 | AC_SUBST(SUPPORT) | 53 | AC_SUBST(SUPPORT) |
54 | 54 | ||
55 | dnl CGIURL has changed for Nagios with 1.0 beta | 55 | dnl CGIURL has changed for Nagios with 1.0 beta |
56 | dnl AC_ARG_WITH(cgiurl,--with-cgiurl=<dir> sets URL for cgi programs,cgiurl=$withval,cgiurl=/nagios/cgi-bin) | ||
57 | AC_ARG_WITH(cgiurl, | 56 | AC_ARG_WITH(cgiurl, |
58 | ACX_HELP_STRING([--with-cgiurl=DIR], | 57 | ACX_HELP_STRING([--with-cgiurl=DIR], |
59 | [sets URL for cgi programs]), | 58 | [sets URL for cgi programs]), |
@@ -62,13 +61,11 @@ AC_ARG_WITH(cgiurl, | |||
62 | CGIURL="$cgiurl" | 61 | CGIURL="$cgiurl" |
63 | AC_DEFINE_UNQUOTED(CGIURL,"$CGIURL",[URL of CGI programs]) | 62 | AC_DEFINE_UNQUOTED(CGIURL,"$CGIURL",[URL of CGI programs]) |
64 | 63 | ||
65 | dnl AC_ARG_WITH(nagios_user,--with-nagios-user=<user> sets user name to run nagios,nagios_usr=$withval,nagios_usr=nagios) | ||
66 | AC_ARG_WITH(nagios_user, | 64 | AC_ARG_WITH(nagios_user, |
67 | ACX_HELP_STRING([--with-nagios-user=USER], | 65 | ACX_HELP_STRING([--with-nagios-user=USER], |
68 | [set user name to run nagios]), | 66 | [set user name to run nagios]), |
69 | nagios_usr=$withval, | 67 | nagios_usr=$withval, |
70 | nagios_usr=nagios) | 68 | nagios_usr=nagios) |
71 | dnl AC_ARG_WITH(nagios_group,--with-nagios-group=<group> sets group name to run nagios,nagios_grp=$withval,nagios_grp=nagios) | ||
72 | AC_ARG_WITH(nagios_group, | 69 | AC_ARG_WITH(nagios_group, |
73 | ACX_HELP_STRING([--with-nagios-group=GROUP], | 70 | ACX_HELP_STRING([--with-nagios-group=GROUP], |
74 | [set group name to run nagios]), | 71 | [set group name to run nagios]), |
@@ -79,7 +76,6 @@ AC_SUBST(nagios_grp) | |||
79 | INSTALL_OPTS="-o $nagios_usr -g $nagios_grp" | 76 | INSTALL_OPTS="-o $nagios_usr -g $nagios_grp" |
80 | AC_SUBST(INSTALL_OPTS) | 77 | AC_SUBST(INSTALL_OPTS) |
81 | 78 | ||
82 | dnl AC_ARG_WITH(trusted_path,--with-trusted-path=/bin:/sbin:/usr/bin:/usr/sbin sets trusted path for executables called by scripts,trusted_path=$withval,trusted_path=/bin:/sbin:/usr/bin:/usr/sbin) | ||
83 | AC_ARG_WITH(trusted_path, | 79 | AC_ARG_WITH(trusted_path, |
84 | ACX_HELP_STRING([--with-trusted-path=PATH], | 80 | ACX_HELP_STRING([--with-trusted-path=PATH], |
85 | [sets trusted path for executables called by scripts (default=/bin:/sbin:/usr/bin:/usr/sbin)]), | 81 | [sets trusted path for executables called by scripts (default=/bin:/sbin:/usr/bin:/usr/sbin)]), |
@@ -131,7 +127,6 @@ AC_SUBST(SOCKETLIBS) | |||
131 | dnl Check for PostgreSQL libraries | 127 | dnl Check for PostgreSQL libraries |
132 | _SAVEDLIBS="$LIBS" | 128 | _SAVEDLIBS="$LIBS" |
133 | _SAVEDCPPFLAGS="$CPPFLAGS" | 129 | _SAVEDCPPFLAGS="$CPPFLAGS" |
134 | dnl AC_ARG_WITH(pgsql,--with-pgsql=<dir> sets path to pgsql installation,[PGSQL=$withval]) | ||
135 | AC_ARG_WITH(pgsql, | 130 | AC_ARG_WITH(pgsql, |
136 | ACX_HELP_STRING([--with-pgsql=DIR], | 131 | ACX_HELP_STRING([--with-pgsql=DIR], |
137 | [sets path to pgsql installation]), | 132 | [sets path to pgsql installation]), |
@@ -212,7 +207,6 @@ LIBS="$_SAVEDLIBS" | |||
212 | dnl Check for mysql libraries | 207 | dnl Check for mysql libraries |
213 | _SAVEDLIBS="$LIBS" | 208 | _SAVEDLIBS="$LIBS" |
214 | _SAVEDCPPFLAGS="$CPPFLAGS" | 209 | _SAVEDCPPFLAGS="$CPPFLAGS" |
215 | dnl AC_ARG_WITH(mysql,--with-mysql=<dir> sets path to mysql installation (assumes lib/mysql and include subdirs),[MYSQL=$withval]) | ||
216 | AC_ARG_WITH(mysql, | 210 | AC_ARG_WITH(mysql, |
217 | ACX_HELP_STRING([--with-mysql=DIR], | 211 | ACX_HELP_STRING([--with-mysql=DIR], |
218 | [sets path to mysql installation (assumes lib/mysql and include subdirs]), | 212 | [sets path to mysql installation (assumes lib/mysql and include subdirs]), |
@@ -270,7 +264,6 @@ elif test "$OPENSSL" = "/usr/local/bin/openssl"; then | |||
270 | elif test "$OPENSSL" = "/usr/local/ssl/bin/openssl"; then | 264 | elif test "$OPENSSL" = "/usr/local/ssl/bin/openssl"; then |
271 | OPENSSL=/usr/local/ssl | 265 | OPENSSL=/usr/local/ssl |
272 | fi | 266 | fi |
273 | dnl AC_ARG_WITH(openssl,--with-openssl=<dir> sets path to openssl installation,[OPENSSL=$withval]) | ||
274 | AC_ARG_WITH(openssl, | 267 | AC_ARG_WITH(openssl, |
275 | ACX_HELP_STRING([--with-openssl=DIR], | 268 | ACX_HELP_STRING([--with-openssl=DIR], |
276 | [sets path to openssl installation]), | 269 | [sets path to openssl installation]), |
@@ -554,262 +547,331 @@ then | |||
554 | AC_DEFINE_UNQUOTED(PROC_LOADAVG,"/proc/loadavg",[Location of /proc/loadavg]) | 547 | AC_DEFINE_UNQUOTED(PROC_LOADAVG,"/proc/loadavg",[Location of /proc/loadavg]) |
555 | fi | 548 | fi |
556 | 549 | ||
550 | dnl #### Process table test | ||
551 | |||
557 | AC_PATH_PROG(PATH_TO_PS,ps) | 552 | AC_PATH_PROG(PATH_TO_PS,ps) |
553 | ac_cv_use_ps_vars=no | ||
554 | |||
558 | dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND | 555 | dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND |
559 | 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 | 556 | if ps -weo 'stat comm vsz rss user uid ppid args' 2>/dev/null | \ |
557 | egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ \ | ||
558 | +P[PID]+ +[RGSCOMDNA]+"] >/dev/null | ||
560 | then | 559 | then |
561 | AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf]) | 560 | ac_cv_use_ps_vars=yes |
562 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[Variable list for sscanf of 'ps' output]) | 561 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]" |
563 | AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -weo 'stat user ppid args'",[Verbatim command to execute for ps in check_netsaint]) | 562 | ac_cv_ps_raw_command="$PATH_TO_PS -weo 'stat user ppid args'" |
563 | ac_cv_ps_command="$PATH_TO_PS -weo 'stat uid ppid comm args'" | ||
564 | ac_cv_ps_format="%s %d %d %s %n" | ||
565 | ac_cv_vsz_command="$PATH_TO_PS -weo 'vsz comm'" | ||
566 | ac_cv_vsz_format="%d %s" | ||
567 | ac_cv_rss_command="$PATH_TO_PS -weo 'rss comm'" | ||
568 | ac_cv_rss_format="%d %s" | ||
564 | EXTRAS="$EXTRAS check_nagios" | 569 | EXTRAS="$EXTRAS check_nagios" |
565 | AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -weo 'stat uid ppid comm args'",[Verbatim command to execute for ps in check_procs]) | 570 | echo " ps syntax... $PATH_TO_PS -weo 'stat comm vsz rss user ppid args'" |
566 | AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n",[Format string for scanning ps output in check_procs]) | 571 | |
567 | AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -weo 'vsz comm'",[Verbatim command to execute for ps in check_vsz]) | ||
568 | AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[Format string for scanning ps output in check_vsz]) | ||
569 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -weo 'rss comm'",[Verbatim command to execute for ps in check_rss]) | ||
570 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[Format string for scanning ps output in check_rss]) | ||
571 | echo " ps syntax... $PATH_TO_PS -weo 'stat comm vsz rss user ppid args'" | ||
572 | dnl FreeBSD | 572 | dnl FreeBSD |
573 | elif ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i ["^STAT +COMMAND +VSZ +RSS +UID +USER +PPID"] >/dev/null | 573 | elif ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | \ |
574 | egrep -i ["^STAT +COMMAND +VSZ +RSS +UID +USER +PPID"] >/dev/null | ||
574 | then | 575 | then |
575 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) | 576 | ac_cv_use_ps_vars=yes |
576 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[]) | 577 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]" |
577 | AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command'",[]) | 578 | ac_cv_ps_raw_command="$PATH_TO_PS waxo 'state uid ppid command'" |
579 | ac_cv_ps_command="$PATH_TO_PS waxco 'state uid ppid command command'" | ||
580 | ac_cv_ps_format="%s %d %d %s %n" | ||
581 | ac_cv_vsz_command="$PATH_TO_PS waxco 'vsz command'" | ||
582 | ac_cv_vsz_format="%d %s" | ||
583 | ac_cv_rss_command="$PATH_TO_PS waxco 'rss command'" | ||
584 | ac_cv_rss_format="%d %s" | ||
578 | EXTRAS="$EXTRAS check_nagios" | 585 | EXTRAS="$EXTRAS check_nagios" |
579 | AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxco 'state uid ppid command command'",[]) | ||
580 | AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n",[Format string for scanning ps output in check_procs]) | ||
581 | AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxco 'vsz command'",[]) | ||
582 | AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[]) | ||
583 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxco 'rss command'",[]) | ||
584 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) | ||
585 | echo " ps syntax... $PATH_TO_PS -Ao 'state command vsz rss'" | 586 | echo " ps syntax... $PATH_TO_PS -Ao 'state command vsz rss'" |
587 | |||
586 | dnl BSD-like mode in RH 6.1 | 588 | dnl BSD-like mode in RH 6.1 |
587 | 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 | 589 | elif ps waxno 'state comm vsz rss uid user ppid args' 2>/dev/null | \ |
590 | egrep -i ["^S +COMMAND +VSZ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] \ | ||
591 | >/dev/null | ||
588 | then | 592 | then |
589 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) | 593 | ac_cv_use_ps_vars=yes |
590 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[]) | 594 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]" |
591 | AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS waxno 'state user ppid comm'",[]) | 595 | ac_cv_ps_raw_command="$PATH_TO_PS waxno 'state user ppid comm'" |
596 | ac_cv_ps_command="$PATH_TO_PS waxno 'state uid ppid comm args'" | ||
597 | ac_cv_ps_format="%s %d %d %s %n" | ||
598 | ac_cv_vsz_command="$PATH_TO_PS waxno 'vsz comm'" | ||
599 | ac_cv_vsz_format="%d %s" | ||
600 | ac_cv_rss_command="$PATH_TO_PS waxno 'rss comm'" | ||
601 | ac_cv_rss_format="%d %s" | ||
592 | EXTRAS="$EXTRAS check_nagios" | 602 | EXTRAS="$EXTRAS check_nagios" |
593 | AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxno 'state uid ppid comm args'",[]) | ||
594 | AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n",[Format string for scanning ps output in check_procs]) | ||
595 | AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxno 'vsz comm'",[]) | ||
596 | AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[]) | ||
597 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxno 'rss comm'",[]) | ||
598 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) | ||
599 | echo " ps syntax... $PATH_TO_PS -waxco 'state comm vsz rss'" | 603 | echo " ps syntax... $PATH_TO_PS -waxco 'state comm vsz rss'" |
604 | |||
600 | dnl SunOS 4.1.3: | 605 | dnl SunOS 4.1.3: |
601 | dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND | 606 | dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND |
602 | dnl | 607 | elif ps -laxnwww 2>/dev/null | egrep -i ["^ *F(LAGS)? +UID +PID +PPID \ |
603 | 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 | 608 | +CP +PRI +NI +(SZ)|(VSZ)|(SIZE) +RSS +WCHAN +STAT? +TTY? +TIME \ |
609 | +COMMAND"] >/dev/null | ||
604 | then | 610 | then |
605 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) | 611 | ac_cv_use_ps_vars=yes |
606 | AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS laxnwww",[]) | 612 | ac_cv_ps_raw_command="$PATH_TO_PS laxnwww" |
613 | ac_cv_ps_varlist="[&procuid,&procppid,procstat,&pos,procprog]" | ||
614 | ac_cv_ps_command="$PATH_TO_PS -laxnwww" | ||
615 | ac_cv_ps_format="%*s %d %*s %d %*s %*s %*s %*s %*s %*s %s %*s %*s %n%s" | ||
616 | ac_cv_vsz_command="$PATH_TO_PS laxnwww" | ||
617 | ac_cv_vsz_format="%*s %*s %*s %*s %*s %*s %*s %d" | ||
618 | ac_cv_rss_command="$PATH_TO_PS laxnwww" | ||
619 | ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %*s %d" | ||
607 | EXTRAS="$EXTRAS check_nagios" | 620 | EXTRAS="$EXTRAS check_nagios" |
608 | AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog],[]) | ||
609 | AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -laxnwww",[]) | ||
610 | AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %d %*s %d %*s %*s %*s %*s %*s %*s %s %*s %*s %n%s",[Format string for scanning ps output in check_procs]) | ||
611 | AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS laxnwww",[]) | ||
612 | AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d",[]) | ||
613 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS laxnwww",[]) | ||
614 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %d",[]) | ||
615 | echo " ps syntax... $PATH_TO_PS laxnwww" | 621 | echo " ps syntax... $PATH_TO_PS laxnwww" |
622 | |||
616 | dnl Debian Linux / procps v1.2.9: | 623 | dnl Debian Linux / procps v1.2.9: |
617 | dnl FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND | 624 | dnl FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND |
618 | dnl 100 0 1 0 0 0 776 76 c0131c8c S ffff 0:11 init [2] | 625 | dnl 100 0 1 0 0 0 776 76 c0131c8c S ffff 0:11 init [2] |
619 | dnl | 626 | dnl |
620 | 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 | 627 | elif ps laxnwww 2>/dev/null | egrep -i ["^ *F(LAGS)? +UID +PID +PPID +PRI \ |
628 | +NI +(VSZ)|(SIZE) +RSS +WCHAN +STAT? TTY +TIME +COMMAND"] >/dev/null | ||
621 | then | 629 | then |
622 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) | 630 | ac_cv_use_ps_vars=yes |
623 | AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS laxnwww",[]) | 631 | ac_cv_ps_raw_command="$PATH_TO_PS laxnwww" |
632 | ac_cv_ps_varlist="[&procuid,&procppid,procstat,&pos,procprog]" | ||
633 | ac_cv_ps_command="$PATH_TO_PS laxnwww" | ||
634 | ac_cv_ps_format="%*s %d %*s %d %*s %*s %*s %*s %*s %s %*s %*s %n%s" | ||
635 | ac_cv_vsz_command="$PATH_TO_PS laxnwww" | ||
636 | ac_cv_vsz_format="%*s %*s %*s %*s %*s %*s %d" | ||
637 | ac_cv_rss_command="$PATH_TO_PS laxnwww" | ||
638 | ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %d" | ||
624 | EXTRAS="$EXTRAS check_nagios" | 639 | EXTRAS="$EXTRAS check_nagios" |
625 | AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog],[]) | ||
626 | AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS laxnwww",[]) | ||
627 | AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %d %*s %d %*s %*s %*s %*s %*s %s %*s %*s %n%s",[Format string for scanning ps output in check_procs]) | ||
628 | AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS laxnwww",[]) | ||
629 | AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %d",[]) | ||
630 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS laxnwww",[]) | ||
631 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d",[]) | ||
632 | echo " ps syntax... $PATH_TO_PS laxnwww" | 640 | echo " ps syntax... $PATH_TO_PS laxnwww" |
641 | |||
633 | dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs) | 642 | dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs) |
634 | 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 | 643 | elif ps -axo 'stat comm vsz rss user uid ppid args' 2>/dev/null | \ |
644 | egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ \ | ||
645 | +U[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null | ||
635 | then | 646 | then |
636 | AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf]) | 647 | ac_cv_use_ps_vars=yes |
637 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[Variable list for sscanf of 'ps' output]) | 648 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]" |
638 | AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -axo 'stat user ppid args'",[Verbatim command to execute for ps in check_netsaint]) | 649 | ac_cv_ps_raw_command="$PATH_TO_PS -axo 'stat user ppid args'" |
650 | ac_cv_ps_command="$PATH_TO_PS -axo 'stat uid ppid comm args'" | ||
651 | ac_cv_ps_format="%s %d %d %s %n" | ||
652 | ac_cv_vsz_command="$PATH_TO_PS -axo 'vsz comm'" | ||
653 | ac_cv_vsz_format="%d %s" | ||
654 | ac_cv_rss_command="$PATH_TO_PS -axo 'rss comm'" | ||
655 | ac_cv_rss_format="%d %s" | ||
639 | EXTRAS="$EXTRAS check_nagios" | 656 | EXTRAS="$EXTRAS check_nagios" |
640 | AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -axo 'stat uid ppid comm args'",[Verbatim command to execute for ps in check_procs]) | 657 | echo " ps syntax... $PATH_TO_PS -axo 'stat comm vsz rss user ppid args'" |
641 | AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n",[Format string for scanning ps output in check_procs]) | 658 | |
642 | AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -axo 'vsz comm'",[Verbatim command to execute for ps in check_vsz]) | ||
643 | AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[Format string for scanning ps output in check_vsz]) | ||
644 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -axo 'rss comm'",[Verbatim command to execute for ps in check_rss]) | ||
645 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[Format string for scanning ps output in check_rss]) | ||
646 | echo " ps syntax... $PATH_TO_PS -axo 'stat comm vsz rss user ppid args'" | ||
647 | dnl AIX 4.3.3 - needs verification. This works for Tru64 - needs %*[ +] in PS_FORMAT | 659 | dnl AIX 4.3.3 - needs verification. This works for Tru64 - needs %*[ +] in PS_FORMAT |
648 | 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 | 660 | elif ps -ao 'stat comm vsz rss user uid ppid args' 2>/dev/null | \ |
661 | egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ \ | ||
662 | +U[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null | ||
649 | then | 663 | then |
650 | AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf]) | 664 | ac_cv_use_ps_vars=yes |
651 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[Variable list for sscanf of 'ps' output]) | 665 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]" |
652 | AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -ao 'stat user ppid args'",[Verbatim command to execute for ps in check_netsaint]) | 666 | ac_cv_ps_raw_command="$PATH_TO_PS -ao 'stat user ppid args'" |
667 | ac_cv_ps_command="$PATH_TO_PS -ao 'stat uid ppid comm args'" | ||
668 | ac_cv_ps_format="[["%s%*[ +] %d %d %s %n"]]" | ||
669 | ac_cv_vsz_command="$PATH_TO_PS -ao 'vsz comm'" | ||
670 | ac_cv_vsz_format="%d %s" | ||
671 | ac_cv_rss_command="$PATH_TO_PS -ao 'rss comm'" | ||
672 | ac_cv_rss_format="%d %s" | ||
653 | EXTRAS="$EXTRAS check_nagios" | 673 | EXTRAS="$EXTRAS check_nagios" |
654 | AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -ao 'stat uid ppid comm args'") | 674 | echo " ps syntax... $PATH_TO_PS -ao 'stat comm vsz rss user ppid args'" |
655 | AC_DEFINE_UNQUOTED(PS_FORMAT,[["%s%*[ +] %d %d %s %n"]],[Format string for scanning ps output in check_procs]) | 675 | |
656 | AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -ao 'vsz comm'",[]) | 676 | elif ps -eo 's comm vsz rss user uid ppid args' 2>/dev/null | \ |
657 | AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[]) | 677 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +[VSIZE]+ +U[SER]+ +U[ID]+ \ |
658 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -ao 'rss comm'",[]) | 678 | +P[PID]+ +[RGSCOMDNA]+"] >/dev/null |
659 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) | ||
660 | echo " ps syntax... $PATH_TO_PS -ao 'stat comm vsz rss user ppid args'" | ||
661 | 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 | ||
662 | then | 679 | then |
663 | AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf]) | 680 | ac_cv_use_ps_vars=yes |
664 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[Variable list for sscanf of 'ps' output]) | 681 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]" |
665 | AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -eo 's user ppid args'",[Verbatim command to execute for ps in check_netsaint]) | 682 | ac_cv_ps_raw_command="$PATH_TO_PS -eo 's user ppid args'" |
683 | ac_cv_ps_command="$PATH_TO_PS -eo 's uid ppid comm args'" | ||
684 | ac_cv_ps_format="%s %d %d %s %n" | ||
685 | ac_cv_vsz_command="$PATH_TO_PS -eo 'vsz comm'" | ||
686 | ac_cv_vsz_format="%d %s" | ||
687 | ac_cv_rss_command="$PATH_TO_PS -eo 'rss comm'" | ||
688 | ac_cv_rss_format="%d %s" | ||
666 | EXTRAS="$EXTRAS check_nagios" | 689 | EXTRAS="$EXTRAS check_nagios" |
667 | AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -eo 's uid ppid comm args'") | ||
668 | AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n",[Format string for scanning ps output in check_procs]) | ||
669 | AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -eo 'vsz comm'",[]) | ||
670 | AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[]) | ||
671 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -eo 'rss comm'",[]) | ||
672 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) | ||
673 | echo " ps syntax... $PATH_TO_PS -eo 's comm vsz rss user ppid args'" | 690 | echo " ps syntax... $PATH_TO_PS -eo 's comm vsz rss user ppid args'" |
674 | 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 | 691 | |
692 | elif ps -Ao 's comm vsz rss uid user ppid args' 2>/dev/null | \ | ||
693 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER \ | ||
694 | +PPID +[RGSCOMDNA]+"] >/dev/null | ||
675 | then | 695 | then |
676 | AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf]) | 696 | ac_cv_use_ps_vars=yes |
677 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[Variable list for sscanf of 'ps' output]) | 697 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]" |
678 | AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -Ao 's user ppid args'",[Verbatim command to execute for ps in check_netsaint]) | 698 | ac_cv_ps_raw_command="$PATH_TO_PS -Ao 's user ppid args'" |
699 | ac_cv_ps_command="$PATH_TO_PS -Ao 's uid ppid comm args'" | ||
700 | ac_cv_ps_format="%s %d %d %s %n" | ||
701 | ac_cv_vsz_command="$PATH_TO_PS -Ao 'vsz comm'" | ||
702 | ac_cv_vsz_format="%d %s" | ||
703 | ac_cv_rss_command="$PATH_TO_PS -Ao 'rss comm'" | ||
704 | ac_cv_rss_format="%d %s" | ||
679 | EXTRAS="$EXTRAS check_nagios" | 705 | EXTRAS="$EXTRAS check_nagios" |
680 | AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -Ao 's uid ppid comm args'",[]) | ||
681 | AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n",[Format string for scanning ps output in check_procs]) | ||
682 | AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -Ao 'vsz comm'",[]) | ||
683 | AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[]) | ||
684 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'",[]) | ||
685 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) | ||
686 | echo " ps syntax... $PATH_TO_PS -Ao 's comm vsz rss'" | 706 | echo " ps syntax... $PATH_TO_PS -Ao 's comm vsz rss'" |
687 | 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 | 707 | |
708 | elif ps -Ao 'status comm vsz rss uid user ppid args' 2>/dev/null | \ | ||
709 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER \ | ||
710 | +PPID +[RGSCOMDNA]+"] >/dev/null | ||
688 | then | 711 | then |
689 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) | 712 | ac_cv_use_ps_vars=yes |
690 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) | 713 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]" |
691 | AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -Ao 'status user ppid args'",[Verbatim command to execute for ps in check_netsaint]) | 714 | ac_cv_ps_raw_command="$PATH_TO_PS -Ao 'status user ppid args'" |
715 | ac_cv_ps_command="$PATH_TO_PS -Ao 'status uid ppid comm args'" | ||
716 | ac_cv_ps_format="%s %d %d %s %n" | ||
717 | ac_cv_vsz_command="$PATH_TO_PS -Ao 'vsz comm'" | ||
718 | ac_cv_vsz_format="%d %s" | ||
719 | ac_cv_rss_command="$PATH_TO_PS -Ao 'rss comm'" | ||
720 | ac_cv_rss_format="%d %s" | ||
692 | EXTRAS="$EXTRAS check_nagios" | 721 | EXTRAS="$EXTRAS check_nagios" |
693 | AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -Ao 'status uid ppid comm args'",[]) | ||
694 | AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n",[Format string for scanning ps output in check_procs]) | ||
695 | AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -Ao 'vsz comm'",[]) | ||
696 | AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[]) | ||
697 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'",[]) | ||
698 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) | ||
699 | echo " ps syntax... $PATH_TO_PS -Ao 'status comm vsz rss'" | 722 | echo " ps syntax... $PATH_TO_PS -Ao 'status comm vsz rss'" |
700 | 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 | 723 | |
724 | elif ps -Ao 'state comm vsz rss uid user ppid args' 2>/dev/null | \ | ||
725 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER \ | ||
726 | +PPID +[RGSCOMDNA]+"] >/dev/null | ||
701 | then | 727 | then |
702 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) | 728 | ac_cv_use_ps_vars=yes |
703 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) | 729 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]" |
704 | AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -Ao 'state user ppid args'",[Verbatim command to execute for ps in check_netsaint]) | 730 | ac_cv_ps_raw_command="$PATH_TO_PS -Ao 'state user ppid args'" |
731 | ac_cv_ps_command="$PATH_TO_PS -Ao 'state uid ppid comm args'" | ||
732 | ac_cv_ps_format="%s %d %d %s %n" | ||
733 | ac_cv_vsz_command="$PATH_TO_PS -Ao 'vsz comm'" | ||
734 | ac_cv_vsz_format="%d %s" | ||
735 | ac_cv_rss_command="$PATH_TO_PS -Ao 'rss comm'" | ||
736 | ac_cv_rss_format="%d %s" | ||
705 | EXTRAS="$EXTRAS check_nagios" | 737 | EXTRAS="$EXTRAS check_nagios" |
706 | AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -Ao 'state uid ppid comm args'",[]) | ||
707 | AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n",[Format string for scanning ps output in check_procs]) | ||
708 | AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -Ao 'vsz comm'",[]) | ||
709 | AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[]) | ||
710 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'",[]) | ||
711 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) | ||
712 | echo " ps syntax... $PATH_TO_PS -Ao 'state comm vsz rss'" | 738 | echo " ps syntax... $PATH_TO_PS -Ao 'state comm vsz rss'" |
739 | |||
713 | dnl wonder who takes state instead of stat | 740 | dnl wonder who takes state instead of stat |
714 | 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 | 741 | elif ps -ao 'state command vsz rss user ppid args' 2>/dev/null | \ |
742 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER \ | ||
743 | +PPID +[RGSCOMDNA]+"] >/dev/null | ||
715 | then | 744 | then |
716 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) | 745 | ac_cv_use_ps_vars=yes |
717 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[]) | 746 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]" |
718 | AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -ao 'state user ppid args'",[]) | 747 | ac_cv_ps_raw_command="$PATH_TO_PS -ao 'state user ppid args'" |
748 | ac_cv_ps_command="$PATH_TO_PS -ao 'state uid ppid command args'" | ||
749 | ac_cv_ps_format="%s %d %d %s %n" | ||
750 | ac_cv_vsz_command="$PATH_TO_PS -ao 'vsz command'" | ||
751 | ac_cv_vsz_format="%d %s" | ||
752 | ac_cv_rss_command="$PATH_TO_PS -ao 'rss command'" | ||
753 | ac_cv_rss_format="%d %s" | ||
719 | EXTRAS="$EXTRAS check_nagios" | 754 | EXTRAS="$EXTRAS check_nagios" |
720 | AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -ao 'state uid ppid command args'",[]) | ||
721 | AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n",[Format string for scanning ps output in check_procs]) | ||
722 | AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -ao 'vsz command'",[]) | ||
723 | AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[]) | ||
724 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -ao 'rss command'",[]) | ||
725 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) | ||
726 | echo " ps syntax... $PATH_TO_PS -ao 'state command vsz rss'" | 755 | echo " ps syntax... $PATH_TO_PS -ao 'state command vsz rss'" |
756 | |||
727 | dnl IRIX 53 | 757 | dnl IRIX 53 |
728 | 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 | 758 | elif ps -el 2>/dev/null | egrep -i ["^ *F +S +UID +PID +PPID +C +PRI \ |
759 | +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null | ||
729 | then | 760 | then |
730 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) | 761 | ac_cv_use_ps_vars=yes |
731 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog],[]) | 762 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,&pos,procprog]" |
732 | AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -el",[]) | 763 | ac_cv_ps_command="$PATH_TO_PS -el" |
733 | AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s",[Format string for scanning ps output in check_procs]) | 764 | ac_cv_ps_format="%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s" |
734 | AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -el",[]) | 765 | ac_cv_vsz_command="$PATH_TO_PS -el" |
735 | AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %d",[]) | 766 | ac_cv_vsz_format="%*s %*s %*s %*s %d" |
736 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -el",[]) | 767 | ac_cv_rss_command="$PATH_TO_PS -el" |
737 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d",[]) | 768 | ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d" |
738 | echo " ps syntax... $PATH_TO_PS -el" | 769 | echo " ps syntax... $PATH_TO_PS -el" |
770 | |||
739 | dnl IRIX 63 | 771 | dnl IRIX 63 |
740 | 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 | 772 | elif ps -el 2>/dev/null | egrep -i ["^ *F +S +UID +PID +PPID +C +PRI \ |
773 | +NI +P +ADDR +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null | ||
741 | then | 774 | then |
742 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) | 775 | ac_cv_use_ps_vars=yes |
743 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog],[]) | 776 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,&pos,procprog]" |
744 | AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -el",[]) | 777 | ac_cv_ps_command="$PATH_TO_PS -el" |
745 | AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s",[Format string for scanning ps output in check_procs]) | 778 | ac_cv_ps_format="%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s" |
746 | AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -el",[]) | 779 | ac_cv_vsz_command="$PATH_TO_PS -el" |
747 | AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %d",[]) | 780 | ac_cv_vsz_format="%*s %*s %*s %*s %d" |
748 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -el",[]) | 781 | ac_cv_rss_command="$PATH_TO_PS -el" |
749 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d",[]) | 782 | ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d" |
750 | echo " ps syntax... $PATH_TO_PS -el" | 783 | echo " ps syntax... $PATH_TO_PS -el" |
751 | dnl | 784 | |
752 | dnl AIX 4.1: | 785 | dnl AIX 4.1: |
753 | dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME CMD | 786 | dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME CMD |
754 | dnl 303 A 0 0 0 120 16 -- 1c07 20 24 - 0:45 swapper | 787 | dnl 303 A 0 0 0 120 16 -- 1c07 20 24 - 0:45 swapper |
755 | elif ps -el 2>/dev/null | egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +ADDR +SZ +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null | 788 | elif ps -el 2>/dev/null | egrep -i ["^ *F +S +UID +PID +PPID +C +PRI \ |
789 | +NI +ADDR +SZ +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null | ||
756 | then | 790 | then |
757 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) | 791 | ac_cv_use_ps_vars=yes |
758 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog],[]) | 792 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,&pos,procprog]" |
759 | AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -el",[]) | 793 | ac_cv_ps_command="$PATH_TO_PS -el" |
760 | AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %n%s",[Format string for scanning ps output in check_procs]) | 794 | ac_cv_ps_format="%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %n%s" |
761 | AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -el",[]) | 795 | ac_cv_vsz_command="$PATH_TO_PS -el" |
762 | AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %d",[]) | 796 | ac_cv_vsz_format="%*s %*s %*s %*s %*s %*s %*s %*s %*s %d" |
763 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -el",[]) | 797 | ac_cv_rss_command="$PATH_TO_PS -el" |
764 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %d",[]) | 798 | ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %*s %*s %d" |
765 | echo " ps syntax... $PATH_TO_PS -el" | 799 | echo " ps syntax... $PATH_TO_PS -el" |
800 | |||
766 | dnl AIX? | 801 | dnl AIX? |
767 | elif ps glaxen 2>/dev/null | egrep -i ["^ *F +UID +PID +PPID +PRI +NI +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND"] >/dev/null | 802 | elif ps glaxen 2>/dev/null | egrep -i ["^ *F +UID +PID +PPID +PRI +NI \ |
803 | +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND"] >/dev/null | ||
768 | then | 804 | then |
769 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) | 805 | ac_cv_use_ps_vars=yes |
770 | AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog],[]) | 806 | ac_cv_ps_varlist="[&procuid,&procppid,procstat,&pos,procprog]" |
771 | AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS glaxen",[]) | 807 | ac_cv_ps_command="$PATH_TO_PS glaxen" |
772 | AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %d %*s %d %*s %*s %*s %*s %*s %s %*s %*s %n%s",[Format string for scanning ps output in check_procs]) | 808 | ac_cv_ps_format="%*s %d %*s %d %*s %*s %*s %*s %*s %s %*s %*s %n%s" |
773 | AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS glaxen",[]) | 809 | ac_cv_vsz_command="$PATH_TO_PS glaxen" |
774 | AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %d",[]) | 810 | ac_cv_vsz_format="%*s %*s %*s %*s %*s %*s %d" |
775 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS glaxen",[]) | 811 | ac_cv_rss_command="$PATH_TO_PS glaxen" |
776 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d",[]) | 812 | ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %d" |
777 | echo " ps syntax... $PATH_TO_PS glaxen" | 813 | echo " ps syntax... $PATH_TO_PS glaxen" |
814 | |||
778 | dnl MacOSX / Darwin | 815 | dnl MacOSX / Darwin |
779 | dnl TODO: MacOSX has commands with spaces which will cause problems to PS_FORMAT | 816 | dnl TODO: MacOSX has commands with spaces which will cause problems to PS_FORMAT |
780 | dnl STAT VSZ RSS UID USER PPID UCOMM COMMAND | 817 | dnl STAT VSZ RSS UID USER PPID UCOMM COMMAND |
781 | dnl Ss 1308 272 0 root 0 init /sbin/init | 818 | dnl Ss 1308 272 0 root 0 init /sbin/init |
782 | 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 | 819 | elif ps waxo 'state vsz rss uid user ppid ucomm command' 2>/dev/null | \ |
820 | egrep -i ["^STAT +VSZ +RSS +UID +USER +PPID +UCOMM +COMMAND"] >/dev/null | ||
783 | then | 821 | then |
784 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) | 822 | ac_cv_use_ps_vars=yes |
785 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[]) | 823 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]" |
786 | AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command'",[]) | 824 | ac_cv_ps_raw_command="$PATH_TO_PS waxo 'state uid ppid command'" |
825 | ac_cv_ps_command="$PATH_TO_PS waxo 'state uid ppid ucomm command'" | ||
826 | ac_cv_ps_format="%s %d %d %s %n" | ||
827 | ac_cv_vsz_command="$PATH_TO_PS waxco 'vsz command'" | ||
828 | ac_cv_vsz_format="%d %s" | ||
829 | ac_cv_rss_command="$PATH_TO_PS waxco 'rss command'" | ||
830 | ac_cv_rss_format="%d %s" | ||
787 | EXTRAS="$EXTRAS check_nagios" | 831 | EXTRAS="$EXTRAS check_nagios" |
788 | AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxo 'state uid ppid ucomm command'",[]) | ||
789 | AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n",[Format string for scanning ps output in check_procs]) | ||
790 | AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxco 'vsz command'",[]) | ||
791 | AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[]) | ||
792 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxco 'rss command'",[]) | ||
793 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) | ||
794 | echo " ps syntax... $PATH_TO_PS waxo 'state vsz rss command'" | 832 | echo " ps syntax... $PATH_TO_PS waxo 'state vsz rss command'" |
833 | |||
795 | dnl UnixWare | 834 | dnl UnixWare |
796 | 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 | 835 | elif ps -Al 2>/dev/null | egrep -i ["^ *F +S +UID +PID +PPID +CLS +PRI \ |
836 | +NI +C +ADDR +SZ +WCHAN +TTY +TIME +COMD"] >/dev/null | ||
797 | then | 837 | then |
798 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) | 838 | ac_cv_use_ps_vars=yes |
799 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog],[]) | 839 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,&pos,procprog]" |
800 | AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -Al",[]) | 840 | ac_cv_ps_command="$PATH_TO_PS -Al" |
801 | AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s",[Format string for scanning ps output in check_procs]) | 841 | ac_cv_ps_format="%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s" |
802 | if ps -Ao 'vsz comm' 2>/dev/null | egrep -i ["^ *VSZ +COMMAND"] >/dev/null | 842 | if ps -Ao 'vsz comm' 2>/dev/null | \ |
843 | egrep -i ["^ *VSZ +COMMAND"] >/dev/null | ||
803 | then | 844 | then |
804 | AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -Ao 'vsz comm'",[]) | 845 | ac_cv_vsz_command="$PATH_TO_PS -Ao 'vsz comm'" |
805 | AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %d",[]) | 846 | ac_cv_vsz_format="%*s %d" |
806 | fi | 847 | fi |
807 | echo " ps syntax... $PATH_TO_PS -Al" | 848 | echo " ps syntax... $PATH_TO_PS -Al" |
849 | |||
808 | else | 850 | else |
809 | echo "** Unable to find usable ps syntax" | 851 | AC_MSG_WARN([unable to find usable ps syntax]) |
852 | fi | ||
853 | |||
854 | if test "x$ac_cv_use_ps_vars" != "xno" | ||
855 | then | ||
856 | AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf]) | ||
810 | fi | 857 | fi |
858 | AC_DEFINE_UNQUOTED(PS_VARLIST,$ac_cv_ps_varlist, | ||
859 | [Variable list for sscanf of 'ps' output]) | ||
860 | AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,$ac_cv_ps_raw_command, | ||
861 | [Verbatim command to execute for ps in check_netsaint]) | ||
862 | AC_DEFINE_UNQUOTED(PS_COMMAND,$ac_cv_ps_command, | ||
863 | [Verbatim command to execute for ps in check_procs]) | ||
864 | AC_DEFINE_UNQUOTED(PS_FORMAT,$ac_cv_ps_format, | ||
865 | [Format string for scanning ps output in check_procs]) | ||
866 | AC_DEFINE_UNQUOTED(VSZ_COMMAND,$ac_cv_vsz_command, | ||
867 | [Verbatim command to execute for ps in check_vsz]) | ||
868 | AC_DEFINE_UNQUOTED(VSZ_FORMAT,$ac_cv_vsz_format, | ||
869 | [Format string for scanning ps output in check_vsz]) | ||
870 | AC_DEFINE_UNQUOTED(RSS_COMMAND,$ac_cv_rss_command, | ||
871 | [Verbatim command to execute for ps in check_rss]) | ||
872 | AC_DEFINE_UNQUOTED(RSS_FORMAT,$ac_cv_rss_format, | ||
873 | [Format string for scanning ps output in check_rss]) | ||
811 | 874 | ||
812 | dnl AC_ARG_WITH(df_command,--with-df-command=<syntax>,sets syntax for df,DF_COMMAND=$withval) | ||
813 | AC_ARG_WITH(df_command, | 875 | AC_ARG_WITH(df_command, |
814 | ACX_HELP_STRING([--with-df-command=SYNTAX], | 876 | ACX_HELP_STRING([--with-df-command=SYNTAX], |
815 | [sets syntax for df]), | 877 | [sets syntax for df]), |
@@ -817,89 +879,128 @@ AC_ARG_WITH(df_command, | |||
817 | if test -n "$DF_COMMAND" | 879 | if test -n "$DF_COMMAND" |
818 | then | 880 | then |
819 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$DF_COMMAND",[path and args for df command]) | 881 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$DF_COMMAND",[path and args for df command]) |
882 | |||
820 | elif df -Pk 2>/dev/null | egrep -i ["^(/dev/|[a-zA-Z]:)[a-z0-9/\\]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/\\]*"] >/dev/null | 883 | elif df -Pk 2>/dev/null | egrep -i ["^(/dev/|[a-zA-Z]:)[a-z0-9/\\]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/\\]*"] >/dev/null |
821 | then | 884 | then |
822 | AC_PATH_PROG(PATH_TO_DF,df) | 885 | AC_PATH_PROG(PATH_TO_DF,df) |
823 | AC_MSG_RESULT([ df syntax... $PATH_TO_DF -Pk]) | 886 | AC_MSG_RESULT([ df syntax... $PATH_TO_DF -Pk]) |
824 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF -Pk",[path and args for df command]) | 887 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF -Pk",[path and args for df command]) |
888 | |||
825 | elif df -k 2>/dev/null | egrep -i ["^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*"] >/dev/null | 889 | elif df -k 2>/dev/null | egrep -i ["^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*"] >/dev/null |
826 | then | 890 | then |
827 | AC_PATH_PROG(PATH_TO_DF,df) | 891 | AC_PATH_PROG(PATH_TO_DF,df) |
828 | AC_MSG_RESULT([ df syntax... $PATH_TO_DF -k]) | 892 | AC_MSG_RESULT([ df syntax... $PATH_TO_DF -k]) |
829 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF -k",[path and args for df command]) | 893 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF -k",[path and args for df command]) |
894 | |||
830 | elif df 2>/dev/null | egrep -i ["^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*"] >/dev/null | 895 | elif df 2>/dev/null | egrep -i ["^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*"] >/dev/null |
831 | then | 896 | then |
832 | AC_PATH_PROG(PATH_TO_DF,df) | 897 | AC_PATH_PROG(PATH_TO_DF,df) |
833 | AC_MSG_RESULT([ df syntax... $PATH_TO_DF]) | 898 | AC_MSG_RESULT([ df syntax... $PATH_TO_DF]) |
834 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF",[path and args for df command]) | 899 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF",[path and args for df command]) |
900 | |||
835 | elif bdf 2>/dev/null | egrep -i ["^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*"] >/dev/null | 901 | elif bdf 2>/dev/null | egrep -i ["^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*"] >/dev/null |
836 | then | 902 | then |
837 | AC_PATH_PROG(PATH_TO_DF,bdf) | 903 | AC_PATH_PROG(PATH_TO_DF,bdf) |
838 | AC_MSG_RESULT([ df syntax... $PATH_TO_DF]) | 904 | AC_MSG_RESULT([ df syntax... $PATH_TO_DF]) |
839 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF",[path and args for df command]) | 905 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF",[path and args for df command]) |
906 | |||
840 | else | 907 | else |
841 | AC_MSG_WARN("unable to find usable df syntax") | 908 | AC_MSG_WARN([unable to find usable df syntax]) |
842 | fi | 909 | fi |
843 | 910 | ||
844 | AC_PATH_PROG(PATH_TO_PING,ping) | 911 | AC_PATH_PROG(PATH_TO_PING,ping) |
912 | AC_PATH_PROG(PATH_TO_PING6,ping6) | ||
845 | 913 | ||
846 | dnl AC_ARG_WITH(ping_command,--with-ping-command=<syntax> sets syntax for ping,PING_COMMAND=$withval) | ||
847 | AC_ARG_WITH(ping_command, | 914 | AC_ARG_WITH(ping_command, |
848 | ACX_HELP_STRING([--with-ping-command=SYNTAX], | 915 | ACX_HELP_STRING([--with-ping-command=SYNTAX], |
849 | [sets syntax for ping]), | 916 | [sets syntax for ICMP ping]), |
850 | PING_COMMAND=$withval,) | 917 | ac_cv_ping_command=$withval,) |
851 | if test -n "$PING_COMMAND" | 918 | |
919 | if test -n "$ac_cv_ping_command" | ||
852 | then | 920 | then |
853 | echo " ping syntax... (command-line) $PING_COMMAND" | 921 | echo " ping syntax... (command-line) $ac_cv_ping_command" |
854 | if test -n "$PING_PACKETS_FIRST" | 922 | if test -n "$PING_PACKETS_FIRST" |
855 | then | 923 | then |
856 | AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host]) | 924 | AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$ac_cv_ping_command", |
925 | [Define if packet count must precede host]) | ||
857 | fi | 926 | fi |
858 | elif [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && ping -n -s 127.0.0.1 56 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null | 927 | |
928 | elif [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \ | ||
929 | $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \ | ||
930 | egrep -i "^round-trip|^rtt" >/dev/null | ||
859 | then | 931 | then |
860 | PING_COMMAND="$PATH_TO_PING -n -U -c %d %s" | 932 | ac_cv_ping_command="$PATH_TO_PING -n -U -c %d %s" |
861 | AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host]) | 933 | dnl AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$ac_cv_ping_command", |
862 | echo " ping syntax... $PATH_TO_PING -n -U -c <count> <host>" | 934 | dnl [Define if packet count must precede host]) |
863 | elif ping -n -U -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null | 935 | echo " ping syntax... ping -n -U -c <count> <host>" |
936 | |||
937 | elif $PATH_TO_PING -n -U -c 1 127.0.0.1 2>/dev/null | \ | ||
938 | egrep -i "^round-trip|^rtt" >/dev/null | ||
864 | then | 939 | then |
865 | PING_COMMAND="$PATH_TO_PING -n -U -c %d %s" | 940 | ac_cv_ping_command="$PATH_TO_PING -n -U -c %d %s" |
866 | AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host]) | 941 | dnl AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$ac_cv_ping_command", |
867 | echo " ping syntax... $PATH_TO_PING -n -U -c <count> <host>" | 942 | dnl [Define if packet count must precede host]) |
868 | elif ping -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null | 943 | echo " ping syntax... ping -n -U -c <count> <host>" |
944 | |||
945 | elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \ | ||
946 | egrep -i "^round-trip|^rtt" >/dev/null | ||
869 | then | 947 | then |
870 | PING_COMMAND="$PATH_TO_PING -n -c %d %s" | 948 | ac_cv_ping_command="$PATH_TO_PING -n -c %d %s" |
871 | AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host]) | 949 | dnl AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$ac_cv_ping_command", |
950 | dnl [Define if packet count must precede host]) | ||
872 | echo " ping syntax... $PATH_TO_PING -n -c <count> <host>" | 951 | echo " ping syntax... $PATH_TO_PING -n -c <count> <host>" |
873 | elif ping -n 127.0.0.1 -c 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null | 952 | |
953 | elif $PATH_TO_PING -n 127.0.0.1 -c 1 2>/dev/null | \ | ||
954 | egrep -i "^round-trip|^rtt" >/dev/null | ||
874 | then | 955 | then |
875 | PING_COMMAND="$PATH_TO_PING -n %s -c %d" | 956 | ac_cv_ping_command="$PATH_TO_PING -n %s -c %d" |
876 | echo " ping syntax... $PATH_TO_PING -n <host> -c <count>" | 957 | echo " ping syntax... $PATH_TO_PING -n <host> -c <count>" |
877 | elif ping 127.0.0.1 -n 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null | 958 | |
959 | elif $PATH_TO_PING 127.0.0.1 -n 1 2>/dev/null | \ | ||
960 | egrep -i "^round-trip|^rtt" >/dev/null | ||
878 | then | 961 | then |
879 | PING_COMMAND="$PATH_TO_PING %s -n %d" | 962 | ac_cv_ping_command="$PATH_TO_PING %s -n %d" |
880 | echo " ping syntax... $PATH_TO_PING <host> -n <count>" | 963 | echo " ping syntax... $PATH_TO_PING <host> -n <count>" |
881 | elif ping -n -s 127.0.0.1 56 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null | 964 | |
965 | elif $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \ | ||
966 | egrep -i "^round-trip|^rtt" >/dev/null | ||
882 | then | 967 | then |
883 | PING_COMMAND="$PATH_TO_PING -n -s %s 56 %d" | 968 | ac_cv_ping_command="$PATH_TO_PING -n -s %s 56 %d" |
884 | echo " ping syntax... $PATH_TO_PING -n -s <host> 56 <count>" | 969 | echo " ping syntax... $PATH_TO_PING -n -s <host> 56 <count>" |
885 | elif ping -n -h 127.0.0.1 -s 56 -c 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null | 970 | |
971 | elif $PATH_TO_PING -n -h 127.0.0.1 -s 56 -c 1 2>/dev/null | \ | ||
972 | egrep -i "^round-trip|^rtt" >/dev/null | ||
886 | then | 973 | then |
887 | PING_COMMAND="$PATH_TO_PING -n -h %s -s 56 -c %d" | 974 | ac_cv_ping_command="$PATH_TO_PING -n -h %s -s 56 -c %d" |
888 | echo " ping syntax... $PATH_TO_PING -n -h <host> -s 56 -c <count>" | 975 | echo " ping syntax... $PATH_TO_PING -n -h <host> -s 56 -c <count>" |
889 | elif ping -n -s 56 -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null | 976 | |
977 | elif $PATH_TO_PING -n -s 56 -c 1 127.0.0.1 2>/dev/null | \ | ||
978 | egrep -i "^round-trip|^rtt" >/dev/null | ||
890 | then | 979 | then |
891 | PING_COMMAND="$PATH_TO_PING -n -s 56 -c %d %s" | 980 | ac_cv_ping_command="$PATH_TO_PING -n -s 56 -c %d %s" |
892 | AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host]) | 981 | dnl AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$ac_cv_ping_command", |
982 | dnl [Define if packet count must precede host]) | ||
893 | echo " ping syntax... $PATH_TO_PING -n -s 56 -c <count> <host>" | 983 | echo " ping syntax... $PATH_TO_PING -n -s 56 -c <count> <host>" |
894 | elif ping -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null | 984 | |
985 | elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \ | ||
986 | egrep -i "^round-trip|^rtt" >/dev/null | ||
895 | then | 987 | then |
896 | PING_COMMAND="$PATH_TO_PING -n -c %d %s" | 988 | ac_cv_ping_command="$PATH_TO_PING -n -c %d %s" |
897 | AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host]) | 989 | dnl AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$ac_cv_ping_command", |
990 | dnl [Define if packet count must precede host]) | ||
898 | echo " ping syntax... $PATH_TO_PING -n -c <count> <host>" | 991 | echo " ping syntax... $PATH_TO_PING -n -c <count> <host>" |
992 | |||
899 | else | 993 | else |
900 | AC_MSG_WARN("unable to find usable ping syntax") | 994 | AC_MSG_WARN([unable to find usable ping syntax]) |
901 | fi | 995 | fi |
902 | AC_DEFINE_UNQUOTED(PING_COMMAND,"$PING_COMMAND",[path and args for ping command]) | 996 | |
997 | AC_DEFINE_UNQUOTED(PING_COMMAND,"$ac_cv_ping_command", | ||
998 | [path and args for ICMP ping command]) | ||
999 | |||
1000 | AC_ARG_WITH(ping6_command, | ||
1001 | ACX_HELP_STRING([--with-ping6-command=SYNTAX], | ||
1002 | [sets syntax for ICMPv6 ping]), | ||
1003 | PING6_COMMAND=$withval,) | ||
903 | 1004 | ||
904 | AC_PATH_PROG(PATH_TO_NSLOOKUP,nslookup) | 1005 | AC_PATH_PROG(PATH_TO_NSLOOKUP,nslookup) |
905 | if test -n "$ac_cv_path_PATH_TO_NSLOOKUP" | 1006 | if test -n "$ac_cv_path_PATH_TO_NSLOOKUP" |
@@ -929,6 +1030,7 @@ AC_DEFINE_UNQUOTED(PATH_TO_UPTIME,"$PATH_TO_UPTIME",[path to uptime binary]) | |||
929 | AC_PATH_PROG(PATH_TO_RPCINFO,rpcinfo) | 1030 | AC_PATH_PROG(PATH_TO_RPCINFO,rpcinfo) |
930 | AC_DEFINE_UNQUOTED(PATH_TO_RPCINFO,"$PATH_TO_RPCINFO",[path to rpcinfo binary]) | 1031 | AC_DEFINE_UNQUOTED(PATH_TO_RPCINFO,"$PATH_TO_RPCINFO",[path to rpcinfo binary]) |
931 | 1032 | ||
1033 | M | ||
932 | AC_PATH_PROG(PATH_TO_NTPDATE,ntpdate) | 1034 | AC_PATH_PROG(PATH_TO_NTPDATE,ntpdate) |
933 | AC_PATH_PROGS(PATH_TO_NTPDC,ntpdc xntpdc) | 1035 | AC_PATH_PROGS(PATH_TO_NTPDC,ntpdc xntpdc) |
934 | AC_PATH_PROGS(PATH_TO_NTPQ,ntpq) | 1036 | AC_PATH_PROGS(PATH_TO_NTPQ,ntpq) |
@@ -937,7 +1039,8 @@ then | |||
937 | AC_DEFINE_UNQUOTED(PATH_TO_NTPQ,"$PATH_TO_NTPQ",[path to ntpq binary]) | 1039 | AC_DEFINE_UNQUOTED(PATH_TO_NTPQ,"$PATH_TO_NTPQ",[path to ntpq binary]) |
938 | AC_DEFINE_UNQUOTED(PATH_TO_NTPDATE,"$PATH_TO_NTPDATE",[path to ntpdate binary]) | 1040 | AC_DEFINE_UNQUOTED(PATH_TO_NTPDATE,"$PATH_TO_NTPDATE",[path to ntpdate binary]) |
939 | else | 1041 | else |
940 | echo "** Install NTP programs (http://www.ntp.org) if you want to monitor time synchronization" | 1042 | dnl echo "** Install NTP programs (http://www.ntp.org) if you want to monitor time synchronization" |
1043 | AC_MSG_WARN([Install NTP programs (http://www.ntp.org) if you want to monitor time synchronization]) | ||
941 | fi | 1044 | fi |
942 | 1045 | ||
943 | AC_PATH_PROG(PATH_TO_LMSTAT,lmstat) | 1046 | AC_PATH_PROG(PATH_TO_LMSTAT,lmstat) |
@@ -945,7 +1048,8 @@ if test -x "$PATH_TO_LMSTAT" | |||
945 | then | 1048 | then |
946 | AC_DEFINE_UNQUOTED(PATH_TO_LMSTAT,"$PATH_TO_LMSTAT",[path to lmstat]) | 1049 | AC_DEFINE_UNQUOTED(PATH_TO_LMSTAT,"$PATH_TO_LMSTAT",[path to lmstat]) |
947 | else | 1050 | else |
948 | echo "** Get lmstat from Globetrotter Software to monitor flexlm licenses" | 1051 | dnl echo "** Get lmstat from Globetrotter Software to monitor flexlm licenses" |
1052 | AC_MSG_WARN([Get lmstat from Globetrotter Software to monitor flexlm licenses]) | ||
949 | fi | 1053 | fi |
950 | 1054 | ||
951 | AC_PATH_PROG(PATH_TO_SMBCLIENT,smbclient) | 1055 | AC_PATH_PROG(PATH_TO_SMBCLIENT,smbclient) |
@@ -953,7 +1057,8 @@ if test -x "$PATH_TO_SMBCLIENT" | |||
953 | then | 1057 | then |
954 | AC_DEFINE_UNQUOTED(PATH_TO_SMBCLIENT,"$PATH_TO_SMBCLIENT",[path to smbclient binary]) | 1058 | AC_DEFINE_UNQUOTED(PATH_TO_SMBCLIENT,"$PATH_TO_SMBCLIENT",[path to smbclient binary]) |
955 | else | 1059 | else |
956 | echo "** Get smbclient from Samba.org to monitor SMB shares" | 1060 | dnl echo "** Get smbclient from Samba.org to monitor SMB shares" |
1061 | AC_MSG_WARN([Get smbclient from Samba.org to monitor SMB shares]) | ||
957 | fi | 1062 | fi |
958 | 1063 | ||
959 | 1064 | ||
@@ -971,7 +1076,8 @@ then | |||
971 | AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET",[path to snmpget binary]) | 1076 | AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET",[path to snmpget binary]) |
972 | EXTRAS="$EXTRAS check_hpjd check_snmp" | 1077 | EXTRAS="$EXTRAS check_hpjd check_snmp" |
973 | else | 1078 | else |
974 | echo "** Get snmpget from http://net-snmp.sourceforge.net to make check_hpjd and check_snmp plugins" | 1079 | dnl echo "** Get snmpget from http://net-snmp.sourceforge.net to make check_hpjd and check_snmp plugins" |
1080 | AC_MSG_WARN([Get snmpget from http://net-snmp.sourceforge.net to make check_hpjd and check_snmp plugins]) | ||
975 | fi | 1081 | fi |
976 | 1082 | ||
977 | AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext) | 1083 | AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext) |
@@ -984,8 +1090,9 @@ if ( $PERL -M"Net::SNMP 3.6" -e 'exit' 2>/dev/null ) | |||
984 | then | 1090 | then |
985 | echo "Found Net::SNMP perl module" | 1091 | echo "Found Net::SNMP perl module" |
986 | else | 1092 | else |
987 | echo "** Tried $PERL - install Net::SNMP perl module if you want to" | 1093 | dnl echo "** Tried $PERL - install Net::SNMP perl module if you want to" |
988 | echo " use the perl snmp plugins" | 1094 | dnl echo " use the perl snmp plugins" |
1095 | AC_MSG_WARN([Tried $PERL - install Net::SNMP perl module if you want to use the perl snmp plugins]) | ||
989 | fi | 1096 | fi |
990 | 1097 | ||
991 | AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat) | 1098 | AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat) |
@@ -999,7 +1106,8 @@ then | |||
999 | AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$PATH_TO_QSTAT",[path to qstat/quakestat]) | 1106 | AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$PATH_TO_QSTAT",[path to qstat/quakestat]) |
1000 | EXTRAS="$EXTRAS check_game" | 1107 | EXTRAS="$EXTRAS check_game" |
1001 | else | 1108 | else |
1002 | echo "** Get qstat from http://www.activesw.com/people/steve/qstat.html in order to make check_game plugin" | 1109 | dnl echo "** Get qstat from http://www.activesw.com/people/steve/qstat.html in order to make check_game plugin" |
1110 | AC_MSG_WARN([Get qstat from http://www.activesw.com/people/steve/qstat.html in order to make check_game plugin]) | ||
1003 | fi | 1111 | fi |
1004 | 1112 | ||
1005 | AC_PATH_PROG(PATH_TO_FPING,fping) | 1113 | AC_PATH_PROG(PATH_TO_FPING,fping) |
@@ -1008,7 +1116,8 @@ then | |||
1008 | AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING",[path to fping]) | 1116 | AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING",[path to fping]) |
1009 | EXTRAS="$EXTRAS check_fping" | 1117 | EXTRAS="$EXTRAS check_fping" |
1010 | else | 1118 | else |
1011 | echo "** Get fping from http://www.fping.com in order to make check_fping plugin" | 1119 | dnl echo "** Get fping from http://www.fping.com in order to make check_fping plugin" |
1120 | AC_MSG_WARN([Get fping from http://www.fping.com in order to make check_fping plugin]) | ||
1012 | fi | 1121 | fi |
1013 | 1122 | ||
1014 | AC_PATH_PROG(PATH_TO_SSH,ssh) | 1123 | AC_PATH_PROG(PATH_TO_SSH,ssh) |
@@ -1017,7 +1126,8 @@ then | |||
1017 | AC_DEFINE_UNQUOTED(SSH_COMMAND,"$PATH_TO_SSH",[path to ssh binary]) | 1126 | AC_DEFINE_UNQUOTED(SSH_COMMAND,"$PATH_TO_SSH",[path to ssh binary]) |
1018 | EXTRAS="$EXTRAS check_by_ssh" | 1127 | EXTRAS="$EXTRAS check_by_ssh" |
1019 | else | 1128 | else |
1020 | echo "** Get ssh in order to make check_by_ssh plugin" | 1129 | dnl echo "** Get ssh in order to make check_by_ssh plugin" |
1130 | AC_MSG_WARN([Get ssh in order to make check_by_ssh plugin]) | ||
1021 | fi | 1131 | fi |
1022 | 1132 | ||
1023 | 1133 | ||
@@ -1026,7 +1136,8 @@ if test -x "$PATH_TO_MAILQ" | |||
1026 | then | 1136 | then |
1027 | AC_DEFINE_UNQUOTED(PATH_TO_MAILQ,"$PATH_TO_MAILQ",[path to mailq]) | 1137 | AC_DEFINE_UNQUOTED(PATH_TO_MAILQ,"$PATH_TO_MAILQ",[path to mailq]) |
1028 | else | 1138 | else |
1029 | echo "** Could not find mailq or eqivalent" | 1139 | dnl echo "** Could not find mailq or eqivalent" |
1140 | AC_MSG_WARN([Could not find mailq or eqivalent]) | ||
1030 | fi | 1141 | fi |
1031 | 1142 | ||
1032 | dnl SWAP info required is amount allocated/available and amount free | 1143 | dnl SWAP info required is amount allocated/available and amount free |