summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--acconfig.h47
-rw-r--r--configure.in575
2 files changed, 343 insertions, 279 deletions
diff --git a/acconfig.h b/acconfig.h
index f2fe07b..0269807 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -1,54 +1,7 @@
1#undef CGIURL
2#undef COMPILER_SUPPORTS_LL
3#undef DF_COMMAND
4#undef HAVE_ASPRINTF
5#undef HAVE_C99_VSNPRINTF
6#undef HAVE_GETOPT_H
7#undef HAVE_GETOPT_LONG
8#undef HAVE_GETTIMEOFDAY
9#undef HAVE_LONGLONG
10#undef HAVE_PROC_LOADAVG
11#undef HAVE_PROC_MEMINFO
12#undef HAVE_SSL
13#undef HAVE_SNPRINTF
14#undef HAVE_SWAP
15#undef HAVE_VA_COPY
16#undef HAVE_VASPRINTF
17#undef HAVE_VSNPRINTF
18#undef NEED_GETTIMEOFDAY
19#undef NSLOOKUP_COMMAND
20#undef HOST_COMMAND
21#undef PACKAGE_VERSION
22#undef PATH_TO_DIG
23#undef PATH_TO_FPING
24#undef PATH_TO_QSTAT
25#undef PATH_TO_SNMPGET
26#undef PATH_TO_SNMPGETNEXT
27#undef PATH_TO_UPTIME
28#undef PATH_TO_RPCINFO
29#undef PATH_TO_NTPDATE
30#undef PATH_TO_NTPDC
31#undef PATH_TO_LMSTAT
32#undef PATH_TO_SMBCLIENT
33#undef PATH_TO_MAILQ
34#undef PING_COMMAND
35#undef PING_PACKETS_FIRST
36#undef POSIX_STATE_DEFS
37#undef PROC_LOADAVG
38#undef PROC_MEMINFO
39#undef PS_COMMAND 1#undef PS_COMMAND
40#undef PS_FORMAT
41#undef PS_RAW_COMMAND 2#undef PS_RAW_COMMAND
42#undef PS_VARLIST 3#undef PS_VARLIST
43#undef RSS_COMMAND 4#undef RSS_COMMAND
44#undef RSS_FORMAT 5#undef RSS_FORMAT
45#undef SOCKET_SIZE_TYPE
46#undef SSH_COMMAND
47#undef SWAP_COMMAND
48#undef SWAP_FORMAT
49#undef USE_PS_VARS
50#undef VSZ_COMMAND 6#undef VSZ_COMMAND
51#undef VSZ_FORMAT 7#undef VSZ_FORMAT
52#undef WHO_COMMAND
53#undef PACKAGE
54#undef VERSION
diff --git a/configure.in b/configure.in
index 029b583..5596e2d 100644
--- a/configure.in
+++ b/configure.in
@@ -53,7 +53,6 @@ SUPPORT="Send email to nagios-users@lists.sourceforge.net if you have questions\
53AC_SUBST(SUPPORT) 53AC_SUBST(SUPPORT)
54 54
55dnl CGIURL has changed for Nagios with 1.0 beta 55dnl CGIURL has changed for Nagios with 1.0 beta
56dnl AC_ARG_WITH(cgiurl,--with-cgiurl=<dir> sets URL for cgi programs,cgiurl=$withval,cgiurl=/nagios/cgi-bin)
57AC_ARG_WITH(cgiurl, 56AC_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,
62CGIURL="$cgiurl" 61CGIURL="$cgiurl"
63AC_DEFINE_UNQUOTED(CGIURL,"$CGIURL",[URL of CGI programs]) 62AC_DEFINE_UNQUOTED(CGIURL,"$CGIURL",[URL of CGI programs])
64 63
65dnl AC_ARG_WITH(nagios_user,--with-nagios-user=<user> sets user name to run nagios,nagios_usr=$withval,nagios_usr=nagios)
66AC_ARG_WITH(nagios_user, 64AC_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)
71dnl AC_ARG_WITH(nagios_group,--with-nagios-group=<group> sets group name to run nagios,nagios_grp=$withval,nagios_grp=nagios)
72AC_ARG_WITH(nagios_group, 69AC_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)
79INSTALL_OPTS="-o $nagios_usr -g $nagios_grp" 76INSTALL_OPTS="-o $nagios_usr -g $nagios_grp"
80AC_SUBST(INSTALL_OPTS) 77AC_SUBST(INSTALL_OPTS)
81 78
82dnl 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)
83AC_ARG_WITH(trusted_path, 79AC_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)
131dnl Check for PostgreSQL libraries 127dnl Check for PostgreSQL libraries
132_SAVEDLIBS="$LIBS" 128_SAVEDLIBS="$LIBS"
133_SAVEDCPPFLAGS="$CPPFLAGS" 129_SAVEDCPPFLAGS="$CPPFLAGS"
134dnl AC_ARG_WITH(pgsql,--with-pgsql=<dir> sets path to pgsql installation,[PGSQL=$withval])
135AC_ARG_WITH(pgsql, 130AC_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"
212dnl Check for mysql libraries 207dnl Check for mysql libraries
213_SAVEDLIBS="$LIBS" 208_SAVEDLIBS="$LIBS"
214_SAVEDCPPFLAGS="$CPPFLAGS" 209_SAVEDCPPFLAGS="$CPPFLAGS"
215dnl AC_ARG_WITH(mysql,--with-mysql=<dir> sets path to mysql installation (assumes lib/mysql and include subdirs),[MYSQL=$withval])
216AC_ARG_WITH(mysql, 210AC_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
270elif test "$OPENSSL" = "/usr/local/ssl/bin/openssl"; then 264elif test "$OPENSSL" = "/usr/local/ssl/bin/openssl"; then
271 OPENSSL=/usr/local/ssl 265 OPENSSL=/usr/local/ssl
272fi 266fi
273dnl AC_ARG_WITH(openssl,--with-openssl=<dir> sets path to openssl installation,[OPENSSL=$withval])
274AC_ARG_WITH(openssl, 267AC_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])
555fi 548fi
556 549
550dnl #### Process table test
551
557AC_PATH_PROG(PATH_TO_PS,ps) 552AC_PATH_PROG(PATH_TO_PS,ps)
553ac_cv_use_ps_vars=no
554
558dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND 555dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND
559if 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 556if 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
560then 559then
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'"
572dnl FreeBSD 572dnl FreeBSD
573elif ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i ["^STAT +COMMAND +VSZ +RSS +UID +USER +PPID"] >/dev/null 573elif ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | \
574 egrep -i ["^STAT +COMMAND +VSZ +RSS +UID +USER +PPID"] >/dev/null
574then 575then
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
586dnl BSD-like mode in RH 6.1 588dnl BSD-like mode in RH 6.1
587elif 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 589elif 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
588then 592then
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
600dnl SunOS 4.1.3: 605dnl SunOS 4.1.3:
601dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND 606dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND
602dnl 607elif ps -laxnwww 2>/dev/null | egrep -i ["^ *F(LAGS)? +UID +PID +PPID \
603elif 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
604then 610then
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
616dnl Debian Linux / procps v1.2.9: 623dnl Debian Linux / procps v1.2.9:
617dnl FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND 624dnl FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND
618dnl 100 0 1 0 0 0 776 76 c0131c8c S ffff 0:11 init [2] 625dnl 100 0 1 0 0 0 776 76 c0131c8c S ffff 0:11 init [2]
619dnl 626dnl
620elif ps laxnwww 2>/dev/null | egrep -i ["^ *F(LAGS)? +UID +PID +PPID +PRI +NI +(VSZ)|(SIZE) +RSS +WCHAN +STAT? TTY +TIME +COMMAND"] >/dev/null 627elif 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
621then 629then
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
633dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs) 642dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs)
634elif 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 643elif 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
635then 646then
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'"
647dnl AIX 4.3.3 - needs verification. This works for Tru64 - needs %*[ +] in PS_FORMAT 659dnl AIX 4.3.3 - needs verification. This works for Tru64 - needs %*[ +] in PS_FORMAT
648elif 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 660elif 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
649then 663then
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'",[]) 676elif 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'"
661elif 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
662then 679then
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'"
674elif 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
692elif 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
675then 695then
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'"
687elif 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
708elif 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
688then 711then
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'"
700elif 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
724elif 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
701then 727then
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
713dnl wonder who takes state instead of stat 740dnl wonder who takes state instead of stat
714elif 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 741elif 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
715then 744then
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
727dnl IRIX 53 757dnl IRIX 53
728elif ps -el 2>/dev/null | egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null 758elif 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
729then 760then
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
739dnl IRIX 63 771dnl IRIX 63
740elif 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 772elif 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
741then 774then
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"
751dnl 784
752dnl AIX 4.1: 785dnl AIX 4.1:
753dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME CMD 786dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME CMD
754dnl 303 A 0 0 0 120 16 -- 1c07 20 24 - 0:45 swapper 787dnl 303 A 0 0 0 120 16 -- 1c07 20 24 - 0:45 swapper
755elif ps -el 2>/dev/null | egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +ADDR +SZ +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null 788elif ps -el 2>/dev/null | egrep -i ["^ *F +S +UID +PID +PPID +C +PRI \
789 +NI +ADDR +SZ +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null
756then 790then
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
766dnl AIX? 801dnl AIX?
767elif ps glaxen 2>/dev/null | egrep -i ["^ *F +UID +PID +PPID +PRI +NI +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND"] >/dev/null 802elif ps glaxen 2>/dev/null | egrep -i ["^ *F +UID +PID +PPID +PRI +NI \
803 +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND"] >/dev/null
768then 804then
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
778dnl MacOSX / Darwin 815dnl MacOSX / Darwin
779dnl TODO: MacOSX has commands with spaces which will cause problems to PS_FORMAT 816dnl TODO: MacOSX has commands with spaces which will cause problems to PS_FORMAT
780dnl STAT VSZ RSS UID USER PPID UCOMM COMMAND 817dnl STAT VSZ RSS UID USER PPID UCOMM COMMAND
781dnl Ss 1308 272 0 root 0 init /sbin/init 818dnl Ss 1308 272 0 root 0 init /sbin/init
782elif 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 819elif 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
783then 821then
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
795dnl UnixWare 834dnl UnixWare
796elif ps -Al 2>/dev/null | egrep -i ["^ *F +S +UID +PID +PPID +CLS +PRI +NI +C +ADDR +SZ +WCHAN +TTY +TIME +COMD"] >/dev/null 835elif 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
797then 837then
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
808else 850else
809 echo "** Unable to find usable ps syntax" 851 AC_MSG_WARN([unable to find usable ps syntax])
852fi
853
854if test "x$ac_cv_use_ps_vars" != "xno"
855then
856 AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf])
810fi 857fi
858AC_DEFINE_UNQUOTED(PS_VARLIST,$ac_cv_ps_varlist,
859 [Variable list for sscanf of 'ps' output])
860AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,$ac_cv_ps_raw_command,
861 [Verbatim command to execute for ps in check_netsaint])
862AC_DEFINE_UNQUOTED(PS_COMMAND,$ac_cv_ps_command,
863 [Verbatim command to execute for ps in check_procs])
864AC_DEFINE_UNQUOTED(PS_FORMAT,$ac_cv_ps_format,
865 [Format string for scanning ps output in check_procs])
866AC_DEFINE_UNQUOTED(VSZ_COMMAND,$ac_cv_vsz_command,
867 [Verbatim command to execute for ps in check_vsz])
868AC_DEFINE_UNQUOTED(VSZ_FORMAT,$ac_cv_vsz_format,
869 [Format string for scanning ps output in check_vsz])
870AC_DEFINE_UNQUOTED(RSS_COMMAND,$ac_cv_rss_command,
871 [Verbatim command to execute for ps in check_rss])
872AC_DEFINE_UNQUOTED(RSS_FORMAT,$ac_cv_rss_format,
873 [Format string for scanning ps output in check_rss])
811 874
812dnl AC_ARG_WITH(df_command,--with-df-command=<syntax>,sets syntax for df,DF_COMMAND=$withval)
813AC_ARG_WITH(df_command, 875AC_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,
817if test -n "$DF_COMMAND" 879if test -n "$DF_COMMAND"
818then 880then
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
820elif 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 883elif 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
821then 884then
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
825elif df -k 2>/dev/null | egrep -i ["^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*"] >/dev/null 889elif df -k 2>/dev/null | egrep -i ["^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*"] >/dev/null
826then 890then
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
830elif df 2>/dev/null | egrep -i ["^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*"] >/dev/null 895elif df 2>/dev/null | egrep -i ["^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*"] >/dev/null
831then 896then
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
835elif bdf 2>/dev/null | egrep -i ["^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*"] >/dev/null 901elif bdf 2>/dev/null | egrep -i ["^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*"] >/dev/null
836then 902then
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
840else 907else
841 AC_MSG_WARN("unable to find usable df syntax") 908 AC_MSG_WARN([unable to find usable df syntax])
842fi 909fi
843 910
844AC_PATH_PROG(PATH_TO_PING,ping) 911AC_PATH_PROG(PATH_TO_PING,ping)
912AC_PATH_PROG(PATH_TO_PING6,ping6)
845 913
846dnl AC_ARG_WITH(ping_command,--with-ping-command=<syntax> sets syntax for ping,PING_COMMAND=$withval)
847AC_ARG_WITH(ping_command, 914AC_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,)
851if test -n "$PING_COMMAND" 918
919if test -n "$ac_cv_ping_command"
852then 920then
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
858elif [[ "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
928elif [[ "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
859then 931then
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])
863elif 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
937elif $PATH_TO_PING -n -U -c 1 127.0.0.1 2>/dev/null | \
938 egrep -i "^round-trip|^rtt" >/dev/null
864then 939then
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])
868elif 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
945elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \
946 egrep -i "^round-trip|^rtt" >/dev/null
869then 947then
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>"
873elif ping -n 127.0.0.1 -c 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null 952
953elif $PATH_TO_PING -n 127.0.0.1 -c 1 2>/dev/null | \
954 egrep -i "^round-trip|^rtt" >/dev/null
874then 955then
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>"
877elif ping 127.0.0.1 -n 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null 958
959elif $PATH_TO_PING 127.0.0.1 -n 1 2>/dev/null | \
960 egrep -i "^round-trip|^rtt" >/dev/null
878then 961then
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>"
881elif ping -n -s 127.0.0.1 56 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null 964
965elif $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \
966 egrep -i "^round-trip|^rtt" >/dev/null
882then 967then
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>"
885elif ping -n -h 127.0.0.1 -s 56 -c 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null 970
971elif $PATH_TO_PING -n -h 127.0.0.1 -s 56 -c 1 2>/dev/null | \
972 egrep -i "^round-trip|^rtt" >/dev/null
886then 973then
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>"
889elif ping -n -s 56 -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null 976
977elif $PATH_TO_PING -n -s 56 -c 1 127.0.0.1 2>/dev/null | \
978 egrep -i "^round-trip|^rtt" >/dev/null
890then 979then
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>"
894elif ping -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null 984
985elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \
986 egrep -i "^round-trip|^rtt" >/dev/null
895then 987then
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
899else 993else
900 AC_MSG_WARN("unable to find usable ping syntax") 994 AC_MSG_WARN([unable to find usable ping syntax])
901fi 995fi
902AC_DEFINE_UNQUOTED(PING_COMMAND,"$PING_COMMAND",[path and args for ping command]) 996
997AC_DEFINE_UNQUOTED(PING_COMMAND,"$ac_cv_ping_command",
998 [path and args for ICMP ping command])
999
1000AC_ARG_WITH(ping6_command,
1001 ACX_HELP_STRING([--with-ping6-command=SYNTAX],
1002 [sets syntax for ICMPv6 ping]),
1003 PING6_COMMAND=$withval,)
903 1004
904AC_PATH_PROG(PATH_TO_NSLOOKUP,nslookup) 1005AC_PATH_PROG(PATH_TO_NSLOOKUP,nslookup)
905if test -n "$ac_cv_path_PATH_TO_NSLOOKUP" 1006if 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])
929AC_PATH_PROG(PATH_TO_RPCINFO,rpcinfo) 1030AC_PATH_PROG(PATH_TO_RPCINFO,rpcinfo)
930AC_DEFINE_UNQUOTED(PATH_TO_RPCINFO,"$PATH_TO_RPCINFO",[path to rpcinfo binary]) 1031AC_DEFINE_UNQUOTED(PATH_TO_RPCINFO,"$PATH_TO_RPCINFO",[path to rpcinfo binary])
931 1032
1033M
932AC_PATH_PROG(PATH_TO_NTPDATE,ntpdate) 1034AC_PATH_PROG(PATH_TO_NTPDATE,ntpdate)
933AC_PATH_PROGS(PATH_TO_NTPDC,ntpdc xntpdc) 1035AC_PATH_PROGS(PATH_TO_NTPDC,ntpdc xntpdc)
934AC_PATH_PROGS(PATH_TO_NTPQ,ntpq) 1036AC_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])
939else 1041else
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])
941fi 1044fi
942 1045
943AC_PATH_PROG(PATH_TO_LMSTAT,lmstat) 1046AC_PATH_PROG(PATH_TO_LMSTAT,lmstat)
@@ -945,7 +1048,8 @@ if test -x "$PATH_TO_LMSTAT"
945then 1048then
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])
947else 1050else
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])
949fi 1053fi
950 1054
951AC_PATH_PROG(PATH_TO_SMBCLIENT,smbclient) 1055AC_PATH_PROG(PATH_TO_SMBCLIENT,smbclient)
@@ -953,7 +1057,8 @@ if test -x "$PATH_TO_SMBCLIENT"
953then 1057then
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])
955else 1059else
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])
957fi 1062fi
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"
973else 1078else
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])
975fi 1081fi
976 1082
977AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext) 1083AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext)
@@ -984,8 +1090,9 @@ if ( $PERL -M"Net::SNMP 3.6" -e 'exit' 2>/dev/null )
984then 1090then
985 echo "Found Net::SNMP perl module" 1091 echo "Found Net::SNMP perl module"
986else 1092else
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])
989fi 1096fi
990 1097
991AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat) 1098AC_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"
1001else 1108else
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])
1003fi 1111fi
1004 1112
1005AC_PATH_PROG(PATH_TO_FPING,fping) 1113AC_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"
1010else 1118else
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])
1012fi 1121fi
1013 1122
1014AC_PATH_PROG(PATH_TO_SSH,ssh) 1123AC_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"
1019else 1128else
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])
1021fi 1131fi
1022 1132
1023 1133
@@ -1026,7 +1136,8 @@ if test -x "$PATH_TO_MAILQ"
1026then 1136then
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])
1028else 1138else
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])
1030fi 1141fi
1031 1142
1032dnl SWAP info required is amount allocated/available and amount free 1143dnl SWAP info required is amount allocated/available and amount free