diff -Nru monit-4.8.1/aclocal.m4 monit-5.0.3/aclocal.m4
--- monit-4.8.1/aclocal.m4 2006-05-16 20:16:22.000000000 +0100
+++ monit-5.0.3/aclocal.m4 2009-08-24 16:12:09.000000000 +0100
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -11,148 +11,4 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-#serial 6
-
-dnl This macro is intended to be used solely in this file.
-dnl These are the prerequisite macros for GNU's strftime.c replacement.
-dnl FIXME: the list is far from complete
-AC_DEFUN([_jm_STRFTIME_PREREQS],
-[
- dnl strftime.c uses localtime_r if it exists. Check for it.
- AC_CHECK_FUNCS(localtime_r)
- dnl FIXME: add tests for everything in strftime.c: e.g., HAVE_BCOPY,
- dnl HAVE_TZNAME, HAVE_TZSET, HAVE_TM_ZONE, etc.
-])
-
-dnl Determine if the strftime function has all the features of the GNU one.
-dnl
-dnl From Jim Meyering.
-dnl
-AC_DEFUN([jm_FUNC_GNU_STRFTIME],
-[AC_REQUIRE([AC_HEADER_TIME])dnl
-
- _jm_STRFTIME_PREREQS
-
- AC_REQUIRE([AC_C_CONST])dnl
- AC_REQUIRE([AC_HEADER_STDC])dnl
- AC_CHECK_HEADERS(sys/time.h)
- AC_CACHE_CHECK([for working GNU strftime], jm_cv_func_working_gnu_strftime,
- [AC_TRY_RUN(
-changequote(<<, >>)dnl
-<< /* Ulrich Drepper provided parts of the test program. */
-#if STDC_HEADERS
-# include
-#endif
-
-#if TIME_WITH_SYS_TIME
-# include
-# include
-#else
-# if HAVE_SYS_TIME_H
-# include
-# else
-# include
-# endif
-#endif
-
-static int
-compare (const char *fmt, const struct tm *tm, const char *expected)
-{
- char buf[99];
- strftime (buf, 99, fmt, tm);
- if (strcmp (buf, expected))
- {
-#ifdef SHOW_FAILURES
- printf ("fmt: \"%s\", expected \"%s\", got \"%s\"\n",
- fmt, expected, buf);
-#endif
- return 1;
- }
- return 0;
-}
-
-int
-main ()
-{
- int n_fail = 0;
- struct tm *tm;
- time_t t = 738367; /* Fri Jan 9 13:06:07 1970 */
- tm = gmtime (&t);
-
- /* This is necessary to make strftime give consistent zone strings and
- e.g., seconds since the epoch (%s). */
- putenv ("TZ=GMT0");
-
-#undef CMP
-#define CMP(Fmt, Expected) n_fail += compare ((Fmt), tm, (Expected))
-
- CMP ("%-m", "1"); /* GNU */
- CMP ("%A", "Friday");
- CMP ("%^A", "FRIDAY"); /* The ^ is a GNU extension. */
- CMP ("%B", "January");
- CMP ("%^B", "JANUARY");
- CMP ("%C", "19"); /* POSIX.2 */
- CMP ("%D", "01/09/70"); /* POSIX.2 */
- CMP ("%F", "1970-01-09");
- CMP ("%G", "1970"); /* GNU */
- CMP ("%H", "13");
- CMP ("%I", "01");
- CMP ("%M", "06");
- CMP ("%M", "06");
- CMP ("%R", "13:06"); /* POSIX.2 */
- CMP ("%S", "07");
- CMP ("%T", "13:06:07"); /* POSIX.2 */
- CMP ("%U", "01");
- CMP ("%V", "02");
- CMP ("%W", "01");
- CMP ("%X", "13:06:07");
- CMP ("%Y", "1970");
- CMP ("%Z", "GMT");
- CMP ("%_m", " 1"); /* GNU */
- CMP ("%a", "Fri");
- CMP ("%^a", "FRI");
- CMP ("%b", "Jan");
- CMP ("%^b", "JAN");
- CMP ("%c", "Fri Jan 9 13:06:07 1970");
- CMP ("%^c", "FRI JAN 9 13:06:07 1970");
- CMP ("%d", "09");
- CMP ("%e", " 9"); /* POSIX.2 */
- CMP ("%g", "70"); /* GNU */
- CMP ("%h", "Jan"); /* POSIX.2 */
- CMP ("%^h", "JAN");
- CMP ("%j", "009");
- CMP ("%k", "13"); /* GNU */
- CMP ("%l", " 1"); /* GNU */
- CMP ("%m", "01");
- CMP ("%n", "\n"); /* POSIX.2 */
- CMP ("%p", "PM");
- CMP ("%r", "01:06:07 PM"); /* POSIX.2 */
- CMP ("%s", "738367"); /* GNU */
- CMP ("%t", "\t"); /* POSIX.2 */
- CMP ("%u", "5"); /* POSIX.2 */
- CMP ("%w", "5");
- CMP ("%x", "01/09/70");
- CMP ("%y", "70");
- CMP ("%z", "+0000"); /* GNU */
-
- exit (n_fail ? 1 : 0);
-}
- >>,
-changequote([, ])dnl
- jm_cv_func_working_gnu_strftime=yes,
- jm_cv_func_working_gnu_strftime=no,
- dnl When crosscompiling, assume strftime is missing or broken.
- jm_cv_func_working_gnu_strftime=no)
- ])
- if test $jm_cv_func_working_gnu_strftime = no; then
- AC_DEFINE_UNQUOTED(strftime, gnu_strftime,
- [Define to gnu_strftime if the replacement function should be used.])
- fi
-])
-
-AC_DEFUN([jm_FUNC_STRFTIME],
-[
- _jm_STRFTIME_PREREQS
- AC_REPLACE_FUNCS(strftime)
-])
-
+m4_include([m4/strftime.m4])
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/alert.c /tmp/QeMlhPoI46/monit-5.0.3/alert.c
--- monit-4.8.1/alert.c 2006-04-27 21:16:03.000000000 +0100
+++ monit-5.0.3/alert.c 2009-03-26 06:27:03.000000000 +0000
@@ -1,20 +1,30 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
#include
@@ -56,7 +66,7 @@
* @author Martin Pala
* @author Christian Hopp
*
- * @version \$Id: alert.c,v 1.53 2006/04/27 20:16:03 martinp Exp $
+ * @version \$Id: alert.c,v 1.65 2009/03/24 19:49:05 martinp Exp $
* @file
*/
@@ -75,12 +85,11 @@
/**
* Notify registred users about the event
* @param E An Event object
- * @return If failed, return HANDLER_ALERT flag or HANDLER_PASSED if passed
+ * @return If failed, return HANDLER_ALERT flag or HANDLER_SUCCEEDED if succeeded
*/
int handle_alert(Event_T E) {
-
Service_T s;
- int rv = HANDLER_PASSED;
+ int rv = HANDLER_SUCCEEDED;
ASSERT(E);
@@ -93,9 +102,7 @@
if(s->maillist || Run.maillist) {
Mail_T m;
Mail_T n;
- sigset_t ns, os;
Mail_T list= NULL;
- set_signal_block(&ns, &os);
/*
* Build a mail-list with local recipients that has registered interest
* for this event.
@@ -106,19 +113,14 @@
/* particular event notification type is allowed for given recipient */
IS_EVENT_SET(m->events, Event_get_id(E)) &&
(
- /* 'changed/matched' event types are sent always */
- E->id == EVENT_CHANGED || E->id == EVENT_MATCH ||
/* state change notification is sent always */
E->state_changed ||
/* in the case that the state is failed for more cycles we check
* whether we should send the reminder */
- (
- E->state && m->reminder && E->count % m->reminder == 0
- )
+ (E->state && m->reminder && E->count % m->reminder == 0)
)
)
{
-
Mail_T tmp= NULL;
NEW(tmp);
@@ -140,7 +142,6 @@
* overrides the same recipient events which are registered globaly.
*/
for(m= Run.maillist; m; m= m->next) {
-
int skip= FALSE;
for(n= s->maillist; n; n= n->next) {
@@ -156,15 +157,11 @@
/* particular event notification type is allowed for given recipient */
IS_EVENT_SET(m->events, Event_get_id(E)) &&
(
- /* 'changed' event type is sent always */
- E->id == EVENT_CHANGED || E->id == EVENT_MATCH ||
/* state change notification is sent always */
E->state_changed ||
/* in the case that the state is failed for more cycles we check
* whether we should send the reminder */
- (
- E->state && m->reminder && E->count % m->reminder == 0
- )
+ (E->state && m->reminder && E->count % m->reminder == 0)
)
)
{
@@ -186,15 +183,12 @@
if(list) {
- if(!sendmail(list)) {
+ if(!sendmail(list))
rv = HANDLER_ALERT;
- }
gc_mail_list(&list);
}
- unset_signal_block(&os);
-
}
return rv;
@@ -203,7 +197,6 @@
static void substitute(Mail_T *m, Event_T e) {
-
char timestamp[STRLEN];
ASSERT(m && e);
@@ -212,7 +205,7 @@
Util_replaceString(&(*m)->subject, "$HOST", Run.localhostname);
Util_replaceString(&(*m)->message, "$HOST", Run.localhostname);
- Util_getRFC822Date(&e->collected, timestamp, STRLEN);
+ Util_getRFC822Date((time_t *)&e->collected.tv_sec, timestamp, STRLEN);
Util_replaceString(&(*m)->subject, "$DATE", timestamp);
Util_replaceString(&(*m)->message, "$DATE", timestamp);
@@ -231,7 +224,6 @@
static void copy_mail(Mail_T n, Mail_T o) {
-
ASSERT(n && o);
n->to= xstrdup(o->to);
@@ -257,7 +249,6 @@
static void replace_bare_linefeed(Mail_T *m) {
-
Util_replaceString(&(*m)->message, "\r\n", "\n");
Util_replaceString(&(*m)->message, "\n", "\r\n");
}
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/alert.h /tmp/QeMlhPoI46/monit-5.0.3/alert.h
--- monit-4.8.1/alert.h 2006-01-01 22:44:01.000000000 +0000
+++ monit-5.0.3/alert.h 2009-02-13 13:06:31.000000000 +0000
@@ -1,20 +1,30 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
@@ -53,7 +63,7 @@
* @author Martin Pala
* @author Christian Hopp
*
- * @version \$Id: alert.h,v 1.22 2006/01/01 22:44:01 martinp Exp $
+ * @version \$Id: alert.h,v 1.29 2009/02/13 09:18:05 hauk Exp $
* @file
*/
@@ -61,7 +71,7 @@
/**
* Notify registred users about the event
* @param E An Event object
- * @return If failed, return HANDLER_ALERT flag or HANDLER_PASSED flag if passed
+ * @return If failed, return HANDLER_ALERT flag or HANDLER_SUCCEEDED flag if succeeded
*/
int handle_alert(Event_T E);
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/CHANGES.txt /tmp/QeMlhPoI46/monit-5.0.3/CHANGES.txt
--- monit-4.8.1/CHANGES.txt 2006-05-10 21:29:00.000000000 +0100
+++ monit-5.0.3/CHANGES.txt 2009-05-25 21:53:02.000000000 +0100
@@ -1,6 +1,602 @@
- CHANGES version 4.8.1
+ CHANGES version 5.0.3
+
+ This file summarizes changes made since 3.0
+
+ Bug fixes may refer to an auto-generated id in our
+ bug-tracking system, which can be found here
+ https://savannah.nongnu.org/bugs/?group=monit
+
+
+Version 5.0.3
+
+NEW FEATURES AND FUNCTIONS:
+
+* Fixed #26664: crash on service timeout or unmonitor action
+ (introduced in 5.0.2). Thanks to Bretislav Kubesa and
+ Michael Shigorin for report.
+
+* Removed the configure --without-resource option. If the user
+ who is running Monit doesn't have permissions to check the
+ processes state, the related checks are disabled dynamically.
+
+
+Version 5.0.2
+
+BUGFIXES:
+
+* 35 improvements based on code scan with Klockwork
+ (http://www.klocwork.com/) which we were evaluating.
+ Huge thanks to Klocwork for their great product.
+
+* Fixed #26382: if start or stop script for some service didn't
+ exist, monit logged error during configuration file parsing and
+ refused to start. Monit now just logs warning and continues.
+
+
+Version 5.0.1
+
+BUGFIXES:
+
+* Fixed a bug where Monit did not stop logging succeeded events.
+ This bug occurred if PID, PPID, timestamp or size change tests
+ were used and failed and then succeeded again.
+
+
+Version 5.0
+
+NEW FEATURES AND FUNCTIONS:
+
+* M/Monit support added. If you run Monit on more than one
+ server, you can use M/Monit to manage and control all your
+ Monit enabled servers from one simple Web Interface. See
+ http://mmonit.com/ for details.
+
+* Support use of symbolic links in filesystem check. Thanks to
+ Aleksander Kamenik for suggestion. Example:
+ check filesystem rootfs path
+ /dev/disk/by-uuid/4ef973f7-67d1-4bb0-8223-cb1c692b72e4
+ if space usage > 95% then alert
+ if inode usage > 95% then alert
+
+* If no 'set mailserver' was defined in monitrc, Monit tried to
+ fallback to localhost:25 SMTP server. This fallback was removed
+ since it may be confusing. If you want to deliver mail alerts
+ from Monit, the 'set mailserver' option is necessary. In case
+ it is missing, Monit will log appropriate error and hint to add
+ it.
+
+* The generic send/expect protocol test limited the expect input
+ to 256 bytes. It's possible to set the input buffer for expect
+ globally - for example: set expectbuffer 20 kb Thanks to Asil
+ Carlin for suggestion.
+
+* The following event types were added CONTENT, FSFLAGS, PID and
+ PPID and the following generic event types CHANGED and MATCH were
+ removed and replaced by the above types and with the existing SIZE,
+ CHECKSUM, TIMESTAMP events so the information is more specific
+ The event types are internal to Monit and unless you have used
+ either CHANGED or MATCH event in your alert filters, no change
+ is necessary (alerts are delivered as usual, the tests just use
+ different types internally).
+
+* Monit now generates a unique id on first start and store the id
+ in a permanent file. This id is used in protocol communication
+ between Monit and M/Monit to pair a Monit instance with it's
+ host entry in M/Monit. By default the id file is placed in
+ $HOME/.monit.id. The location can be changed by using the set
+ idfile statement, for example:
+ set idfile /var/monit.id
+
+* Monit now keep its service monitoring state even on Monit
+ restart. Previously Monit dropped the state when it was stopped
+ correctly. Services in manual monitoring mode will remember the
+ monitoring state across Monit restarts. If Monit is used in a
+ cluster, it is recommended to place the state file in a
+ temporary filesystem incase the primary machine will crash and
+ the the spare machine takeover, the state will be dropped on
+ reboot for the crashed machine and the services in manual
+ monitoring mode won't be started on reboot. For example the
+ "set statefile /tmp/monit.state" can be used to place the state
+ file in the /tmp/ filesystem.
+
+* Added a protocol test for testing the LMTP protocol. Thanks
+ to Fco. Javier Felix for patch.
+
+* Added the start delay option for daemon statement which allows
+ to pause Monit on its startup for a while. If monitored
+ services are started by init scripts in parallel on system
+ boot, Monit may be too fast and detect that the service is not
+ running (yet) and restart the service. Note that it's still
+ recommended Monit is setup to be responsible for service
+ startup (that is, don't use init to start Monit controlled
+ services, instead use Monit). This will ensure correct startup
+ without need for a start delay since Monit will have full
+ control of service startup. Many users start services from init
+ on boot anyway, so in such cases this option will solve their
+ problems. Default start delay is 0 which corresponds to the
+ current behavior. Example syntax which will make Monit wait one
+ minute before starting its first monitoring cycle:
+ --8<--
+ set daemon 5 with start delay 60
+ --8<--
+ Thanks to Fco. Javier Felix for patch.
+
+* Added PAM support for Monit http interface authentication. Note
+ that PAM is not supported on all platforms - currently works on
+ Linux, Mac OS X, FreeBSD, NetBSD. Monit uses the PAM service "monit".
+ Here is a Monit PAM service example for Mac OS X which is able
+ to authenticate system users for Monit access -
+ /etc/pam.d/monit:
+ --8<--
+ # monit: auth account password session
+ auth sufficient pam_securityserver.so
+ auth sufficient pam_unix.so
+ auth required pam_deny.so
+ account required pam_permit.so
+ --8<--
+ And configuration for monitrc which allows only group admins
+ to access the http interface:
+ --8<--
+ set httpd port 2812 allow @admin
+ --8<--
+ See the PAM manual page for details on how to configure the PAM
+ service on your system and the available PAM plugins. Thanks to
+ Wilhelm Meier for patch.
+
+* Added more detailed reports for Monit resource tests on service
+ recovery. Thanks to Lars Kotthoff for patch.
+
+* Set locale to C.
+
+* Added a protocol test for testing the SIP protocol which is
+ used by popular communication servers such as Asterisk and
+ FreeSWITCH. We received two patches for this protocol and have
+ taken code from both and merged them. Many thanks to Bret
+ McDanel and to Pierrick Grasland for supplying the patches.
+
+* Added MONIT_DESCRIPTION to the list of environment variables
+ available to programs started by monit. Thanks to Morten
+ Bressendorff Schmidt for patch.
+
+* If a service group is specified for Monit CLI action,
+ Monit no longer requires the "all" verb, so the following
+ command is possible:
+ monit -g web stop
+ If group is not specified (i.e. the -g option is omitted), the
+ service name or "all" is still required as a safeguard.
+
+* Added an option to the 'set mailserver' statement so it is
+ possible to override the hostname used in SMTP EHLO/HELO and in
+ the Message-ID header when sending mail. Monit defaults to use
+ the localhost name. I.e. what you get when executing this
+ command 'uname -n'. Overriding the host name can be useful if
+ the host does not have a DNS entry and if the receiving
+ mailserver uses DNS verification as spam protection. The new
+ override option is:
+ set mailserver foo.bar.baz using hostname "my.monit.host"
+
+* A new EVENT_ACTION type was added which reports actions
+ performed on Monit's administrator request (either via web
+ interface or CLI). If you don't want to received these events,
+ you can set the mail-filter for "action" event type.
+
+* NOTA BENE: Monit start action is synchronous now. This improves
+ the startup sequence for dependent services, since Monit will
+ wait for parent service to start before trying to start the
+ child.
+
+* It is now possible to define execution timeout for start and
+ stop commands. That is, how long Monit will wait after
+ executing a command before it assume execution failed. If the
+ timeout option is omitted, Monit defaults to 30 seconds. You
+ can override the timeout for example for services which are
+ starting slower.
+ Example syntax:
+ start program = "/bin/foo start" with timeout 60 seconds
+
+* The event passed state is renamed to succeeded as this name
+ more reflects the state of things.
+
+* The device service test is renamed to filesystem.
+
+BUGFIXES:
+
+* Some linux virtualization platforms report CPU count as 0.
+ Monit then dynamically disabled CPU usage monitoring. In such
+ case we now override the CPU count from 0 to 1 so resource
+ usage monitoring can continue. Thanks to Jenny Hopkins for
+ report.
+
+* Increased the server socket backlog queue which will make Monit
+ able to handle more services. Thanks to Jochen Kramer.
+
+* Fixed #24866: Email messages such as: cpu wait usage check
+ succeeded [current cpu wait usage=17.4%] were displayed as
+ "...usage.4%". The problem was incorrect transfer
+ encoding header in the email (the body itself was OK). Thanks
+ to Dave Cheney for report.
+
+* When a Monit shutdown requested was issued while Monit were
+ working and testing services, Monit did not shutdown until all
+ work were done, i.e. until all services were tested. Monit will
+ now shutdown faster - as soon as it finish testing the current
+ service.
+
+* Monit blocked/unblocked SIGTERM, SIGINT SIGHUP and SIGUSR1
+ signals during operation to protect certain code sections. When
+ a signal was sent during such a time, for example to stop
+ Monit, it was dropped and had to be retried in order to stop
+ Monit. This limitation is now removed and signals will be
+ processed at any time. Thanks to Nicola Tiling for report.
+
+* If the Monit httpd allow option did not include a
+ user:password, Monit CLI logged the following error (even if
+ the action was performed anyway):
+ Cleartext credentials needed for basic authorization!
+ This error was false - even access restriction based on
+ host/net is sufficient - user and password is just one of
+ possible options (not requirement). Thanks to Gilad Benjamini
+ for report.
+
+* Allow localhost as a value for the host header in the http
+ protocol test instead of setting an empty host header and let
+ the http server decide
+
+* The 'if changed checksum ...' test can now be used even if a
+ monitored file doesn't exist at Monit startup. Thanks to Joe
+ Shang for report.
+
+* If both event handlers (M/Monit and mail alerts) temporarily
+ failed at once and event queue was enabled, events will be
+ stored in the queue and delivered in the next cycle. However, a
+ bug caused delivery to be retried for every cycle for both
+ handlers if just one of them was recovered. Monit could then
+ deliver the same message multiple times until both handlers
+ recovered. The problem is now fixed and only one copy of the
+ event is sent even if only one handler did recover.
+
+* Make unit in size test optional and default to byte unless
+ specified. So it is possible to write, if size > 1000 then ..
+
+* Fixed handling of invalid input files in event queue handler.
+ Thanks to Fco.Javier Felix for patch.
+
+* Set the content type to text/html for Monit web interface POST
+ responses. Thanks to Rich Drummond for patch.
+
+* Fixed #23530: configure script will return error if bison,
+ byacc or yacc are not found at Monit compile time.
+
+* Fix CPU and memory monitoring on Solaris (it was disabled on
+ Monit start)
+
+* AIX fixes and extensions, Monit should run on AIX without
+ problems, including cpu, memory and filesystem monitoring
+ (tested with AIX 5.3). Thanks to Brian Downey for support
+ and help.
+
+* HP-UX fixes and extensions, Monit should run on HP-UX without
+ problems, including cpu, memory and filesystem monitoring.
+ Thanks to Brian Downey for support and help.
+
+* Fixed #23467: Don't exit, only issue a warning if the "include"
+ statement did not find any files to include.
+
+* Fixed #23530: Event queue did not work with the default
+ unlimited slots.
+
+* Fixed #23617: The process cpu usage is initializing in the
+ first cycle so the value is set to 0% - if the 'cpu usage <
+ xyz%' test was used to check that the process usage is higher
+ then given level, it was always true. Monit now skips the
+ process cpu usage check in the first cycle.
+
+* Make sure Monit alerts has a unique message id. Thanks to Steve
+ Purcell for report
+
+* Fixed possible crash when Monit is watching VPS environment on
+ Linux which reports number of CPUs as 0. Thanks to Marius
+ Schmidt for report.
+
+* Cleanup event states during a service stop/unmonitor so old
+ events are not sent when the service is started/monitored again.
+
+* Fixed #21989: Monit could start two instances of the process
+ when service restart is performed and the process is starting
+ slowly. Thanks to Nick Upson, Aaron Scamehorn and David Greaves
+ for report.
+
+* Fixed #21550: Fix crash when Monit event queue contained an
+ empty file. Thanks to Douglas J Hunley for report.
+
+* Fixed possible crash when the 'if changed checksum' test was
+ used along with restart action. Thanks to Brian Candler for
+ report.
+
+* Fixed #22075: Allow using a mail address as username when using
+ SMTP authentication.
+
+* Fixed #22191 and #19823: If the file content test does not match
+ anymore, reset the service error state. (Previous versions did
+ not clear the error state and kept showing a match in the status
+ listing and in the http interface).
+
+* The 'if changed size ...' test can now be used even if the
+ monitored file does not exist on monit's start.
+
+* If a htpasswd file is used to control Monit http interface
+ access and the hash type is set to MD5 but the file contains
+ wrong format (non-MD5), report the error and keep running.
+ Formerly Monit exited with an assert exception. Thanks to
+ Adrian Bridgett for report.
+
+BACKWARD INCOMPATIBLE CHANGES:
+* The current CPU usage test which checked the cpu usage of the
+ process itself plus the cpu usage of child processes was
+ renamed to TOTALCPU (otherwise it works the same). The new CPU
+ usage test checks the CPU usage of the process itself only.
+ This change was introduced to align the syntax with MEMORY and
+ TOTALMEMORY tests and to allow to test the CPU usage of
+ processes which fork child processes but the user don't want to
+ include children (such as Mythtv). Users who are using the CPU
+ check for services like Apache webserver to watch total cpu
+ utilization (including children) should rename the CPU
+ statement in their configuration to TOTALCPU.
+
+
+Version 4.10.1
+
+BUGFIXES:
+* Monit reported wrongly that an alert handler failed. This bug
+ was introduced in monit-4.10.
+
+* Fixed memory usage report on machines with more then 4GB
+ physical memory running Mac OS X. Thanks to Dave Cheney for
+ patch.
+
+
+Version 4.10
+
+NEW FEATURES AND FUNCTIONS:
+* Monit from this version on is licensed under GPL version 3
+
+* Added support for SMTP authentication and SSL for sending alerts.
+ Example syntax:
+ - plain authentication:
+ set mailserver
+ smtp.foo.bar username "user" password "secret"
+ - plain authentication with ssl:
+ set mailserver
+ smtp.foo.bar username "user" password "secret" using sslv3
+ - plain authentication with tls:
+ set mailserver
+ smtp.foo.bar username "user" password "secret" using tlsv1
+ Thanks to Thomas Lohmueller for patch.
+
+* Allow to set the location of monitrc using the 'configure --sysconfdir'
+ option during Monit compilation. Thanks to Klaus Heinz for patch.
+
+* Monit now log user action, requested via monit's http interface.
+
+* Monit http interface now use POST method for forms
+ (This change is transparent from the users point of view).
+
+* Monit ICMP echo/ping test now supports 20 echo requests per cycle at
+ maximum.
+
+* When Monit identifies a process as zombie, it continue monitoring
+ the process (formerly Monit disabled monitoring of the given service
+ and sent an alert since it was considered unmanageable).
+
+* Fixed #21447: Monit now adds a (dummy) Message-id header in alert
+ mails to prevent spam checkers to accidentally filter out Monit
+ alerts based on missing message-id.
+
+* Removed C99 particulars from Monit code to support non-C99 compilers.
+
+REMOVED FEATURE
+* Removed support for local redirects in the HTTP protocol test. Users
+ must provide the correct path for the resource they want to test.
+
+BUGFIXES:
+* Fixed a possible Monit crash on exit if a match rule was used and
+ referred a file containing multiple expressions. Thanks to Stephen
+ Dowdy for report.
+
+* Added patch from Klaus Heinz which fix a problem in the Log module
+ that had Monit using an uninitialized mutex after a monitrc reload.
+
+* Fixed a possible crash on Monit start when the Monit control file
+ contained exec action with argument longer then 256 bytes. Thanks
+ to Stevan Bajic for report.
+
+* Fixed linux 32-bit system CPU usage statistics (the fix in 4.9 was
+ incomplete). If a server had a long/large uptime and high load, the
+ reported CPU usage could be incorrect. Thanks to Aleksander for report.
+
+* Fixed a problem where Monit would incorrect display an error in the
+ web interface status page. This could occur if a service had failed,
+ Monit had reload and the state of the service had succeeded just after the
+ reload (for example due to changes of the configuration rules). Thanks to
+ Claus Klein for report and help with the patch.
+
+* Avoid filling the log with "pidfile does not contain a valid pidnumber"
+ entries during debug
+
+* Added patch from Dave Cheney, which fix and reactivate resource testing
+ for Mac OS X Tiger (Darwin 10.4.x).
+
+* Fix memory leak when regular expression is used in Monit configuration
+ and Monit is reloaded. Thanks to Josh Kelley for patch.
+
+* Allow the "if changed timestamp" test to refer to a non-existing file.
+ This could be useful if the service is monitored in non-active mode
+ and the file is expected to be created later.
+
+* When 'if match' statement was used with the path to the regex file
+ containing more then one line and the exec action was used for this
+ rule, then Monit failed to parse the configuration and refused to start.
+ Thanks to Nathan for report.
+
+* contrib/wap.php updated. Thanks to David Fletcher.
+
+* Fixed #21354: Usage of the IMAP Protocol test was impossible due to a small
+ typo in the control file parser and the test would fall back to DEFAULT.
+ Thanks to Wolfgang Breyha for reporting the bug.
+
+
+Version 4.9
+
+NEW FEATURES AND FUNCTIONS:
+* The NOALERT statement added, which allows to disable the
+ alerts local for particular recipient and service. Useful
+ for example when you have alert recipient set globaly
+ but don't want to receive alerts for some part of services.
+ Syntax:
+ noalert
+
+* The ALERT statement was extended by the possibility to
+ negate the optional event filter.
+ Syntax:
+ [set] alert not '{' ... '}'
+ Example:
+ set alert user1@domain but not on { restart }
+ Will send all alerts to user1@domain for all services and
+ events except the restart event. Note that noise words
+ 'but' and 'on' are optional.
+
+* Report the optional arguments uid, gid, method timeout as
+ configured in Monit control file for start, stop programs
+ and exec action.
+
+* Monit will display just warning and will continue its
+ startup in the case that some hostname which is configured
+ in Monit control file is not resolvable during control
+ file parsing.
+
+* Reverse proxy support on Monit http interface added. Thanks
+ to Josh Kelley for patch. Sample proxy configuration for
+ Apache:
+ --8<--
+ ProxyPass /monit/ http://localhost:2812/
+ ProxyPassReverse /monit/ http://localhost:2812/
+
+ AllowOverride None
+ AuthType Basic
+ AuthName sysadmin
+ AuthUserFile /etc/httpd/passwd
+ require valid-user
+
+ --8<--
+
+* When the filesystem doesn't support inodes, then the
+ related information is not displayed in Monit http
+ interface in red font anymore (it highlighted this
+ informational state inappropriately). Thanks to
+ Aleksander for suggestion.
+
+BUGFIXES:
+* Fix the unmonitor action, which didn't work when used in
+ Monit control file rules. Thanks to Jeffrey Gelens for report.
+
+* Fix the extra restart action which was called by monit
+ in addition to user requested start action of stopped
+ process. This didn't occurred in the case that the 'every'
+ statement was used on the service definition as well. Thanks
+ to Aaron Scamehorn for help.
+
+* Fix the possible crash when event queue was used and some
+ non-event file appeared the event queue. Thanks to Michal
+ Cihar for report.
+
+* Fix the -l command line option which was broken. Thanks to
+ Aaron Scamehorn for report.
+
+* Fix the linux 32-bit system CPU usage statistics. When
+ the server has big uptime and load, the reported cpu usage
+ may be incorrect. Thanks to Ron Avriel for patch, Matt
+ Corks and Aleksander for report.
+
+* Fix the Mac OS X CPU usage statistics.
+
+* Fix the Linux space usage statistics - the NFS volumes
+ space usage statistic was wrong. Thanks to Aaron Scamehorn
+ for help.
+
+* The UDP port test for all nondefault protocols, such as NTP,
+ DNS now measures the response time without extra 2 seconds
+ delay, which was added by generic check for UDP socket
+ readiness. When the non-default protocol is used in port test,
+ (i.e. 'protocol' option is used) this check is not needed.
+ When you will use the UDP port test without specifying the
+ protocol, the 2 seconds delay is still present, since when
+ Monit don't know how to speak to the server, it's hard to
+ test the UDP other way.
+
+* Fix the possible crash for Mac OS X Monit CLI commands such
+ as 'monit start service'.
+
+* Fix possible crash on Monit quit when Monit http thread was
+ configured in control file without the ACL. Thanks to Adam
+ Greene for report.
+
+* Fix the Monit crash when byacc was used for compiling 32-bit
+ Monit with large files support on linux. This issue didn't
+ happened when Monit was compiled with 64-bit support, or
+ recommended bison was used as parser generator during
+ compilation, or largefiles support was disabled.
+
+* Don't ask clients for certificate when certificate based
+ authentication was not enabled in Monit http interface.
+ Thanks to Guillaume Chaussy for report.
+
+* Fix minor memory leaks.
+
+* Don't print the 'via (UDP|TCP|TCPSSL)' for unix socket test
+ trace.
+
+
+Version 4.8.2
+
+NEW FEATURES AND FUNCTIONS:
+* Added a filesystem flags change test. This test is implicit
+ for the 'device' service type and Monit will now send an
+ alert by default if flags were changed. This is useful for
+ example, if the filesystem has been remounted read-only, if
+ there are disk errors or if mount flags (e.g. nosuid) were
+ changed. It is possible to override the default (alert)
+ action by using this test:
+ if changed fsflags [ratio] then
+
+* Added Clamav protocol test by Debrard Sebastien
+ (sebastien debrard at strange-garden com)
+
+BUGFIXES:
+* Improved the Monit http interface responsiveness on action
+ scheduling.
+
+* The SMTP protocol test now sends EHLO or HELO first when
+ testing the SMTP protocol as per RFC 2821. Thanks to Kevin
+ Maguire for bug report.
+
+* Fixed the Mac OS X 10.4.x / Darwin 8.x build and implemented
+ 'process memory usage' monitoring on this platform.
+
+* Fixed build on NetBSD 3.x
+
+* Fixed cpu usage statistics on Linux.
+
+* Fixed warnings logged on solaris when the ssh protocol test
+ was used to test Sun's version of sshd.
+
+* Fixed handling of >2GB files by using the Large File Support
+ API on platforms supporting this API. Thanks to Will Bryant
+ (will bryant at ecosm com) for providing a patch.
+
+* Fixed the possible monitoring state amnesia when Monit was
+ reloading just after the the service monitoring state was
+ changed. Thanks to Morten Laursen for report.
- This file summarizes changes made since 3.0
Version 4.8.1
@@ -13,7 +609,7 @@
platforms as well.
* Don't stop if there is no space on the filesystem where
- the monit state file is placed. Thanks to Pavel Urban
+ the Monit state file is placed. Thanks to Pavel Urban
(urbanp at mlp ,cz> for report.
* Remove the false warning about TOTALMEMORY statement on
@@ -28,7 +624,7 @@
(nonotats at asahi email ne jp)
* Removed a feature introduced in 4.7 which tested that a
- check-file, check-directory or check-fifo actually refered
+ check-file, check-directory or check-fifo actually refereed
to an existing object of that type. Monit should not require
these file objects to exist at startup.
@@ -75,7 +671,7 @@
problem.
* Ignore the process PID or PPID change when the service restart was
- performed under monit control (the pid change is expected).
+ performed under Monit control (the pid change is expected).
* Fix the support for PID and PPID change test custom event rate needed
to trigger the action. Thanks to ( root at l8r net ) for report.
@@ -114,18 +710,18 @@
if failed port 1521 protocol tns then alert
* If the alert handler failed, e.g. because the mail server is down,
- monit can optionally add events to a queue and try to deliver pending
+ Monit can optionally add events to a queue and try to deliver pending
events at the next cycle or continue to try so until succeeded. To
enable the event queue, use the 'set eventqueue' statement. Example:
set eventqueue
basedir /var/monit
slots 5000
-* Send alerts when the monit agent stopped, started or reloaded.
+* Send alerts when the Monit agent stopped, started or reloaded.
* Monit now supports the event description macro $DESCRIPTION
in the MAIL-FORMAT statement. It expands to the description
- of the error condition, which was originaly placed under
+ of the error condition, which was originally placed under
the default message body. The default message body now includes
the new macro:
--8<--
@@ -140,7 +736,7 @@
monit
--8<--
-* Cleanup of items obsoleted since monit 4.0:
+* Cleanup of items obsoleted since Monit 4.0:
- monit -i option was removed
- $PROGRAM mail-format macro was removed (use $SERVICE macro)
- CPUUSAGE statement was removed (use CPU statement).
@@ -154,8 +750,8 @@
support a directed acyclic graph (dag) structure of dependencies.
Thanks to Philipp Berndt for the patch.
-* If a file content test evaluate to true, monit will now send an
- alert each time. In previous versions, monit only sent one alert
+* If a file content test evaluate to true, Monit will now send an
+ alert each time. In previous versions, Monit only sent one alert
on the first occurrence. Thanks to Peter Holik (peter AT holik!at)
for reporting the problem.
@@ -170,7 +766,7 @@
This should improve the speed and stability when reading from
a network connection.
-* Improved speed of several protocol tests. Previously monit would
+* Improved speed of several protocol tests. Previously Monit would
hang on read until timeout seconds when testing some protocols.
Say thanks to Artyom Khafizov < afk at inbox!ru >.
@@ -214,7 +810,7 @@
# You can also collect regexs in a file
if match /etc/monit/active.regex then alert
As shown, regex can be written directly in the control file or
- collected in a separat file which monit will use. This feature
+ collected in a separate file which Monit will use. This feature
depends on regex(7) and if not installed on the system, monit
reverts to plain substring matching. The matching engine is
fast and on par with more specialized log-scanning tools.
@@ -229,7 +825,7 @@
* Support for optional error notification reminders. For those
who wants to be notified several times that the service is still
down, it is possible to specify the count of service failed cycles
- after which monit will send another notification. The 'reminder'
+ after which Monit will send another notification. The 'reminder'
option was added to both local and global alert definitions - example:
set alert foo@bar with reminder on 10 cycles
will send error notification each tenth cycle when the service
@@ -237,20 +833,20 @@
on 1 cycle. Thanks to Pavel Urban for suggesting
the feature.
-* It is now possible to use the 'passed' keyword as alternative to the
+* It is now possible to use the 'succeeded' keyword as alternative to the
'recovered' keyword in a recovery action section.
* Support for fault tolerant monitoring added. You can now specify
the event frequency before an action is conducted by monit.
In some cases you will want to allow a certain level of events to
occur before an error is raised. This feature is optional and if
- not used, monit defaults to act on the first event as usual. Both
- failed and passed actions may be restricted this way. Here's an
+ not used, Monit defaults to act on the first event as usual. Both
+ failed and succeeded actions may be restricted this way. Here's an
example:
check host foo.bar with address 192.168.1.1
if failed port 80 for 5 times within 8 cycles
then exec '/my/script'
- else if passed for 10 cycles then alert
+ else if succeeded for 10 cycles then alert
BUGFIXES:
* If kvm access on FreeBSD failed (for example because of environment
@@ -264,7 +860,7 @@
to read all the data provided by the server. Thanks to Ben
Hartshorne for reporting the problem.
-* Fixed CIDR notation of monit http interface net allow option on
+* Fixed CIDR notation of Monit http interface net allow option on
little endian architectures. Thanks to Ben Hartshorne for reporting the problem.
@@ -275,7 +871,7 @@
for reporting the problem.
* Close included config files after parsing. Previous versions of
- monit kept parsed include files open, which could create a problem
+ Monit kept parsed include files open, which could create a problem
with unmount or removal of such files. Thanks to Martin Rueegg
for reporting the problem.
@@ -284,7 +880,7 @@
* Wait for complete SMTP server greeting in SMTP protocol test before
sending QUIT to the server. Exim4 is sensible on the client-server
- synchronization and the protocol test failed because monit was faster
+ synchronization and the protocol test failed because Monit was faster
then expected. Thanks to Tadas Zelionis < tm at equs ! home ! lt >
for reporting the bug.
@@ -296,7 +892,7 @@
test. Thanks to Sebastien Debrard
for reporting the problem.
-* Readded the icmp ping vs. connection tests support. Now, if a ping test
+* Re-added the icmp ping vs. connection tests support. Now, if a ping test
is defined for the host and it fails we simply do not continue with testing
any port connection tests because we assume the line is down.
@@ -320,7 +916,7 @@
* Status summary support added. The 'monit summary' command can be
used to obtain a quick overview of services handled by monit.
Example output:
- The monit daemon 4.5.1 uptime: 15m
+ The Monit daemon 4.5.1 uptime: 15m
System 'foo' [0.16] [0.14] [0.09]
Process 'slapd' running
File 'slapd_bin' accessible
@@ -351,11 +947,11 @@
and content == 'action="j_security_check"'
then ...
-* Added monit daemon incarnation identification to monit status.
- It is a unique number based on the monit startup time and used
- for identifying monit instances.
+* Added Monit daemon incarnation identification to Monit status.
+ It is a unique number based on the Monit startup time and used
+ for identifying Monit instances.
-* Added wap interface to monit (available in contrib/wap.php).
+* Added wap interface to Monit (available in contrib/wap.php).
Thanks to David Fletcher for contributing
the PHP-script.
@@ -369,13 +965,13 @@
allow 192.168.1.0/255.255.255.0
allow 10.0.0.0/8
-* Added process PID change test. The test is implicit and monit will
+* Added process PID change test. The test is implicit and Monit will
send an alert by default if the pid was changed. It is possible to
override the default (alert) action by using this test;
if changed pid then
* Added a process PPID (parent pid) change test. The test is implicit
- and monit will send an alert by default. It is possible to override
+ and Monit will send an alert by default. It is possible to override
this default action by using this statement:
if changed ppid then
@@ -392,10 +988,10 @@
* Added NTP version 3 protocol test contributed by Michel Marti
.
-* Added support for monit daemon wakeup via its http interface. This
+* Added support for Monit daemon wake-up via its http interface. This
allows to remotely force a validation cycle start. The monit
- daemon wakeup may be called by using the "/_validate" url (there is
- also a button for this action on the monit http interface runtime page).
+ daemon wake-up may be called by using the "/_validate" url (there is
+ also a button for this action on the Monit http interface runtime page).
Thanks to Leen Besselink for suggesting the
feature.
@@ -409,7 +1005,7 @@
problem and providing the patch.
* Remove --without-accurate-mem-calcs and make it the default
- behaviour. It appears that some of the info in the Linux 2.4
+ behavior. It appears that some of the info in the Linux 2.4
kernel was suspect, and it's outright bogus in 2.6.
* Fix process total memory usage (i.e process itself + children)
@@ -438,11 +1034,11 @@
possible to set a mail servers port number specifically. If not
used, the default port number is 25.
-* Refactoring of monit HTTP interface's service state reporting.
+* Refactoring of Monit HTTP interface's service state reporting.
The state of any service's parameter is now reported by a red
font in case of errors.
-* The monit http server now presents data collected by the main
+* The Monit http server now presents data collected by the main
thread's last check cycle - it will not anymore gather the data
itself. This makes the http request's response much faster and
consistent with what the main thread thinks about the services
@@ -452,7 +1048,7 @@
* Monitoring status now shows a 'initializing' value for services
until data actually is collected. You can typically see this state
before the first test cycle is finished and after monitoring was
- enabled for given the service or immediately after monit startup.
+ enabled for given the service or immediately after Monit startup.
* Display actual response time for ICMP Echo test in monit
HTTP interface.
@@ -484,7 +1080,7 @@
* Fixed assert in parser when using IF SIZE. Thanks to
Andy for reporting the problem.
-* Fixed race condition between threads during monit reload.
+* Fixed race condition between threads during Monit reload.
When a service stop was issued from the http interface during monit
reload, a race condition and crash could occur. Monit will now not
anymore accept connections to its http interface during reload.
@@ -492,10 +1088,10 @@
reporting the problem.
* Fixed double free of memory in http engine which can lead to
- monit stack corruption and freeze or crash of monit during
+ Monit stack corruption and freeze or crash of Monit during
reload.
-* Fixed possible monit crash on opteron based systems. Thanks to Hans
+* Fixed possible Monit crash on opteron based systems. Thanks to Hans
Rauch for reporting the problem.
* Return the base status page URL in case an action was called
@@ -510,7 +1106,7 @@
* If a checksum test was specified for file, display
the actual checksum for the monitored file in monit's HTTP interface.
- If a checksum failure occures, highligth the bad value by red font
+ If a checksum failed event occures, highlight the bad value by red font
and display a warning message in the service status field. Thanks to
Vlada Macek for reporting the problem.
@@ -531,18 +1127,18 @@
* Fixes for Sun Forte C compiler support.
-* Fixed compile-time warning for the 64-bit monit version. Thanks
+* Fixed compile-time warning for the 64-bit Monit version. Thanks
to Pavel Urban for reporting the problem.
* Minor simplification of internal service control interface.
-* Log the start of monit http thread each time. During monit
+* Log the start of Monit http thread each time. During monit
reload this was not the message related to the http start log entry.
-* In the case that monit was reloaded and some service was in failed
+* In the case that Monit was reloaded and some service was in failed
state in the same moment, reset the error flag as soon as the service
will recover after reload. Previous version kept the error flag though
- the service recovered until another failed&passed pair occured.
+ the service recovered until another failed&succeeded pair occurred.
* If a service is not monitored, or if a monitored object doesn't exist or
the data gathering failed, display the state description in
@@ -562,10 +1158,10 @@
HTTP interface.
* Event messages were consolidated to contain the related service name on
- the beggining of the message.
+ the beginning of the message.
* Process resource engine was partly rewritten. It includes code clean up
- and seperation of output data and data gathering.
+ and separation of output data and data gathering.
* Fixed width of html output in monit's http interface.
@@ -579,17 +1175,17 @@
NEW FEATURES AND FUNCTIONS:
* Event engine was refactored. Monit now supports events of
- FAILED and PASSED types, thus it is able to handle any state
+ FAILED and SUCCEEDED types, thus it is able to handle any state
change. Monit will send alert on recovery by default for
all event types, except the case, when the monitored service
doesn't exist or the type of service is invalid - in such case
- will monit involve service restart by default. Alerts are sent
- once (on state change only). It is possible to optionaly select
+ will Monit involve service restart by default. Alerts are sent
+ once (on state change only). It is possible to optional select
the action on recovery. General syntax:
IF rule THEN action [ELSE IF RECOVERED THEN action]
* Monit now supports variable and constant tests. Constant
- tests are related to failed/passed state. Variable tests beggins
+ tests are related to failed/succeeded state. Variable tests begins
with 'IF CHANGED' statement and serves for monitoring of object
changes. You can use it just for alert or to involve some automatic
action, as for example to reload monitored process after its
@@ -606,12 +1202,12 @@
CHANGED, DATA, EXEC, INVALID, NONEXIST, CHECKSUM, ...
}
For example in the case that monitored process is not running,
- monit will generate NONEXIST event. In the case that it is not
- possible to access process' data, monit will generate DATA event.
+ Monit will generate NONEXIST event. In the case that it is not
+ possible to access process' data, Monit will generate DATA event.
In the case that the execution of start or stop program failed,
- monit will generate EXEC event. In the case that monitored file
- is not regular file, monit will generate INVALID event. CHANGED
- event is generated in the case that monit is configured to watch
+ Monit will generate EXEC event. In the case that monitored file
+ is not regular file, Monit will generate INVALID event. CHANGED
+ event is generated in the case that Monit is configured to watch
variable object changes (for example configuration file timestamp).
* Monit now reports action in addition to the event description in
@@ -646,13 +1242,13 @@
It affects following construct:
CHECK FILE httpd.conf WITH PATH /usr/local/apache/conf/httpd.conf
IF FAILED CHECKSUM THEN EXEC "/usr/local/apache/bin/apachectl graceful"
- In previous monit version this configuration caused the apache reload
+ In previous Monit version this configuration caused the apache reload
on monitored configuration file change. Then the value was reseted so
- the test passed next cycles until the file was changed again. Refactored
+ the test succeeded next cycles until the file was changed again. Refactored
event engine monitors for checksum value recovery, i.e whether it changed
to the original value - in such case it will evaluate recovery action,
otherwise the test keeps failed state. Because the value in this
- usage context will not correspond to the original, monit will evaluate
+ usage context will not correspond to the original, Monit will evaluate
action (reload apache) each cycle until the checksum will recover
(which is unlikely for configuration file).
New syntax have to be used for the same result:
@@ -681,7 +1277,7 @@
interface output. Thanks to Peter Holdaway
for reporting the problem.
-* Using CRLF in the monit control file created problems during
+* Using CRLF in the Monit control file created problems during
parsing. Carriage Return (\r) is now ignored in the monitrc control
file. Thanks to Michael Shigorin for
reporting and demonstrating the problem.
@@ -693,16 +1289,16 @@
reported by "Matthew Murphy" :
Error: Possible off-By-One write when handling HTTP POST body
Vulnerability: Possible buffer overflow in Basic Auth. handling
- The vulnerability exist in previous monit releases down to the 1.4
- release. This issue affect previous monit releases if monit is
+ The vulnerability exist in previous Monit releases down to the 1.4
+ release. This issue affect previous Monit releases if Monit is
started with http server support.
* This release also patch a thread race condition that could lead to
an assert exception. Reported by Peter Holdaway. The problem
- manifested when monit was asked to start a program that did not
- start (for some reason) and a monit reload or a monit exit was
+ manifested when Monit was asked to start a program that did not
+ start (for some reason) and a Monit reload or a Monit exit was
issued before Poll time had elapsed. This problem will not occur
- during normal usage of monit, where monit is started and left to
+ during normal usage of monit, where Monit is started and left to
run by itself.
@@ -712,16 +1308,16 @@
* Support for file inclusion in the control file (monitrc).
Syntax:
include globstring
- This function allows for the monit control file to be split up into
+ This function allows for the Monit control file to be split up into
several fragments and (for example) collected into a monitrc.d
directory. A proof of the concept can be found here:
http://people.altlinux.ru/~homyakov/packages/monit/
-* monit now prints its status in text and in xml format via this URL:
+* Monit now prints its status in text and in xml format via this URL:
http://localhost:2812/_status?format=xml and
http://localhost:2812/_status?format=text
-* In addition to MD5 checksums monit now supports SHA1 checksums for
+* In addition to MD5 checksums Monit now supports SHA1 checksums for
files and HTTP requests.
* Services not monitored does not have their status displayed in the
@@ -729,7 +1325,7 @@
* Support for httpd server version signature hiding. Syntax:
signature [enable|disable]
- By default the monit httpd server will show its version in the
+ By default the Monit httpd server will show its version in the
header.
BACKWARD INCOMPATIBLE CHANGES:
@@ -737,11 +1333,11 @@
is defunct and replaced with the new URL described above.
* The 'monit status' command reports general status overview only and
- status is only available if the monit daemon runs.
+ status is only available if the Monit daemon runs.
* Service names in the .monitrc control file is not allowed to start
with a slash '/', because such service names cannot be viewed
- properly in the monit web interface.
+ properly in the Monit web interface.
BUGFIXES:
* Ring move protection added to process tree code. There was a rare loop
@@ -758,8 +1354,8 @@
* Also fixed a problem with locked mutex across a fork on Solaris
(and probably other OS other than Linux v. 2.4 with a "real" thread
implementation). The problem manifest itself (infrequently) by
- monit not beeing able to start a requested program and the forked
- monit process hanging on a mutex. Thanks to Peter Holdaway
+ Monit not being able to start a requested program and the forked
+ Monit process hanging on a mutex. Thanks to Peter Holdaway
for discovering the problem and
for providing a patch that fixed the problem.
@@ -784,9 +1380,9 @@
word on the beginning of this standalone statement. The simplest example:
set alert sysadmin@bar
-* monit now print error and log messages to the standard file
+* Monit now print error and log messages to the standard file
descriptors (1,2) even if they do not referee to a tty. This change
- allows output to be redirected to a non-tty at monit startup. For
+ allows output to be redirected to a non-tty at Monit startup. For
instance: monit 1>/dev/null 2>/path/monit.err
BUGFIXES:
@@ -802,9 +1398,9 @@
by Evgeny Legerov :
Vulnerability 1: Long http method stack overflow
Vulnerability 2: Denial of Service via negative Content-Length field
- These vulnerabilities exist in previous monit releases down to the
- 1.4 release. This issue only affect previous monit releases if
- monit is started with http server support.
+ These vulnerabilities exist in previous Monit releases down to the
+ 1.4 release. This issue only affect previous Monit releases if
+ Monit is started with http server support.
Version 4.1
@@ -822,12 +1418,12 @@
Crypt, MD5 and cleartext passwords are supported.
* From this release on, it is possible to define more than one SMTP
- server monit should use for sending alert messages. If monit cannot
+ server Monit should use for sending alert messages. If Monit cannot
connect to the first SMTP server it will try the second in the list
and so on.
* Added SMTP server connect and read timeout. Monit has a default 5
- seconds timeout and if the SMTP server is slow, monit could timeout
+ seconds timeout and if the SMTP server is slow, Monit could timeout
when connecting or reading from the server. It's is now possible to
explicit set the timeout to a higher value.
@@ -840,28 +1436,28 @@
* Support for read-only user access added to web interface
-* PHP "proxy" script for accessing the monit web pages via port 80
+* PHP "proxy" script for accessing the Monit web pages via port 80
using a regular http server, such as apache httpd. Contributed by
David Fletcher . See the contrib/ directory.
BUGFIXES:
* Alert limitation implemented; Monit will only raise one alert when
an error situation occurs and *not* repeatedly send error messages
- for the same problem. When the error has gone, monit resets and
+ for the same problem. When the error has gone, Monit resets and
will raise a new alert if the error should reoccur. Consider:
if cpu > 50% then alert
Monit will now only raise one alert if the cpu usage goes beyond
50% and, as long as the process uses more than 50% cpu no more
- error alerts are sent. When usage drops below 50% monit will reset
+ error alerts are sent. When usage drops below 50% Monit will reset
and again send a new alert if usage should raise above 50% again.
- Previous versions of monit did not have this feature and
+ Previous versions of Monit did not have this feature and
continuously sent alerts as long as the test validated to true.
This change does not only applies to cpu test but also to memory
tests, size and space tests and timestamp tests. The bottom line is
that you will no longer get many duplicate alerts for the same
problem.
-* Don't print html tags to the console on shutdown when monit runs in
+* Don't print html tags to the console on shutdown when Monit runs in
init mode (-I).
* Monit now supports logging via multilog when running via
@@ -872,7 +1468,7 @@
to a parse error if this alert statement was used, 'alert on {
resource }'
-* Fixed the bug that caused monit not to unmonitor all depending
+* Fixed the bug that caused Monit not to unmonitor all depending
services when a unmonitor action was executed. Thanks to Marco
Bisioli for providing the bugfix.
@@ -881,7 +1477,7 @@
* Fixed a bug that allowed duplicate entries under certain
circumstances in the control file.
-* In the case that SSL client certificate is not defined, monit will
+* In the case that SSL client certificate is not defined, Monit will
not print error message
@@ -936,7 +1532,7 @@
* A new 'exec' action was added for all service test types (such as
the timestamp, resource, checksum, space, etc.) The exec statement
is used to execute an arbitrary program as an action if the test
- validates to true. It is possible to run this program optionaly as
+ validates to true. It is possible to run this program optionally as
a specified user and with a specified group id. See manual for the
new syntax. For instance to reload apache if the httpd.conf file
was changed:
@@ -957,7 +1553,7 @@
starting monitoring of this service. You can also enable or disable
service monitoring from the console or from the web interface.
-* It is possible to set message facility in the case that monit logs
+* It is possible to set message facility in the case that Monit logs
via syslog.
* This release supports a native RDATE test. Thanks to Francois
@@ -966,7 +1562,7 @@
* This release supports a native RSYNC test. Thanks to Igor
Homyakov
-* Programs executed by monit, now has several monit specific
+* Programs executed by monit, now has several Monit specific
environment variables available, which they may utilize for various
purposes. A list of the available variables can be found in the
documentation.
@@ -984,7 +1580,7 @@
* Resource monitoring can be turned off in the configure stage of
compilation.
-* Fixed monit rc script and monit.spec
+* Fixed Monit rc script and monit.spec
* This release introduces AIX and OpenBSD support and generic
support for unknown operating systems. Thanks to Richard
@@ -994,13 +1590,13 @@
* HP/UX support brought to the same state like all other operating
systems.
-* The monit httpd server now logs denied client connections. If a
+* The Monit httpd server now logs denied client connections. If a
client is not allowed to connect to the server the connect attempt
will be logged including the client's ip-address. A failed attempt
to log in via basic authentication is also logged with the clients
ip-address.
-* The monit httpd server is rewritten to use non-blocking i/o.
+* The Monit httpd server is rewritten to use non-blocking i/o.
BACKWARD INCOMPATIBLE CHANGES:
* The service names are no longer restricted by reserved names.
@@ -1057,7 +1653,7 @@
of $SERVICE is highly recommended because it is more relevant.
* The option -i was removed because it was useless. Note: option
- -I which is used for monit starting under init's control is not
+ -I which is used for Monit starting under init's control is not
affected by this change.
BUGFIXES:
@@ -1089,8 +1685,8 @@
first 31 characters of 32 possible.
* This release utilize a state file to save significant process data.
- This allows data to be persistent and survive a monit reload and
- let monit recover from a crash and pick up without losing the
+ This allows data to be persistent and survive a Monit reload and
+ let Monit recover from a crash and pick up without losing the
process state.
* The network code was rewritten to use a more modern non-blocing
@@ -1102,32 +1698,32 @@
fixed and cleaned up by introducing (more) thread blocks in the
code, thus making the code more reentrant.
-* Fixed the problem, where monit identified a running process as non-
+* Fixed the problem, where Monit identified a running process as non-
running. Thanks to Shannon E. Reall for reporting the
problem.
* Monit does not use /proc/kcore on Linux anymore. This makes it
- possible to use monit on a 2.4 kernel with the grsecurity patch and
+ possible to use Monit on a 2.4 kernel with the grsecurity patch and
on a 2.6 kernel with architectures such as ARM. Thanks to Arkadiusz
Miskiewicz for reporting the problem and
providing the patch.
-* Fixed race condition related to monit httpd server stop. Monit now
+* Fixed race condition related to Monit httpd server stop. Monit now
waits for its httpd to terminate gracefully before freeing memory
and closing filedescriptors.
* Fixed race condition related to SIGINT and SIGTERM signals which
- if catched during monit exit phase can cause recurrent exit handler
+ if catched during Monit exit phase can cause recurrent exit handler
call.
-* Don't try to stop monit httpd and close daemon related files if monit
+* Don't try to stop Monit httpd and close daemon related files if monit
was not started in daemon mode and received SIGTERM or SIGINT.
Version 3.2
* This release include documentation on how to setup a simple
- failsafe cluster with monit and Heartbeat, see also:
+ failsafe cluster with Monit and Heartbeat, see also:
http://www.tildeslash.com/monit/monit.html#monit%20with%20heartbeat
Thanks to Oliver Jehle .
@@ -1135,22 +1731,22 @@
Automatic reload based on monit's control file timestamp is now
defunct.
-* New monit command 'reload' is added. If used, it will reinitialize
- a running monit daemon (send it the SIGHUP signal).
+* New Monit command 'reload' is added. If used, it will reinitialize
+ a running Monit daemon (send it the SIGHUP signal).
-* A new monit option '-t' is added. If used, monit will run a syntax
+* A new Monit option '-t' is added. If used, Monit will run a syntax
check for the control file and exit with the status.
* The ssl version for TCPSSL tests can now explicitly be set if auto-
detection should fail. (Thanks to Mark Foster for
- the bugreport)
+ the bug report)
* This release supports a native LDAPv2 and LDAPv3 tests. Both tests
are based on anonymous bind.
* This release supports a native DWP (database wire protocol) test.
-* Restart method added to monit httpd cervlet
+* Restart method added to Monit httpd cervlet
* HP/UX support was added. Thanks to Joe Bryant .
@@ -1182,7 +1778,7 @@
* Three monitoring modes are now supported. In addition to the
standard active mode (equals obsolete autostart=yes) and passive
mode (equals obsolete autostart=no) there is a new manual mode,
- which allows monit to work as a simple process monitor in a
+ which allows Monit to work as a simple process monitor in a
clustered environment. Thanks to Oliver Jehle
for the proposal and helping with the
patch.
@@ -1196,16 +1792,16 @@
* This release supports timestamp monitoring for files and for
directories.
-* If start and/or stop programs are not defined, monit will act as in
- passive mode, that is, monit will send alert message in case of
+* If start and/or stop programs are not defined, Monit will act as in
+ passive mode, that is, Monit will send alert message in case of
service failure. Previous release did nothing in such cases.
-* This release reloads monit httpd if the interface where monit httpd
+* This release reloads Monit httpd if the interface where Monit httpd
listens for connection was changed in monitrc (don't require
monit's restart)
-* If a SIGHUP signal is sent to a monit daemon it will reload
- itself. This is useful if you use a monit log file and need to
+* If a SIGHUP signal is sent to a Monit daemon it will reload
+ itself. This is useful if you use a Monit log file and need to
rotate the log, for instance with the logrotate program.
@@ -1213,9 +1809,9 @@
* A new feature to check and utilize systems and process information
is introduced with this release. With this feature you can get an
- alert or monit will stop or restart programs based on their process
- characteristic. E.g. if a process is using to much memory you can
- get an alert, or if a process is using to much CPU monit can auto-
+ alert or Monit will stop or restart programs based on their process
+ characteristic. E.g. if a process is using too much memory you can
+ get an alert, or if a process is using too much CPU Monit can auto-
matically restart the program. Please have a look in the document-
ation to learn more about this new feature.
@@ -1225,13 +1821,13 @@
* To protect the security of your control file and passwords the
control file must have permissions no more than 0700 (u=xrw,g=,o=);
- monit will complain and exit otherwise.
+ Monit will complain and exit otherwise.
* This release support up to 64 arguments for the start and stop
programs. Previous versions supported only 2 arguments.
-* If monit fails to execute a start or stop program, monit will now
- send an alert message. Previously, monit only logged a message if
+* If Monit fails to execute a start or stop program, Monit will now
+ send an alert message. Previously, Monit only logged a message if
it failed to execute a program.
* This release makes use of autoheader and config.h. Thanks to Mark
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/collector.c /tmp/QeMlhPoI46/monit-5.0.3/collector.c
--- monit-4.8.1/collector.c 2006-04-27 21:16:03.000000000 +0100
+++ monit-5.0.3/collector.c 2009-04-20 20:39:36.000000000 +0100
@@ -1,20 +1,30 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
@@ -42,11 +52,11 @@
/**
- * Connect to a data collector server and send event or status message.
+ * Connect to a data collector servlet and send event or status message.
*
* @author Martin Pala,
*
- * @version \$Id: collector.c,v 1.12 2006/04/27 20:16:03 martinp Exp $
+ * @version \$Id: collector.c,v 1.30 2009/04/17 16:20:00 martinp Exp $
*
* @file
*/
@@ -55,79 +65,64 @@
/* -------------------------------------------------------------- Prototypes */
-static int data_send(Collector_T, char *);
-static int data_check(Collector_T);
+static int data_send(Mmonit_T, char *);
+static int data_check(Mmonit_T);
/* ------------------------------------------------------------------ Public */
/**
- * Post event or status data message to the collector
+ * Post event or status data message to mmonit
* @param E An event object or NULL for status data
- * @return If failed, return HANDLER_COLLECTOR flag or HANDLER_PASSED flag if passed
+ * @return If failed, return HANDLER_MMONIT flag or HANDLER_SUCCEEDED flag if succeeded
*/
-int handle_collector(Event_T E) {
-
+int handle_mmonit(Event_T E) {
char *D = NULL;
- Collector_T C = Run.collectors;
- sigset_t ns;
- sigset_t os;
- int rv = HANDLER_PASSED;
-
- /* The event is send to the collector just once - only in the case
- * that the state changed/matched */
- if(!C || (!E->state_changed && (E->id != EVENT_CHANGED || E->id != EVENT_MATCH)))
- {
+ Mmonit_T C = Run.mmonits;
+ int rv = HANDLER_SUCCEEDED;
+
+ /* The event is sent to mmonit just once - only in the case that the state changed */
+ if(!C || (E && !E->state_changed))
return rv;
- }
- set_signal_block(&ns, &os);
+ while(!(C->socket = socket_create_t(C->url->hostname, C->url->port, SOCKET_TCP, C->ssl, C->timeout))) {
+ LogError("M/Monit: cannot open a connection to %s -- %s\n", C->url->url, STRERROR);
- while(!(C->socket=
- socket_create_t(C->url->hostname, C->url->port, SOCKET_TCP, C->ssl, C->timeout)
- ))
- {
- LogError("Collector: cannot open a connection to %s -- %s\n",
- C->url->url, STRERROR);
-
- if((C= C->next))
- {
- LogInfo("Collector: trying next server %s\n", C->url->url);
+ if((C = C->next)) {
+ LogInfo("M/Monit: trying next server %s\n", C->url->url);
continue;
- }
- else
- {
- LogError("Collector: no server available\n");
- rv = HANDLER_COLLECTOR;
+ } else {
+ LogError("M/Monit: no server available\n");
+ rv = HANDLER_MMONIT;
goto exit2;
}
}
D = status_xml(E, LEVEL_FULL);
- if(!data_send(C, D))
- {
- LogError("Collector: communication failure\n");
- rv = HANDLER_COLLECTOR;
+ if(!data_send(C, D)) {
+ LogError("M/Monit: communication failed\n");
+ rv = HANDLER_MMONIT;
goto exit1;
}
- if(!data_check(C))
- {
- LogError("Collector: communication failure\n");
- rv = HANDLER_COLLECTOR;
+
+ /* Close write part of socket to indicate to M/Monit that message was sent
+ and stop M/Monit XML parser from waiting for more data */
+ socket_shutdown_write(C->socket);
+
+ if(!data_check(C)) {
+ LogError("M/Monit: communication failed (%s message)\n", E ? "event" : "status");
+ rv = HANDLER_MMONIT;
goto exit1;
}
- DEBUG("Collector: %s message send to %s\n", E?"event":"status", C->url->url);
+ DEBUG("M/Monit: %s message sent to %s\n", E ? "event" : "status", C->url->url);
exit1:
FREE(D);
if(C->socket)
- {
socket_free(&C->socket);
- }
exit2:
- unset_signal_block(&os);
return rv;
}
@@ -137,16 +132,15 @@
/**
* Send message to the server
- * @param C An collector object
+ * @param C An mmonit object
* @param D Data to send
* @return TRUE if the message sending succeeded otherwise FALSE
*/
-static int data_send(Collector_T C, char *D) {
-
+static int data_send(Mmonit_T C, char *D) {
int rv;
char *auth;
- auth = Util_getBasicAuthHeader();
+ auth = Util_getBasicAuthHeader(C->url->user, C->url->password);
rv = socket_print(C->socket,
"POST %s HTTP/1.1\r\n"
"Host: %s:%d\r\n"
@@ -166,10 +160,8 @@
auth?auth:"",
D);
FREE(auth);
- if(rv <0)
- {
- LogError("Collector: error sending data to %s -- %s\n",
- C->url->url, STRERROR);
+ if(rv <0) {
+ LogError("M/Monit: error sending data to %s -- %s\n", C->url->url, STRERROR);
return FALSE;
}
return TRUE;
@@ -178,25 +170,22 @@
/**
* Check that the server returns a valid HTTP response
- * @param C An collector object
+ * @param C An mmonit object
* @return TRUE if the response is valid otherwise FALSE
*/
-static int data_check(Collector_T C) {
-
+static int data_check(Mmonit_T C) {
int n;
int status;
char buf[STRLEN];
if(!socket_readln(C->socket, buf, sizeof(buf))) {
- LogError("Collector: error receiving data from %s -- %s\n",
- C->url->url, STRERROR);
+ LogError("M/Monit: error receiving data from %s -- %s\n", C->url->url, STRERROR);
return FALSE;
}
Util_chomp(buf);
n = sscanf(buf, "%*s %d", &status);
if(n != 1 || (status >= 400)) {
- LogError("Collector: message sending failed to %s -- %s\n",
- C->url->url, buf);
+ LogError("M/Monit: message sending failed to %s -- %s\n", C->url->url, buf);
return FALSE;
}
return TRUE;
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/config.h.in /tmp/QeMlhPoI46/monit-5.0.3/config.h.in
--- monit-4.8.1/config.h.in 2006-05-16 20:16:24.000000000 +0100
+++ monit-5.0.3/config.h.in 2009-05-28 22:48:01.000000000 +0100
@@ -28,6 +28,9 @@
/* Define to 1 if CPU wait information is available. */
#undef HAVE_CPU_WAIT
+/* Define to 1 if you have the header file. */
+#undef HAVE_CRT_EXTERNS_H
+
/* Define to 1 if you have the header file. */
#undef HAVE_CRYPT_H
@@ -85,6 +88,12 @@
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
+/* Define to 1 if you have the `pam' library (-lpam). */
+#undef HAVE_LIBPAM
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_LIBPERFSTAT_H
+
/* Define to 1 if you have the `resolv' library (-lresolv). */
#undef HAVE_LIBRESOLV
@@ -158,6 +167,9 @@
/* Define to 1 if you have openssl. */
#undef HAVE_OPENSSL
+/* Define to 1 if you have the header file. */
+#undef HAVE_PAM_PAM_APPL_H
+
/* Define to 1 if you have the header file. */
#undef HAVE_PROCFS_H
@@ -176,6 +188,9 @@
/* Define to 1 if you have the header file. */
#undef HAVE_REGEX_H
+/* Define to 1 if you have the header file. */
+#undef HAVE_SECURITY_PAM_APPL_H
+
/* Define to 1 if you have the header file. */
#undef HAVE_SETJMP_H
@@ -228,6 +243,9 @@
/* Define to 1 if `tm_gmtoff' is member of `struct tm'. */
#undef HAVE_STRUCT_TM_TM_GMTOFF
+/* Define to 1 if you have the `syslog' function. */
+#undef HAVE_SYSLOG
+
/* Define to 1 if you have the header file. */
#undef HAVE_SYSLOG_H
@@ -240,6 +258,9 @@
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_DKSTAT_H
+/* Define to 1 if you have the header file. */
+#undef HAVE_SYS_DK_H
+
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_FILIO_H
@@ -285,6 +306,9 @@
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_SOCKET_H
+/* Define to 1 if you have the header file. */
+#undef HAVE_SYS_STATFS_H
+
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_STATVFS_H
@@ -294,6 +318,9 @@
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_SYSCTL_H
+/* Define to 1 if you have the header file. */
+#undef HAVE_SYS_SYSTEMCFG_H
+
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_TIME_H
@@ -309,6 +336,9 @@
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_USER_H
+/* Define to 1 if you have the header file. */
+#undef HAVE_SYS_UTSNAME_H
+
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_VFS_H
@@ -357,6 +387,9 @@
/* Define to 1 if you have the header file. */
#undef HAVE_VM_VM_OBJECT_H
+/* Define to 1 if you have the `vsyslog' function. */
+#undef HAVE_VSYSLOG
+
/* Define to 1 if `fork' works. */
#undef HAVE_WORKING_FORK
@@ -422,6 +455,12 @@
`char[]'. */
#undef YYTEXT_POINTER
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
+
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/configure /tmp/QeMlhPoI46/monit-5.0.3/configure
--- monit-4.8.1/configure 2006-05-16 20:16:25.000000000 +0100
+++ monit-5.0.3/configure 2009-05-28 22:48:01.000000000 +0100
@@ -1,7 +1,7 @@
#! /bin/sh
-# From configure.ac Revision: 1.137 .
+# From configure.ac Revision: 1.194 .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59d for monit 4.8.1.
+# Generated by GNU Autoconf 2.61 for monit 5.0.3.
#
# Report bugs to .
#
@@ -13,7 +13,8 @@
## M4sh Initialization. ##
## --------------------- ##
-# Be Bourne compatible
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
@@ -22,10 +23,13 @@
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
- case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
+
+
# PATH needs CR
@@ -218,7 +222,7 @@
else
as_candidate_shells=
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
@@ -233,10 +237,9 @@
for as_shell in $as_candidate_shells $SHELL; do
- # Try only shells which exist, to save several forks.
- if test -f $as_shell &&
- { ($as_shell) 2> /dev/null <<\_ASEOF
-# Be Bourne compatible
+ # Try only shells that exist, to save several forks.
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { ("$as_shell") 2> /dev/null <<\_ASEOF
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
@@ -245,18 +248,19 @@
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
- case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
+
:
_ASEOF
}; then
CONFIG_SHELL=$as_shell
as_have_required=yes
- if { $as_shell 2> /dev/null <<\_ASEOF
-# Be Bourne compatible
+ if { "$as_shell" 2> /dev/null <<\_ASEOF
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
@@ -265,10 +269,12 @@
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
- case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
+
:
(as_func_return () {
@@ -460,7 +466,7 @@
}
-if (dirname -- /) >/dev/null 2>&1; then
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
as_dirname=dirname
else
as_dirname=false
@@ -515,19 +521,28 @@
as_mkdir_p=false
fi
-# Find out whether ``test -x'' works. Don't use a zero-byte file, as
-# systems may use methods other than mode bits to determine executability.
-cat >conf$$.file <<_ASEOF
-#! /bin/sh
-exit 0
-_ASEOF
-chmod +x conf$$.file
-if test -x conf$$.file >/dev/null 2>&1; then
- as_executable_p="test -x"
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
else
- as_executable_p=:
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
fi
-rm -f conf$$.file
+as_executable_p=$as_test_x
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -560,44 +575,44 @@
# Identity of this package.
PACKAGE_NAME='monit'
PACKAGE_TARNAME='monit'
-PACKAGE_VERSION='4.8.1'
-PACKAGE_STRING='monit 4.8.1'
+PACKAGE_VERSION='5.0.3'
+PACKAGE_STRING='monit 5.0.3'
PACKAGE_BUGREPORT='monit-general@nongnu.org'
ac_unique_file="monitor.c"
# Factoring default headers for most tests.
ac_includes_default="\
#include
-#if HAVE_SYS_TYPES_H
+#ifdef HAVE_SYS_TYPES_H
# include
#endif
-#if HAVE_SYS_STAT_H
+#ifdef HAVE_SYS_STAT_H
# include
#endif
-#if STDC_HEADERS
+#ifdef STDC_HEADERS
# include
# include
#else
-# if HAVE_STDLIB_H
+# ifdef HAVE_STDLIB_H
# include
# endif
#endif
-#if HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
# include
# endif
# include
#endif
-#if HAVE_STRINGS_H
+#ifdef HAVE_STRINGS_H
# include
#endif
-#if HAVE_INTTYPES_H
+#ifdef HAVE_INTTYPES_H
# include
#endif
-#if HAVE_STDINT_H
+#ifdef HAVE_STDINT_H
# include
#endif
-#if HAVE_UNISTD_H
+#ifdef HAVE_UNISTD_H
# include
#endif"
@@ -653,17 +668,15 @@
INSTALL_DATA
SET_MAKE
LEX
-LEXLIB
LEX_OUTPUT_ROOT
+LEXLIB
YACC
-YFLAGS
LIBOBJS
NEED_SETGID
KMEM_GROUP
GETLOADAVG_LIBS
EXTERNALS
ARCH
-PROCARCH
sslincldir
ssllibdir
LTLIBOBJS'
@@ -674,10 +687,9 @@
CC
CFLAGS
LDFLAGS
+LIBS
CPPFLAGS
-CPP
-YACC
-YFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -783,10 +795,10 @@
-disable-* | --disable-*)
ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid feature name: $ac_feature" >&2
{ (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
eval enable_$ac_feature=no ;;
-docdir | --docdir | --docdi | --doc | --do)
@@ -802,10 +814,10 @@
-enable-* | --enable-*)
ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid feature name: $ac_feature" >&2
{ (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
eval enable_$ac_feature=\$ac_optarg ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
@@ -999,19 +1011,19 @@
-with-* | --with-*)
ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid package name: $ac_package" >&2
{ (exit 1); exit 1; }; }
- ac_package=`echo $ac_package| sed 's/-/_/g'`
+ ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
eval with_$ac_package=\$ac_optarg ;;
-without-* | --without-*)
ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid package name: $ac_package" >&2
{ (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/-/_/g'`
+ ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
eval with_$ac_package=no ;;
--x)
@@ -1180,7 +1192,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures monit 4.8.1 to adapt to many kinds of systems.
+\`configure' configures monit 5.0.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1241,14 +1253,19 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of monit 4.8.1:";;
+ short | recursive ) echo "Configuration of monit 5.0.3:";;
esac
cat <<\_ACEOF
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-largefile omit support for large files
+
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --without-resource disable resouce monitoring (default: enabled)
+ --without-largefiles disable large files support (default: enabled)
--without-ssl disable the use of ssl (default: enabled)
--with-ssl-dir=DIR location of SSL installation
--with-ssl-incl-dir=DIR location of installed SSL include files
@@ -1259,14 +1276,10 @@
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L if you have libraries in a
nonstandard directory
+ LIBS libraries to pass to the linker, e.g. -l
CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if
you have headers in a nonstandard directory
CPP C preprocessor
- YACC The `Yet Another C Compiler' implementation to use. Defaults to
- the first program found out of: `bison -y', `byacc', `yacc'.
- YFLAGS The list of arguments that will be passed by default to $YACC.
- This script will default YFLAGS to the empty string to avoid a
- default value of `-d' given by some make applications.
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -1279,7 +1292,7 @@
if test "$ac_init_help" = "recursive"; then
# If there are subdirs, report their specific --help.
for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d $ac_dir || continue
+ test -d "$ac_dir" || continue
ac_builddir=.
case "$ac_dir" in
@@ -1316,12 +1329,12 @@
cd "$ac_dir" || { ac_status=$?; continue; }
# Check for guested configure.
- if test -f $ac_srcdir/configure.gnu; then
+ if test -f "$ac_srcdir/configure.gnu"; then
echo &&
- $SHELL $ac_srcdir/configure.gnu --help=recursive
- elif test -f $ac_srcdir/configure; then
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
echo &&
- $SHELL $ac_srcdir/configure --help=recursive
+ $SHELL "$ac_srcdir/configure" --help=recursive
else
echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi || ac_status=$?
@@ -1332,8 +1345,8 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-monit configure 4.8.1
-generated by GNU Autoconf 2.59d
+monit configure 5.0.3
+generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -1346,8 +1359,8 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by monit $as_me 4.8.1, which was
-generated by GNU Autoconf 2.59d. Invocation command line was
+It was created by monit $as_me 5.0.3, which was
+generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -1407,7 +1420,6 @@
ac_configure_args=
ac_configure_args0=
ac_configure_args1=
-ac_sep=
ac_must_keep_next=false
for ac_pass in 1 2
do
@@ -1440,9 +1452,7 @@
-* ) ac_must_keep_next=true ;;
esac
fi
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
+ ac_configure_args="$ac_configure_args '$ac_arg'"
;;
esac
done
@@ -1506,6 +1516,9 @@
for ac_var in $ac_subst_vars
do
eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
echo "$ac_var='\''$ac_val'\''"
done | sort
echo
@@ -1520,6 +1533,9 @@
for ac_var in $ac_subst_files
do
eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
echo "$ac_var='\''$ac_val'\''"
done | sort
echo
@@ -1606,8 +1622,8 @@
{ echo "$as_me:$LINENO: loading cache $cache_file" >&5
echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
esac
fi
else
@@ -1727,7 +1743,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -1767,7 +1783,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="gcc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -1824,7 +1840,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -1865,7 +1881,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -1923,7 +1939,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -1967,7 +1983,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2020,36 +2036,37 @@
# Provide some information about the compiler.
echo "$as_me:$LINENO: checking for C compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version >&5\"") >&5
- (eval $ac_compiler --version >&5) 2>&5
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler --version >&5") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v >&5\"") >&5
- (eval $ac_compiler -v >&5) 2>&5
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -v >&5") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V >&5\"") >&5
- (eval $ac_compiler -V >&5) 2>&5
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -V >&5") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
-
-# List of possible output files. We want to start from the most likely,
-# but we have to check foo.exe before foo, because Cygwin `test -f' looks
-# also for foo.exe. b.out is created by i960 compilers.
-# As a last resort, we also try wildcards: `conftest.*' and `a.*'.
-# But we are not allowed to rm a.*, and we do not want always remove
-# conftest.*, so we will list them literally, when appropriate.
-ac_outfiles="a_out.exe a.out conftest.exe conftest a.exe b.out"
-
-# The IRIX 6 linker writes into existing files which may not be
-# executable, retaining their permissions. Remove them first so a
-# subsequent execution test works.
-rm -f $ac_outfiles conftest.*
-
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -2065,41 +2082,82 @@
return 0;
}
_ACEOF
-
ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $ac_outfiles"
-
-# The following tests should remove their output except files matching conftest.*.
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+#
+# List of possible output files, starting from the most likely.
+# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
+# only as a last resort. b.out is created by i960 compilers.
+ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
+#
+# The IRIX 6 linker writes into existing files which may not be
+# executable, retaining their permissions. Remove them first so a
+# subsequent execution test works.
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
- (eval $ac_link_default) 2>&5
+if { (ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link_default") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- for ac_file in $ac_outfiles a.* conftest.* NO
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
do
test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
- * ) break;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
esac
done
-if test "$ac_file" = NO; then
- { { echo "$as_me:$LINENO: error: no output file found
-See \`config.log' for more details." >&5
-echo "$as_me: error: no output file found
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
+test "$ac_cv_exeext" = no && ac_cv_exeext=
else
+ ac_file=''
+fi
+
+{ echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6; }
+if test -z "$ac_file"; then
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -2110,8 +2168,8 @@
{ (exit 77); exit 77; }; }
fi
-{ echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
# Check that the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
@@ -2120,8 +2178,12 @@
# If not cross compiling, check that we can run a simple program.
if test "$cross_compiling" != yes; then
if { ac_try='./$ac_file'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -2143,9 +2205,10 @@
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
-# Clean up; list also $ac_file, in case it matched a wildcard entry.
-rm -f $ac_outfiles $ac_file
-
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
@@ -2153,64 +2216,72 @@
{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
-if test "${ac_cv_exeext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- # If both `conftest.exe' and `conftest' are `present' (well, observable),
- # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
- # work properly (i.e., refer to `conftest.exe'), while it won't with `rm'.
- for ac_file in conftest.exe conftest conftest.* NO; do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- break;;
- * ) break;;
- esac
- done
- if test "$ac_file" = NO; then
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: no output file found
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: no output file found
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
- # Clean up; list also $ac_file, in case it matched conftest.*.
- rm -f $ac_outfiles $ac_file
-
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
else
{ { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
-
fi
-
-fi
+rm -f conftest$ac_cv_exeext
{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
echo "${ECHO_T}$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
-
-
-ac_clean_files=$ac_clean_files_save
-
{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
if test "${ac_cv_objext+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
@@ -2233,14 +2304,12 @@
{ (exit 1); exit 1; }; }
fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
echo "${ECHO_T}$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-
-
-rm -f conftest.*
{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
if test "${ac_cv_c_compiler_gnu+set}" = set; then
@@ -2265,26 +2334,22 @@
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_compiler_gnu=yes
else
echo "$as_me: failed program was:" >&5
@@ -2293,7 +2358,7 @@
ac_compiler_gnu=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
@@ -2327,26 +2392,22 @@
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_prog_cc_g=yes
else
echo "$as_me: failed program was:" >&5
@@ -2369,26 +2430,22 @@
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
:
else
echo "$as_me: failed program was:" >&5
@@ -2412,26 +2469,22 @@
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_prog_cc_g=yes
else
echo "$as_me: failed program was:" >&5
@@ -2440,13 +2493,13 @@
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
fi
{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
@@ -2511,6 +2564,11 @@
that's true only with -std. */
int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
@@ -2530,26 +2588,22 @@
do
CC="$ac_save_CC $ac_arg"
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_prog_cc_c89=$ac_arg
else
echo "$as_me: failed program was:" >&5
@@ -2558,7 +2612,7 @@
fi
-rm -f conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext
test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
@@ -2627,24 +2681,22 @@
#endif
Syntax error
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
:
else
echo "$as_me: failed program was:" >&5
@@ -2666,24 +2718,22 @@
/* end confdefs.h. */
#include
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
# Broken: success on invalid input.
continue
else
@@ -2736,24 +2786,22 @@
#endif
Syntax error
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
:
else
echo "$as_me: failed program was:" >&5
@@ -2775,24 +2823,22 @@
/* end confdefs.h. */
#include
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
# Broken: success on invalid input.
continue
else
@@ -2847,7 +2893,7 @@
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
@@ -2873,7 +2919,7 @@
# 10*(2^10) chars as input seems more than enough
test $ac_count -gt 10 && break
done
- rm -f conftest.*;;
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac
@@ -2929,7 +2975,7 @@
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
@@ -2955,7 +3001,7 @@
# 10*(2^10) chars as input seems more than enough
test $ac_count -gt 10 && break
done
- rm -f conftest.*;;
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac
@@ -3039,29 +3085,35 @@
fi
ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ if test -f "$ac_dir/install-sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
break
- elif test -f $ac_dir/install.sh; then
+ elif test -f "$ac_dir/install.sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
- elif test -f $ac_dir/shtool; then
+ elif test -f "$ac_dir/shtool"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/shtool install -c"
break
fi
done
if test -z "$ac_aux_dir"; then
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
{ (exit 1); exit 1; }; }
fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
@@ -3099,7 +3151,7 @@
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
@@ -3145,25 +3197,25 @@
{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.make <<\_ACEOF
SHELL = /bin/sh
all:
- @echo 'ac_maketemp=X"$(MAKE)"'
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
_ACEOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
-if test "$ac_maketemp" != X ; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
rm -f conftest.make
fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
SET_MAKE=
@@ -3191,7 +3243,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_LEX="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3216,178 +3268,108 @@
done
test -n "$LEX" || LEX=":"
-if test -z "$LEXLIB"
-then
- { echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5
-echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6; }
-if test "${ac_cv_lib_fl_yywrap+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lfl $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
+if test "x$LEX" != "x:"; then
+ cat >conftest.l <<_ACEOF
+%%
+a { ECHO; }
+b { REJECT; }
+c { yymore (); }
+d { yyless (1); }
+e { yyless (input () != 0); }
+f { unput (yytext[0]); }
+. { BEGIN INITIAL; }
+%%
+#ifdef YYTEXT_POINTER
+extern char *yytext;
#endif
-char yywrap ();
int
-main ()
+main (void)
{
-return yywrap ();
- ;
- return 0;
+ return ! yylex () + ! yywrap ();
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+{ (ac_try="$LEX conftest.l"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$LEX conftest.l") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_fl_yywrap=yes
+ (exit $ac_status); }
+{ echo "$as_me:$LINENO: checking lex output file root" >&5
+echo $ECHO_N "checking lex output file root... $ECHO_C" >&6; }
+if test "${ac_cv_prog_lex_root+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_fl_yywrap=no
+if test -f lex.yy.c; then
+ ac_cv_prog_lex_root=lex.yy
+elif test -f lexyy.c; then
+ ac_cv_prog_lex_root=lexyy
+else
+ { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
+echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
+ { (exit 1); exit 1; }; }
fi
-
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5
-echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6; }
-if test $ac_cv_lib_fl_yywrap = yes; then
- LEXLIB="-lfl"
-else
- { echo "$as_me:$LINENO: checking for yywrap in -ll" >&5
-echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6; }
-if test "${ac_cv_lib_l_yywrap+set}" = set; then
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
+echo "${ECHO_T}$ac_cv_prog_lex_root" >&6; }
+LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
+
+if test -z "${LEXLIB+set}"; then
+ { echo "$as_me:$LINENO: checking lex library" >&5
+echo $ECHO_N "checking lex library... $ECHO_C" >&6; }
+if test "${ac_cv_lib_lex+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ll $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char yywrap ();
-int
-main ()
-{
-return yywrap ();
- ;
- return 0;
-}
+ ac_save_LIBS=$LIBS
+ ac_cv_lib_lex='none needed'
+ for ac_lib in '' -lfl -ll; do
+ LIBS="$ac_lib $ac_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+`cat $LEX_OUTPUT_ROOT.c`
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_l_yywrap=yes
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_lex=$ac_lib
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_l_yywrap=no
+
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ test "$ac_cv_lib_lex" != 'none needed' && break
+ done
+ LIBS=$ac_save_LIBS
+
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5
-echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6; }
-if test $ac_cv_lib_l_yywrap = yes; then
- LEXLIB="-ll"
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_lex" >&5
+echo "${ECHO_T}$ac_cv_lib_lex" >&6; }
+ test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
fi
-fi
-
-fi
-
-if test "x$LEX" != "x:"; then
- { echo "$as_me:$LINENO: checking lex output file root" >&5
-echo $ECHO_N "checking lex output file root... $ECHO_C" >&6; }
-if test "${ac_cv_prog_lex_root+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # The minimal lex program is just a single line: %%. But some broken lexes
-# (Solaris, I think it was) want two %% lines, so accommodate them.
-cat >conftest.l <<_ACEOF
-%%
-%%
-_ACEOF
-{ (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5
- (eval $LEX conftest.l) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-if test -f lex.yy.c; then
- ac_cv_prog_lex_root=lex.yy
-elif test -f lexyy.c; then
- ac_cv_prog_lex_root=lexyy
-else
- { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
-echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
- { (exit 1); exit 1; }; }
-fi
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
-echo "${ECHO_T}$ac_cv_prog_lex_root" >&6; }
-rm -f conftest.l
-LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
{ echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6; }
@@ -3395,36 +3377,33 @@
echo $ECHO_N "(cached) $ECHO_C" >&6
else
# POSIX says lex can declare yytext either as a pointer or an array; the
-# default is implementation-dependent. Figure out which it is, since
+# default is implementation-dependent. Figure out which it is, since
# not all implementations provide the %pointer and %array declarations.
ac_cv_prog_lex_yytext_pointer=no
-echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
ac_save_LIBS=$LIBS
-LIBS="$LIBS $LEXLIB"
+LIBS="$LEXLIB $ac_save_LIBS"
cat >conftest.$ac_ext <<_ACEOF
+#define YYTEXT_POINTER 1
`cat $LEX_OUTPUT_ROOT.c`
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_prog_lex_yytext_pointer=yes
else
echo "$as_me: failed program was:" >&5
@@ -3433,10 +3412,9 @@
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_save_LIBS
-rm -f "${LEX_OUTPUT_ROOT}.c"
fi
{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
@@ -3448,6 +3426,7 @@
_ACEOF
fi
+rm -f conftest.l $LEX_OUTPUT_ROOT.c
fi
if test "$LEX" != flex; then
@@ -3455,7 +3434,7 @@
echo "$as_me: error: monit requires flex, not lex" >&2;}
{ (exit 1); exit 1; }; }
fi
-for ac_prog in 'bison -y' byacc
+for ac_prog in 'bison -y' byacc yacc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
@@ -3473,7 +3452,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_YACC="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3496,8 +3475,12 @@
test -n "$YACC" && break
done
-test -n "$YACC" || YACC="yacc"
+if test "x$YACC" = "x"; then
+ { { echo "$as_me:$LINENO: error: monit requires bison, byacc or yacc" >&5
+echo "$as_me: error: monit requires bison, byacc or yacc" >&2;}
+ { (exit 1); exit 1; }; }
+fi
# ------------------------------------------------------------------------
# Libraries
@@ -3535,26 +3518,23 @@
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_socket_socket=yes
else
echo "$as_me: failed program was:" >&5
@@ -3563,7 +3543,7 @@
ac_cv_lib_socket_socket=no
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -3609,26 +3589,23 @@
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_inet_socket=yes
else
echo "$as_me: failed program was:" >&5
@@ -3637,7 +3614,7 @@
ac_cv_lib_inet_socket=no
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -3683,26 +3660,23 @@
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_nsl_inet_addr=yes
else
echo "$as_me: failed program was:" >&5
@@ -3711,7 +3685,7 @@
ac_cv_lib_nsl_inet_addr=no
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -3757,26 +3731,23 @@
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_resolv_inet_aton=yes
else
echo "$as_me: failed program was:" >&5
@@ -3785,7 +3756,7 @@
ac_cv_lib_resolv_inet_aton=no
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -3831,26 +3802,23 @@
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_crypt_crypt=yes
else
echo "$as_me: failed program was:" >&5
@@ -3859,7 +3827,7 @@
ac_cv_lib_crypt_crypt=no
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -3875,6 +3843,77 @@
fi
+{ echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
+echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6; }
+if test "${ac_cv_lib_pam_pam_start+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpam $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pam_start ();
+int
+main ()
+{
+return pam_start ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_pam_pam_start=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_pam_pam_start=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
+echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6; }
+if test $ac_cv_lib_pam_pam_start = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBPAM 1
+_ACEOF
+
+ LIBS="-lpam $LIBS"
+
+fi
+
+
# Wacky pthread madness
pthread_libs=""
{ echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
@@ -3907,26 +3946,23 @@
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_pthread_pthread_create=yes
else
echo "$as_me: failed program was:" >&5
@@ -3935,7 +3971,7 @@
ac_cv_lib_pthread_pthread_create=no
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -3975,26 +4011,23 @@
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_c_r_pthread_create=yes
else
echo "$as_me: failed program was:" >&5
@@ -4003,7 +4036,7 @@
ac_cv_lib_c_r_pthread_create=no
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -4048,26 +4081,22 @@
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_header_stdc=yes
else
echo "$as_me: failed program was:" >&5
@@ -4076,7 +4105,7 @@
ac_cv_header_stdc=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
@@ -4157,13 +4186,22 @@
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -4223,26 +4261,22 @@
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_header_sys_wait_h=yes
else
echo "$as_me: failed program was:" >&5
@@ -4251,7 +4285,7 @@
ac_cv_header_sys_wait_h=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
@@ -4278,38 +4312,48 @@
#include
#if defined S_ISBLK && defined S_IFDIR
-# if S_ISBLK (S_IFDIR)
-You lose.
-# endif
+extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
#endif
#if defined S_ISBLK && defined S_IFCHR
-# if S_ISBLK (S_IFCHR)
-You lose.
-# endif
+extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
#endif
#if defined S_ISLNK && defined S_IFREG
-# if S_ISLNK (S_IFREG)
-You lose.
-# endif
+extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
#endif
#if defined S_ISSOCK && defined S_IFREG
-# if S_ISSOCK (S_IFREG)
-You lose.
-# endif
+extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
#endif
_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "You lose" >/dev/null 2>&1; then
- ac_cv_header_stat_broken=yes
-else
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_header_stat_broken=no
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_header_stat_broken=yes
fi
-rm -f conftest*
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5
echo "${ECHO_T}$ac_cv_header_stat_broken" >&6; }
@@ -4346,26 +4390,22 @@
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_header_time=yes
else
echo "$as_me: failed program was:" >&5
@@ -4374,7 +4414,7 @@
ac_cv_header_time=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
echo "${ECHO_T}$ac_cv_header_time" >&6; }
@@ -4417,26 +4457,22 @@
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
eval "$as_ac_Header=yes"
else
echo "$as_me: failed program was:" >&5
@@ -4445,7 +4481,7 @@
eval "$as_ac_Header=no"
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
{ echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -4524,12 +4560,22 @@
+
+
+
+
+
+
+
+
+
for ac_header in \
alloca.h \
arpa/inet.h \
asm/page.h \
asm/param.h \
cf.h \
+ crt_externs.h \
ctype.h \
crypt.h \
dirent.h \
@@ -4540,10 +4586,12 @@
grp.h \
kvm.h \
kstat.h \
+ libperfstat.h \
limits.h \
loadavg.h \
locale.h \
mach/host_info.h \
+ mach/mach.h \
mach/mach_host.h \
memory.h \
mntent.h \
@@ -4551,11 +4599,13 @@
sys/socket.h \
netinet/in.h \
netinet/in_systm.h \
+ pam/pam_appl.h \
procfs.h \
procinfo.h \
pthread.h \
pwd.h \
regex.h \
+ security/pam_appl.h \
setjmp.h \
signal.h \
stdarg.h \
@@ -4565,6 +4615,7 @@
stropts.h \
sys/cfgodm.h \
sys/cfgdb.h \
+ sys/dk.h \
sys/dkstat.h \
sys/filio.h \
sys/ioctl.h \
@@ -4577,11 +4628,14 @@
sys/pstat.h \
sys/queue.h \
sys/resource.h \
+ sys/statfs.h \
sys/statvfs.h \
+ sys/systemcfg.h \
sys/time.h \
sys/tree.h \
sys/types.h \
sys/un.h \
+ sys/utsname.h \
sys/vmmeter.h \
sys/vfs.h \
syslog.h \
@@ -4615,26 +4669,22 @@
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
@@ -4643,7 +4693,7 @@
ac_header_compiler=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }
@@ -4658,24 +4708,22 @@
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
@@ -4772,26 +4820,22 @@
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
eval "$as_ac_Header=yes"
else
echo "$as_me: failed program was:" >&5
@@ -4800,7 +4844,7 @@
eval "$as_ac_Header=no"
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
{ echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -4855,26 +4899,22 @@
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
eval "$as_ac_Header=yes"
else
echo "$as_me: failed program was:" >&5
@@ -4883,7 +4923,7 @@
eval "$as_ac_Header=no"
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
{ echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -4930,26 +4970,22 @@
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
eval "$as_ac_Header=yes"
else
echo "$as_me: failed program was:" >&5
@@ -4958,7 +4994,7 @@
eval "$as_ac_Header=no"
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
{ echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -5022,26 +5058,22 @@
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
eval "$as_ac_Header=yes"
else
echo "$as_me: failed program was:" >&5
@@ -5050,7 +5082,7 @@
eval "$as_ac_Header=no"
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
{ echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -5094,26 +5126,22 @@
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
eval "$as_ac_Header=yes"
else
echo "$as_me: failed program was:" >&5
@@ -5122,7 +5150,7 @@
eval "$as_ac_Header=no"
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
{ echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -5176,26 +5204,22 @@
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
eval "$as_ac_Header=yes"
else
echo "$as_me: failed program was:" >&5
@@ -5204,7 +5228,7 @@
eval "$as_ac_Header=no"
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
{ echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -5245,26 +5269,22 @@
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_type_mode_t=yes
else
echo "$as_me: failed program was:" >&5
@@ -5273,7 +5293,7 @@
ac_cv_type_mode_t=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
@@ -5312,26 +5332,22 @@
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_type_pid_t=yes
else
echo "$as_me: failed program was:" >&5
@@ -5340,7 +5356,7 @@
ac_cv_type_pid_t=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
@@ -5379,26 +5395,22 @@
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_type_size_t=yes
else
echo "$as_me: failed program was:" >&5
@@ -5407,7 +5419,7 @@
ac_cv_type_size_t=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
@@ -5446,26 +5458,22 @@
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_type_pid_t=yes
else
echo "$as_me: failed program was:" >&5
@@ -5474,7 +5482,7 @@
ac_cv_type_pid_t=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
@@ -5511,26 +5519,22 @@
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_type_signal=int
else
echo "$as_me: failed program was:" >&5
@@ -5539,7 +5543,7 @@
ac_cv_type_signal=void
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
echo "${ECHO_T}$ac_cv_type_signal" >&6; }
@@ -5568,32 +5572,30 @@
int
main ()
{
-struct tm *tp; tp->tm_sec;
+struct tm tm;
+ int *p = &tm.tm_sec;
+ return !p;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_struct_tm=time.h
else
echo "$as_me: failed program was:" >&5
@@ -5602,7 +5604,7 @@
ac_cv_struct_tm=sys/time.h
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
@@ -5637,26 +5639,22 @@
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_member_struct_tm_tm_gmtoff=yes
else
echo "$as_me: failed program was:" >&5
@@ -5680,26 +5678,22 @@
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_member_struct_tm_tm_gmtoff=yes
else
echo "$as_me: failed program was:" >&5
@@ -5708,10 +5702,10 @@
ac_cv_member_struct_tm_tm_gmtoff=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6; }
@@ -5749,10 +5743,10 @@
#ifndef __cplusplus
/* Ultrix mips cc rejects this. */
typedef int charset[2];
- const charset x;
+ const charset cs;
/* SunOS 4.1.1 cc rejects this. */
- char const *const *ccp;
- char **p;
+ char const *const *pcpcc;
+ char **ppc;
/* NEC SVR4.0.2 mips cc rejects this. */
struct point {int x, y;};
static struct point const zero = {0,0};
@@ -5761,11 +5755,11 @@
an arm of an if-expression whose if-part is not a constant
expression */
const char *g = "string";
- ccp = &g + (g ? g-g : 0);
+ pcpcc = &g + (g ? g-g : 0);
/* HPUX 7.0 cc rejects these. */
- ++ccp;
- p = (char**) ccp;
- ccp = (char const *const *) p;
+ ++pcpcc;
+ ppc = (char**) pcpcc;
+ pcpcc = (char const *const *) ppc;
{ /* SCO 3.2v4 cc rejects this. */
char *t;
char const *s = 0 ? (char *) 0 : (char const *) 0;
@@ -5792,7 +5786,7 @@
const int foo = 10;
if (!foo) return 0;
}
- return !x[0] && !zero.x;
+ return !cs[0] && !zero.x;
#endif
;
@@ -5800,26 +5794,22 @@
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_c_const=yes
else
echo "$as_me: failed program was:" >&5
@@ -5828,7 +5818,7 @@
ac_cv_c_const=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
echo "${ECHO_T}$ac_cv_c_const" >&6; }
@@ -5858,7 +5848,8 @@
int
main ()
{
-#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
+ && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
bogus endian macros
#endif
@@ -5867,26 +5858,22 @@
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
# It does; now see whether it defined to BIG_ENDIAN or not.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -5909,26 +5896,22 @@
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_c_bigendian=yes
else
echo "$as_me: failed program was:" >&5
@@ -5937,7 +5920,7 @@
ac_cv_c_bigendian=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -5967,26 +5950,22 @@
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
ac_cv_c_bigendian=yes
fi
@@ -6005,7 +5984,7 @@
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -6032,13 +6011,22 @@
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -6057,7 +6045,7 @@
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
@@ -6102,36 +6090,33 @@
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
+#include
int
main ()
{
-error_at_line (0, 0, "", 0, "");
+error_at_line (0, 0, "", 0, "an error occurred");
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_error_at_line=yes
else
echo "$as_me: failed program was:" >&5
@@ -6140,7 +6125,7 @@
ac_cv_lib_error_at_line=no
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_error_at_line" >&5
@@ -6181,26 +6166,22 @@
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
@@ -6209,7 +6190,7 @@
ac_header_compiler=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }
@@ -6224,24 +6205,22 @@
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
@@ -6361,26 +6340,23 @@
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
@@ -6389,7 +6365,7 @@
eval "$as_ac_var=no"
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
@@ -6431,13 +6407,22 @@
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -6493,7 +6478,7 @@
/* Thanks to Paul Eggert for this test. */
$ac_includes_default
#include
-#if HAVE_VFORK_H
+#ifdef HAVE_VFORK_H
# include
#endif
/* On some sparc systems, changes by the child to local and incoming
@@ -6581,13 +6566,22 @@
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -6663,26 +6657,22 @@
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
@@ -6691,7 +6681,7 @@
ac_header_compiler=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }
@@ -6706,24 +6696,22 @@
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
@@ -6801,7 +6789,7 @@
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#if STDC_HEADERS || HAVE_STDLIB_H
+#if defined STDC_HEADERS || defined HAVE_STDLIB_H
# include
#else
char *malloc ();
@@ -6816,13 +6804,22 @@
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -6893,19 +6890,28 @@
/* Linux will dereference the symlink and fail.
That is better in the sense that it means we will not
have to compile and use the lstat wrapper. */
- return lstat ("conftest.sym/", &sbuf) != 0;
+ return lstat ("conftest.sym/", &sbuf) == 0;
;
return 0;
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -6974,13 +6980,22 @@
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -7069,26 +7084,23 @@
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
@@ -7097,7 +7109,7 @@
eval "$as_ac_var=no"
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
@@ -7140,26 +7152,23 @@
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_intl_strftime=yes
else
echo "$as_me: failed program was:" >&5
@@ -7168,7 +7177,7 @@
ac_cv_lib_intl_strftime=no
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -7240,26 +7249,23 @@
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
@@ -7268,7 +7274,7 @@
eval "$as_ac_var=no"
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
@@ -7337,26 +7343,23 @@
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
@@ -7365,7 +7368,7 @@
eval "$as_ac_var=no"
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
@@ -7434,26 +7437,23 @@
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
@@ -7462,7 +7462,7 @@
eval "$as_ac_var=no"
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
@@ -7531,26 +7531,23 @@
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
@@ -7559,7 +7556,7 @@
eval "$as_ac_var=no"
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
@@ -7574,22 +7571,12 @@
done
-
-# Check if we do need external GNU replacements
-ac_have_func=no # yes means we've found a way to get the load average.
-
-# Make sure getloadavg.c is where it belongs, at configure-time.
-test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
- { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
-echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
- { (exit 1); exit 1; }; }
-
-ac_save_LIBS=$LIBS
-
-# Check for getloadavg, but be sure not to touch the cache variable.
-({ echo "$as_me:$LINENO: checking for getloadavg" >&5
-echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6; }
-if test "${ac_cv_func_getloadavg+set}" = set; then
+for ac_func in syslog
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -7598,12 +7585,12 @@
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define getloadavg to an innocuous variant, in case declares getloadavg.
+/* Define $ac_func to an innocuous variant, in case declares $ac_func.
For example, HP-UX 11i declares gettimeofday. */
-#define getloadavg innocuous_getloadavg
+#define $ac_func innocuous_$ac_func
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char getloadavg (); below.
+ which can conflict with char $ac_func (); below.
Prefer to if __STDC__ is defined, since
exists even on freestanding compilers. */
@@ -7613,7 +7600,7 @@
# include
#endif
-#undef getloadavg
+#undef $ac_func
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
@@ -7621,66 +7608,64 @@
#ifdef __cplusplus
extern "C"
#endif
-char getloadavg ();
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined __stub_getloadavg || defined __stub___getloadavg
+#if defined __stub_$ac_func || defined __stub___$ac_func
choke me
#endif
int
main ()
{
-return getloadavg ();
+return $ac_func ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_getloadavg=yes
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_func_getloadavg=no
+ eval "$as_ac_var=no"
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
-echo "${ECHO_T}$ac_cv_func_getloadavg" >&6; }
-if test $ac_cv_func_getloadavg = yes; then
- exit 0
-else
- exit 1
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
-) && ac_have_func=yes
+done
-# On HPUX9, an unprivileged user can get load averages through this function.
-for ac_func in pstat_getdynamic
+for ac_func in vsyslog
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -7734,26 +7719,23 @@
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
@@ -7762,7 +7744,7 @@
eval "$as_ac_var=no"
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
@@ -7777,21 +7759,45 @@
done
-# Solaris has libkstat which does not require root.
+# Check if we do need external GNU replacements
+ac_have_func=no # yes means we've found a way to get the load average.
-{ echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
-echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6; }
-if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
+# Make sure getloadavg.c is where it belongs, at configure-time.
+test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
+ { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
+echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
+ { (exit 1); exit 1; }; }
+
+ac_save_LIBS=$LIBS
+
+# Check for getloadavg, but be sure not to touch the cache variable.
+({ echo "$as_me:$LINENO: checking for getloadavg" >&5
+echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6; }
+if test "${ac_cv_func_getloadavg+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lkstat $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+/* Define getloadavg to an innocuous variant, in case declares getloadavg.
+ For example, HP-UX 11i declares gettimeofday. */
+#define getloadavg innocuous_getloadavg
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char getloadavg (); below.
+ Prefer to if __STDC__ is defined, since
+ exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include
+#else
+# include
+#endif
+
+#undef getloadavg
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
@@ -7799,52 +7805,221 @@
#ifdef __cplusplus
extern "C"
#endif
-char kstat_open ();
+char getloadavg ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_getloadavg || defined __stub___getloadavg
+choke me
+#endif
+
int
main ()
{
-return kstat_open ();
+return getloadavg ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_kstat_kstat_open=yes
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_func_getloadavg=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_kstat_kstat_open=no
+ ac_cv_func_getloadavg=no
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
-echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6; }
-if test $ac_cv_lib_kstat_kstat_open = yes; then
- cat >>confdefs.h <<_ACEOF
+{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
+echo "${ECHO_T}$ac_cv_func_getloadavg" >&6; }
+if test $ac_cv_func_getloadavg = yes; then
+ exit 0
+else
+ exit 1
+fi
+) && ac_have_func=yes
+
+# On HPUX9, an unprivileged user can get load averages through this function.
+
+for ac_func in pstat_getdynamic
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case declares $ac_func.
+ For example, HP-UX 11i declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer to if __STDC__ is defined, since
+ exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include
+#else
+# include
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+# Solaris has libkstat which does not require root.
+
+{ echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
+echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6; }
+if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lkstat $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char kstat_open ();
+int
+main ()
+{
+return kstat_open ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_kstat_kstat_open=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_kstat_kstat_open=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
+echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6; }
+if test $ac_cv_lib_kstat_kstat_open = yes; then
+ cat >>confdefs.h <<_ACEOF
#define HAVE_LIBKSTAT 1
_ACEOF
@@ -7889,26 +8064,23 @@
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_elf_elf_begin=yes
else
echo "$as_me: failed program was:" >&5
@@ -7917,7 +8089,7 @@
ac_cv_lib_elf_elf_begin=no
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -7959,26 +8131,23 @@
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_kvm_kvm_open=yes
else
echo "$as_me: failed program was:" >&5
@@ -7987,7 +8156,7 @@
ac_cv_lib_kvm_kvm_open=no
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -8028,26 +8197,23 @@
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_util_getloadavg=yes
else
echo "$as_me: failed program was:" >&5
@@ -8056,7 +8222,7 @@
ac_cv_lib_util_getloadavg=no
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -8103,26 +8269,23 @@
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_getloadavg_getloadavg=yes
else
echo "$as_me: failed program was:" >&5
@@ -8131,7 +8294,7 @@
ac_cv_lib_getloadavg_getloadavg=no
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -8202,26 +8365,23 @@
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
@@ -8230,7 +8390,7 @@
eval "$as_ac_var=no"
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
@@ -8277,26 +8437,22 @@
#include
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
@@ -8305,7 +8461,7 @@
ac_header_compiler=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }
@@ -8320,24 +8476,22 @@
/* end confdefs.h. */
#include
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
@@ -8429,26 +8583,23 @@
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_dgc_dg_sys_info=yes
else
echo "$as_me: failed program was:" >&5
@@ -8457,7 +8608,7 @@
ac_cv_lib_dgc_dg_sys_info=no
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -8498,26 +8649,22 @@
#include
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
@@ -8526,7 +8673,7 @@
ac_header_compiler=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }
@@ -8541,24 +8688,22 @@
/* end confdefs.h. */
#include
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
@@ -8669,26 +8814,23 @@
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
@@ -8697,7 +8839,7 @@
eval "$as_ac_var=no"
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
@@ -8747,26 +8889,22 @@
#include
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
@@ -8775,7 +8913,7 @@
ac_header_compiler=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }
@@ -8790,24 +8928,22 @@
/* end confdefs.h. */
#include
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
@@ -8901,26 +9037,22 @@
#include
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
@@ -8929,7 +9061,7 @@
ac_header_compiler=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }
@@ -8944,24 +9076,22 @@
/* end confdefs.h. */
#include
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
@@ -9053,26 +9183,22 @@
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
@@ -9081,7 +9207,7 @@
ac_header_compiler=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }
@@ -9096,24 +9222,22 @@
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
@@ -9206,26 +9330,22 @@
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
@@ -9234,7 +9354,7 @@
ac_header_compiler=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }
@@ -9249,24 +9369,22 @@
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
@@ -9349,26 +9467,22 @@
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_member_struct_nlist_n_un_n_name=yes
else
echo "$as_me: failed program was:" >&5
@@ -9393,26 +9507,22 @@
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_member_struct_nlist_n_un_n_name=yes
else
echo "$as_me: failed program was:" >&5
@@ -9421,10 +9531,10 @@
ac_cv_member_struct_nlist_n_un_n_name=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6; }
@@ -9575,26 +9685,23 @@
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
@@ -9603,7 +9710,7 @@
eval "$as_ac_var=no"
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
@@ -9646,26 +9753,22 @@
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
@@ -9674,7 +9777,7 @@
ac_header_compiler=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }
@@ -9689,24 +9792,22 @@
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
@@ -9885,13 +9986,22 @@
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -9953,26 +10063,22 @@
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
@@ -9992,7 +10098,7 @@
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: checking for va_copy" >&5
echo $ECHO_N "checking for va_copy... $ECHO_C" >&6; }
@@ -10018,26 +10124,23 @@
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
@@ -10057,7 +10160,7 @@
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
# ------------------------------------------------------------------------
@@ -10130,6 +10233,11 @@
then
ARCH="HPUX"
CFLAGS="$CFLAGS -D _REENTRANT"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CPU_WAIT 1
+_ACEOF
+
elif test `uname` = "OpenBSD"
then
ARCH="OPENBSD"
@@ -10158,52 +10266,29 @@
LIBS="$LIBS -lodm"
# AIX v. 5.2
LIBS="$LIBS -lcfg"
-else
- { echo "$as_me:$LINENO: WARNING: Architecture not supported: \`uname\`." >&5
-echo "$as_me: WARNING: Architecture not supported: \`uname\`." >&2;}
- CFLAGS="$CFLAGS -D _REENTRANT"
- ARCH="UNKNOWN"
-fi
-
-
-# ------------------------------------------------------------------------
-# Resource code
-# ------------------------------------------------------------------------
-
-# Check if we want to have resource support
-{ echo "$as_me:$LINENO: checking for resource support" >&5
-echo $ECHO_N "checking for resource support... $ECHO_C" >&6; }
-
-# Check whether --with-resource was given.
-if test "${with_resource+set}" = set; then
- withval=$with_resource;
- if test "x$withval" = "xno" ; then
- use_resource=0
- { echo "$as_me:$LINENO: result: disabled" >&5
-echo "${ECHO_T}disabled" >&6; }
- fi
- if test "x$withval" = "xyes" ; then
- use_resource=1
- { echo "$as_me:$LINENO: result: enabled" >&5
-echo "${ECHO_T}enabled" >&6; }
- fi
-
-else
-
- use_resource=1
- { echo "$as_me:$LINENO: result: enabled" >&5
-echo "${ECHO_T}enabled" >&6; }
+ # AIX v. 5.3
+ LIBS="$LIBS -lperfstat"
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CPU_WAIT 1
+_ACEOF
+else
+ { echo "$as_me:$LINENO: WARNING: Architecture not supported: \`uname\`." >&5
+echo "$as_me: WARNING: Architecture not supported: \`uname\`." >&2;}
+ CFLAGS="$CFLAGS -D _REENTRANT"
+ ARCH="UNKNOWN"
fi
-# Settings for resource support
-if test "$use_resource" = 1; then
- # Test for kvm libs
- kvm_libs=""
- if test "$test_kvm"; then
- { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
+# ------------------------------------------------------------------------
+# Resource code
+# ------------------------------------------------------------------------
+
+# Test for kvm libs
+kvm_libs=""
+if test "$test_kvm"; then
+ { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6; }
if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10233,26 +10318,23 @@
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_kvm_kvm_open=yes
else
echo "$as_me: failed program was:" >&5
@@ -10261,7 +10343,7 @@
ac_cv_lib_kvm_kvm_open=no
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -10271,14 +10353,14 @@
kvm_libs="-lkvm"
fi
- if test "$kvm_libs"
- then
- LIBS="$LIBS $kvm_libs"
- fi
- fi
- kstat_libs=""
- if test "$test_kstat"; then
- { echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
+ if test "$kvm_libs"
+ then
+ LIBS="$LIBS $kvm_libs"
+ fi
+fi
+kstat_libs=""
+if test "$test_kstat"; then
+ { echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6; }
if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10308,26 +10390,23 @@
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
ac_cv_lib_kstat_kstat_open=yes
else
echo "$as_me: failed program was:" >&5
@@ -10336,7 +10415,7 @@
ac_cv_lib_kstat_kstat_open=no
fi
-rm -f conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
@@ -10346,16 +10425,418 @@
kstat_libs="-lkstat"
fi
- if test "$kstat_libs"
- then
- LIBS="$LIBS $kstat_libs"
- fi
+ if test "$kstat_libs"
+ then
+ LIBS="$LIBS $kstat_libs"
+ fi
+fi
+
+
+# ------------------------------------------------------------------------
+# Large files code
+# ------------------------------------------------------------------------
+
+# Check if we want to have large files support
+{ echo "$as_me:$LINENO: checking for large files support" >&5
+echo $ECHO_N "checking for large files support... $ECHO_C" >&6; }
+
+# Check whether --with-largefiles was given.
+if test "${with_largefiles+set}" = set; then
+ withval=$with_largefiles;
+ if test "x$withval" = "xno" ; then
+ use_largefiles=0
+ { echo "$as_me:$LINENO: result: disabled" >&5
+echo "${ECHO_T}disabled" >&6; }
+ fi
+ if test "x$withval" = "xyes" ; then
+ use_largefiles=1
+ { echo "$as_me:$LINENO: result: enabled" >&5
+echo "${ECHO_T}enabled" >&6; }
+ fi
+
+else
+
+ if test `uname` = "AIX"
+ then
+ use_largefiles=0
+ { echo "$as_me:$LINENO: result: disabled" >&5
+echo "${ECHO_T}disabled" >&6; }
+ else
+ use_largefiles=1
+ { echo "$as_me:$LINENO: result: enabled" >&5
+echo "${ECHO_T}enabled" >&6; }
fi
- PROCARCH="$ARCH"
+
+
+fi
+
+
+# Settings for largefiles support
+if test "$use_largefiles" = 1; then
+ if test "$ARCH" = "SOLARIS"; then
+ if ! ( echo $CFLAGS | egrep '(64|v9)' >/dev/null 2>&1); then
+ echo "###############################################################################"
+ echo "### Solaris requires 64-bit support for large files and resource monitoring ###"
+ echo "### enabled. ###"
+ echo "### ###"
+ echo "### Compile monit with 64-bit support (see PLATFORMS file for details) ###"
+ echo "###############################################################################"
+ { { echo "$as_me:$LINENO: error: Solaris requires 64-bit support for large files and resource monitoring enabled" >&5
+echo "$as_me: error: Solaris requires 64-bit support for large files and resource monitoring enabled" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+ # Check whether --enable-largefile was given.
+if test "${enable_largefile+set}" = set; then
+ enableval=$enable_largefile;
+fi
+
+if test "$enable_largefile" != no; then
+
+ { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
+echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
+if test "${ac_cv_sys_largefile_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_sys_largefile_CC=no
+ if test "$GCC" != yes; then
+ ac_save_CC=$CC
+ while :; do
+ # IRIX 6.2 and later do not support large files by default,
+ # so use the C compiler's -n32 option if that helps.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+ CC="$CC -n32"
+ rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_sys_largefile_CC=' -n32'; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+ break
+ done
+ CC=$ac_save_CC
+ rm -f conftest.$ac_ext
+ fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
+echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
+ if test "$ac_cv_sys_largefile_CC" != no; then
+ CC=$CC$ac_cv_sys_largefile_CC
+ fi
+
+ { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
+if test "${ac_cv_sys_file_offset_bits+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_sys_file_offset_bits=no; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#define _FILE_OFFSET_BITS 64
+#include
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_sys_file_offset_bits=64; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_file_offset_bits=unknown
+ break
+done
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
+echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
+case $ac_cv_sys_file_offset_bits in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
+_ACEOF
+;;
+esac
+rm -f conftest*
+ if test $ac_cv_sys_file_offset_bits = unknown; then
+ { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
+echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
+if test "${ac_cv_sys_large_files+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_sys_large_files=no; break
else
- PROCARCH="UNKNOWN"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#define _LARGE_FILES 1
+#include
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_sys_large_files=1; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_large_files=unknown
+ break
+done
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
+echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
+case $ac_cv_sys_large_files in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _LARGE_FILES $ac_cv_sys_large_files
+_ACEOF
+;;
+esac
+rm -f conftest*
+ fi
fi
+fi
# ------------------------------------------------------------------------
@@ -10439,7 +10920,7 @@
else
if test -z "$sslincldir"; then
- for maindir in /usr /usr/local /usr/lib /usr/pkg /var /opt; do
+ for maindir in /usr /usr/local /usr/lib /usr/pkg /var /opt /usr/sfw; do
for dir in "$maindir/include"\
"$maindir/include/openssl"\
"$maindir/include/ssl"\
@@ -10479,10 +10960,26 @@
else
if test -z "$ssllibdir"; then
- for maindir in /usr /usr/local /usr/pkg /var /opt; do
- for dir in $maindir $maindir/openssl $maindir/ssl \
- $maindir/lib $maindir/lib/openssl \
- $maindir/lib/ssl $maindir/ssl/lib; do
+ for maindir in /usr \
+ /usr/local \
+ /usr/pkg \
+ /var /opt \
+ /usr/sfw; do
+ for dir in $maindir \
+ $maindir/openssl \
+ $maindir/ssl \
+ $maindir/lib \
+ $maindir/lib/openssl \
+ $maindir/lib/ssl \
+ $maindir/ssl/lib \
+ $maindir/lib/64 \
+ $maindir/lib/64/openssl \
+ $maindir/lib/64/ssl \
+ $maindir/ssl/lib/64 \
+ $maindir/lib64 \
+ $maindir/lib64/openssl \
+ $maindir/lib64/ssl \
+ $maindir/ssl/lib64; do
checkssllibdir $dir && break 2
done
done
@@ -10600,8 +11097,8 @@
t end
s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
:end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
- if test -w $cache_file; then
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
test "x$cache_file" != "x/dev/null" &&
{ echo "$as_me:$LINENO: updating cache $cache_file" >&5
echo "$as_me: updating cache $cache_file" >&6;}
@@ -10659,7 +11156,8 @@
## M4sh Initialization. ##
## --------------------- ##
-# Be Bourne compatible
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
@@ -10668,10 +11166,13 @@
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
- case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
+
+
# PATH needs CR
@@ -10840,7 +11341,7 @@
}
-if (dirname -- /) >/dev/null 2>&1; then
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
as_dirname=dirname
else
as_dirname=false
@@ -10895,19 +11396,28 @@
as_mkdir_p=false
fi
-# Find out whether ``test -x'' works. Don't use a zero-byte file, as
-# systems may use methods other than mode bits to determine executability.
-cat >conf$$.file <<_ASEOF
-#! /bin/sh
-exit 0
-_ASEOF
-chmod +x conf$$.file
-if test -x conf$$.file >/dev/null 2>&1; then
- as_executable_p="test -x"
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
else
- as_executable_p=:
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
fi
-rm -f conf$$.file
+as_executable_p=$as_test_x
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -10922,8 +11432,8 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by monit $as_me 4.8.1, which was
-generated by GNU Autoconf 2.59d. Invocation command line was
+This file was extended by monit $as_me 5.0.3, which was
+generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -10951,7 +11461,7 @@
Usage: $0 [OPTIONS] [FILE]...
-h, --help print this help, then exit
- -V, --version print version number, then exit
+ -V, --version print version number and configuration settings, then exit
-q, --quiet do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
@@ -10971,9 +11481,9 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-monit config.status 4.8.1
-configured by $0, generated by GNU Autoconf 2.59d,
- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+monit config.status 5.0.3
+configured by $0, generated by GNU Autoconf 2.61,
+ with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Copyright (C) 2006 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
@@ -11052,10 +11562,10 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
if \$ac_cs_recheck; then
- echo "running CONFIG_SHELL=$SHELL $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
CONFIG_SHELL=$SHELL
export CONFIG_SHELL
- exec $SHELL "$0" $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
fi
_ACEOF
@@ -11194,23 +11704,21 @@
INSTALL_DATA!$INSTALL_DATA$ac_delim
SET_MAKE!$SET_MAKE$ac_delim
LEX!$LEX$ac_delim
-LEXLIB!$LEXLIB$ac_delim
LEX_OUTPUT_ROOT!$LEX_OUTPUT_ROOT$ac_delim
+LEXLIB!$LEXLIB$ac_delim
YACC!$YACC$ac_delim
-YFLAGS!$YFLAGS$ac_delim
LIBOBJS!$LIBOBJS$ac_delim
NEED_SETGID!$NEED_SETGID$ac_delim
KMEM_GROUP!$KMEM_GROUP$ac_delim
GETLOADAVG_LIBS!$GETLOADAVG_LIBS$ac_delim
EXTERNALS!$EXTERNALS$ac_delim
ARCH!$ARCH$ac_delim
-PROCARCH!$PROCARCH$ac_delim
sslincldir!$sslincldir$ac_delim
ssllibdir!$ssllibdir$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `grep -c "$ac_delim\$" conf$$subs.sed` = 66; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 64; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -11221,10 +11729,10 @@
fi
done
-ac_eof=
-if grep '^CEOF$' conf$$subs.sed >/dev/null; then
- ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF//p' conf$$subs.sed | sort -nru | sed 1q`
- ac_eof=`expr 0$ac_eof + 1`
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+ ac_eof=`expr $ac_eof + 1`
fi
cat >>$CONFIG_STATUS <<_ACEOF
@@ -11442,7 +11950,7 @@
cat >>$CONFIG_STATUS <<\_ACEOF
# If the template does not know about datarootdir, expand it.
# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=
+ac_datarootdir_hack=; ac_datarootdir_seen=
case `sed -n '/datarootdir/ {
p
@@ -11454,7 +11962,7 @@
/@localedir@/p
/@mandir@/p
' $ac_file_inputs` in
-*datarootdir*) ;;
+*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
{ echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
@@ -11493,6 +12001,14 @@
$ac_datarootdir_hack
" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&5
+echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&2;}
+
rm -f "$tmp/stdin"
case $ac_file in
-) cat "$tmp/out"; rm -f "$tmp/out";;
@@ -11503,18 +12019,6 @@
#
# CONFIG_HEADER
#
-
- # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
- # NAME is the cpp macro being defined, VALUE is the value it is being given.
- # PARAMS is the parameter list in the macro definition--in most cases, it's
- # just an empty string.
- #
- ac_dA='s,^\([ ]*#[ ]*\)[^ ]*\([ ][ ]*'
- ac_dB='\)[ (].*$,\1define\2'
- ac_dC=' '
- ac_dD=' ,'
-
- ac_word_regexp=[_$as_cr_Letters][_$as_cr_alnum]*
_ACEOF
# Transform confdefs.h into a sed script `conftest.defines', that
@@ -11528,6 +12032,15 @@
# symbol, which is useless. But do not sort them, since the last
# AC_DEFINE must be honored.
ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
+# NAME is the cpp macro being defined, VALUE is the value it is being given.
+# PARAMS is the parameter list in the macro definition--in most cases, it's
+# just an empty string.
+ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
+ac_dB='\\)[ (].*,\\1define\\2'
+ac_dC=' '
+ac_dD=' ,'
+
uniq confdefs.h |
sed -n '
t rset
@@ -11537,9 +12050,8 @@
d
:ok
s/[\\&,]/\\&/g
- s/[\\$`]/\\&/g
- s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/${ac_dA}\1$ac_dB\2${ac_dC}\3$ac_dD/p
- s/^\('"$ac_word_re"'\)[ ]*\(.*\)/${ac_dA}\1$ac_dB${ac_dC}\2$ac_dD/p
+ s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
+ s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
' >>conftest.defines
# Remove the space that was appended to ease matching.
@@ -11551,7 +12063,7 @@
s,^[ #]*u.*,/* & */,' >>conftest.defines
# Break up conftest.defines:
-ac_max_sed_lines=96
+ac_max_sed_lines=50
# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
@@ -11564,12 +12076,14 @@
while :
do
# Write a here document:
- echo ' # First, check the format of the line:
- cat >"$tmp/defines.sed" <>$CONFIG_STATUS <<_ACEOF
+ # First, check the format of the line:
+ cat >"\$tmp/defines.sed" <<\\CEOF
+/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
+/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
b
-:def' >>$CONFIG_STATUS
+:def
+_ACEOF
sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
echo 'CEOF
sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
@@ -11645,12 +12159,11 @@
else
echo " SSL support: disabled"
fi
-if test "$use_resource" = "1"; then
- echo " resource monitoring: enabled"
+if test "$use_largefiles" = "1"; then
+ echo " large files support: enabled"
else
- echo " resource monitoring: disabled"
+ echo " large files support: disabled"
fi
-echo " resource code: sysdep_$PROCARCH.c"
echo " Compiler flags: ${CFLAGS}"
echo " Linker flags: ${LIBS}"
echo " pid file location: ${piddir}"
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/configure.ac /tmp/QeMlhPoI46/monit-5.0.3/configure.ac
--- monit-4.8.1/configure.ac 2006-05-05 00:50:03.000000000 +0100
+++ monit-5.0.3/configure.ac 2009-05-25 20:02:56.000000000 +0100
@@ -1,16 +1,20 @@
# Process this file with autoconf to produce a configure script.
# Mark Ferlatte,
#
-# $Id: configure.ac,v 1.137 2006/05/04 23:50:03 martinp Exp $
+# $Id: configure.ac,v 1.194 2009/05/09 10:18:31 martinp Exp $
# autoconf requirement
AC_PREREQ([2.53])
# Init autoconf and automake
-AC_INIT([monit], [4.8.1], [monit-general@nongnu.org])
+
+# Note: in case of beta subversion, use underscore "_" rather then dash "-"
+# since RPM doesn't allow dash in Version
+# Example: 5.0_beta2
+AC_INIT([monit], [5.0.3], [monit-general@nongnu.org])
# Package info
-AC_REVISION([$Revision: 1.137 $])
+AC_REVISION([$Revision: 1.194 $])
AC_CONFIG_SRCDIR([monitor.c])
# ------------------------------------------------------------------------
@@ -25,7 +29,10 @@
if test "$LEX" != flex; then
AC_MSG_ERROR([monit requires flex, not lex])
fi
-AC_PROG_YACC
+AC_CHECK_PROGS(YACC, 'bison -y' byacc yacc)
+if test "x$YACC" = "x"; then
+ AC_MSG_ERROR([monit requires bison, byacc or yacc])
+fi
# ------------------------------------------------------------------------
# Libraries
@@ -33,10 +40,11 @@
# Check for libraries
AC_CHECK_LIB([socket], [socket])
-AC_CHECK_LIB([inet], [socket])
-AC_CHECK_LIB([nsl], [inet_addr])
+AC_CHECK_LIB([inet], [socket])
+AC_CHECK_LIB([nsl], [inet_addr])
AC_CHECK_LIB([resolv], [inet_aton])
-AC_CHECK_LIB([crypt], [crypt])
+AC_CHECK_LIB([crypt], [crypt])
+AC_CHECK_LIB([pam], [pam_start])
# Wacky pthread madness
pthread_libs=""
@@ -67,6 +75,7 @@
asm/page.h \
asm/param.h \
cf.h \
+ crt_externs.h \
ctype.h \
crypt.h \
dirent.h \
@@ -77,10 +86,12 @@
grp.h \
kvm.h \
kstat.h \
+ libperfstat.h \
limits.h \
loadavg.h \
locale.h \
mach/host_info.h \
+ mach/mach.h \
mach/mach_host.h \
memory.h \
mntent.h \
@@ -88,11 +99,13 @@
sys/socket.h \
netinet/in.h \
netinet/in_systm.h \
+ pam/pam_appl.h \
procfs.h \
procinfo.h \
pthread.h \
pwd.h \
regex.h \
+ security/pam_appl.h \
setjmp.h \
signal.h \
stdarg.h \
@@ -102,6 +115,7 @@
stropts.h \
sys/cfgodm.h \
sys/cfgdb.h \
+ sys/dk.h \
sys/dkstat.h \
sys/filio.h \
sys/ioctl.h \
@@ -114,11 +128,14 @@
sys/pstat.h \
sys/queue.h \
sys/resource.h \
+ sys/statfs.h \
sys/statvfs.h \
+ sys/systemcfg.h \
sys/time.h \
sys/tree.h \
sys/types.h \
sys/un.h \
+ sys/utsname.h \
sys/vmmeter.h \
sys/vfs.h \
syslog.h \
@@ -289,7 +306,8 @@
AC_CHECK_FUNCS(statvfs)
AC_CHECK_FUNCS(setlocale)
AC_CHECK_FUNCS(getaddrinfo)
-
+AC_CHECK_FUNCS(syslog)
+AC_CHECK_FUNCS(vsyslog)
# Check if we do need external GNU replacements
AC_FUNC_GETLOADAVG
@@ -381,6 +399,7 @@
then
ARCH="HPUX"
CFLAGS="$CFLAGS -D _REENTRANT"
+ AC_DEFINE([HAVE_CPU_WAIT], [1], [Define to 1 if CPU wait information is available.])
elif test `uname` = "OpenBSD"
then
ARCH="OPENBSD"
@@ -409,6 +428,9 @@
LIBS="$LIBS -lodm"
# AIX v. 5.2
LIBS="$LIBS -lcfg"
+ # AIX v. 5.3
+ LIBS="$LIBS -lperfstat"
+ AC_DEFINE([HAVE_CPU_WAIT], [1], [Define to 1 if CPU wait information is available.])
else
AC_MSG_WARN([Architecture not supported: `uname`.])
CFLAGS="$CFLAGS -D _REENTRANT"
@@ -420,56 +442,76 @@
# Resource code
# ------------------------------------------------------------------------
-# Check if we want to have resource support
-AC_MSG_CHECKING([for resource support])
-AC_ARG_WITH(resource,
- [ --without-resource disable resouce monitoring (default: enabled)],
+# Test for kvm libs
+kvm_libs=""
+if test "$test_kvm"; then
+ AC_CHECK_LIB([kvm],
+ [kvm_open],
+ [kvm_libs="-lkvm"])
+ if test "$kvm_libs"
+ then
+ LIBS="$LIBS $kvm_libs"
+ fi
+fi
+kstat_libs=""
+if test "$test_kstat"; then
+ AC_CHECK_LIB([kstat],
+ [kstat_open],
+ [kstat_libs="-lkstat"])
+ if test "$kstat_libs"
+ then
+ LIBS="$LIBS $kstat_libs"
+ fi
+fi
+
+
+# ------------------------------------------------------------------------
+# Large files code
+# ------------------------------------------------------------------------
+
+# Check if we want to have large files support
+AC_MSG_CHECKING([for large files support])
+AC_ARG_WITH(largefiles,
+ [ --without-largefiles disable large files support (default: enabled)],
[
dnl Check the withvalue
if test "x$withval" = "xno" ; then
- use_resource=0
+ use_largefiles=0
AC_MSG_RESULT([disabled])
fi
if test "x$withval" = "xyes" ; then
- use_resource=1
+ use_largefiles=1
AC_MSG_RESULT([enabled])
fi
],
[
- use_resource=1
- AC_MSG_RESULT([enabled])
+ if test `uname` = "AIX"
+ then
+ use_largefiles=0
+ AC_MSG_RESULT([disabled])
+ else
+ use_largefiles=1
+ AC_MSG_RESULT([enabled])
+ fi
]
)
-# Settings for resource support
-if test "$use_resource" = 1; then
- # Test for kvm libs
- kvm_libs=""
- if test "$test_kvm"; then
- AC_CHECK_LIB([kvm],
- [kvm_open],
- [kvm_libs="-lkvm"])
- if test "$kvm_libs"
- then
- LIBS="$LIBS $kvm_libs"
- fi
- fi
- kstat_libs=""
- if test "$test_kstat"; then
- AC_CHECK_LIB([kstat],
- [kstat_open],
- [kstat_libs="-lkstat"])
- if test "$kstat_libs"
- then
- LIBS="$LIBS $kstat_libs"
- fi
- fi
- PROCARCH="$ARCH"
-else
- PROCARCH="UNKNOWN"
+# Settings for largefiles support
+if test "$use_largefiles" = 1; then
+ if test "$ARCH" = "SOLARIS"; then
+ if ! ( echo $CFLAGS | egrep '(64|v9)' >/dev/null 2>&1); then
+ echo "###############################################################################"
+ echo "### Solaris requires 64-bit support for large files and resource monitoring ###"
+ echo "### enabled. ###"
+ echo "### ###"
+ echo "### Compile monit with 64-bit support (see PLATFORMS file for details) ###"
+ echo "###############################################################################"
+ AC_MSG_ERROR([Solaris requires 64-bit support for large files and resource monitoring enabled])
+ fi
+ fi
+ AC_SYS_LARGEFILE
fi
-AC_SUBST(PROCARCH)
# ------------------------------------------------------------------------
# SSL Code
@@ -542,7 +584,7 @@
[
if test -z "$sslincldir"; then
dnl Search default locations of SSL includes
- for maindir in /usr /usr/local /usr/lib /usr/pkg /var /opt; do
+ for maindir in /usr /usr/local /usr/lib /usr/pkg /var /opt /usr/sfw; do
for dir in "$maindir/include"\
"$maindir/include/openssl"\
"$maindir/include/ssl"\
@@ -577,10 +619,26 @@
[
if test -z "$ssllibdir"; then
dnl Search default locations of SSL libraries
- for maindir in /usr /usr/local /usr/pkg /var /opt; do
- for dir in $maindir $maindir/openssl $maindir/ssl \
- $maindir/lib $maindir/lib/openssl \
- $maindir/lib/ssl $maindir/ssl/lib; do
+ for maindir in /usr \
+ /usr/local \
+ /usr/pkg \
+ /var /opt \
+ /usr/sfw; do
+ for dir in $maindir \
+ $maindir/openssl \
+ $maindir/ssl \
+ $maindir/lib \
+ $maindir/lib/openssl \
+ $maindir/lib/ssl \
+ $maindir/ssl/lib \
+ $maindir/lib/64 \
+ $maindir/lib/64/openssl \
+ $maindir/lib/64/ssl \
+ $maindir/ssl/lib/64 \
+ $maindir/lib64 \
+ $maindir/lib64/openssl \
+ $maindir/lib64/ssl \
+ $maindir/ssl/lib64; do
checkssllibdir $dir && break 2
done
done
@@ -640,12 +698,11 @@
else
echo " SSL support: disabled"
fi
-if test "$use_resource" = "1"; then
- echo " resource monitoring: enabled"
+if test "$use_largefiles" = "1"; then
+ echo " large files support: enabled"
else
- echo " resource monitoring: disabled"
+ echo " large files support: disabled"
fi
-echo " resource code: sysdep_$PROCARCH.c"
echo " Compiler flags: ${CFLAGS}"
echo " Linker flags: ${LIBS}"
echo " pid file location: ${piddir}"
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/contrib/monit.php /tmp/QeMlhPoI46/monit-5.0.3/contrib/monit.php
--- monit-4.8.1/contrib/monit.php 2006-01-01 22:01:06.000000000 +0000
+++ monit-5.0.3/contrib/monit.php 2008-03-31 22:13:31.000000000 +0100
@@ -3,7 +3,7 @@
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
-// published by the Free Software Foundation; either version 2 of the
+// published by the Free Software Foundation; either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful, but
@@ -29,7 +29,7 @@
//
// Requires PHP, and a working webserver!
// @author Author David Fletcher,
-// @version \$Id: monit.php,v 1.2 2004/11/20 23:53:42 hauk Exp $
+// @version \$Id: monit.php,v 1.3 2007/07/25 12:54:30 hauk Exp $
//Configuration - set this to match the information in /etc/monitrc
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/contrib/monitrc-gentoo /tmp/QeMlhPoI46/monit-5.0.3/contrib/monitrc-gentoo
--- monit-4.8.1/contrib/monitrc-gentoo 1970-01-01 01:00:00.000000000 +0100
+++ monit-5.0.3/contrib/monitrc-gentoo 2008-11-26 06:42:49.000000000 +0000
@@ -0,0 +1,328 @@
+###############################################################################
+## Monit control file
+###############################################################################
+##
+## Comments begin with a '#' and extend through the end of the line. Keywords
+## are case insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'.
+##
+## Bellow is the example of some frequently used statements. For information
+## about the control file, a complete list of statements and options please
+## have a look in the monit manual.
+##
+##
+###############################################################################
+## Global section
+###############################################################################
+##
+## Start monit in background (run as daemon) and check the services at 2-minute
+## intervals.
+#
+set daemon 120
+#
+#
+## Set syslog logging with the 'daemon' facility. If the FACILITY option is
+## omited, monit will use 'user' facility by default. You can specify the
+## path to the file for monit native logging.
+#
+# set logfile syslog facility log_daemon
+#
+#
+## Set list of mailservers for alert delivery. Multiple servers may be
+## specified using comma separator. By default monit uses port 25 - it is
+## possible to override it with the PORT option.
+#
+# set mailserver mail.bar.baz, # primary mailserver
+# backup.bar.baz port 10025, # backup mailserver on port 10025
+# localhost # fallback relay
+#
+#
+## By default monit will drop the event alert, in the case that there is no
+## mailserver available. In the case that you want to keep the events for
+## later delivery retry, you can use the EVENTQUEUE statement. The base
+## directory where undelivered events will be stored is specified by the
+## BASEDIR option. You can limit the maximal queue size using the SLOTS
+## option (if omited then the queue is limited just by the backend filesystem).
+#
+# set eventqueue
+# basedir /var/monit # set the base directory where events will be stored
+# slots 100 # optionaly limit the queue size
+#
+#
+## Monit by default uses the following alert mail format:
+##
+## --8<--
+## From: monit@$HOST # sender
+## Subject: monit alert -- $EVENT $SERVICE # subject
+##
+## $EVENT Service $SERVICE #
+## #
+## Date: $DATE #
+## Action: $ACTION #
+## Host: $HOST # body
+## Description: $DESCRIPTION #
+## #
+## Your faithful employee, #
+## monit #
+## --8<--
+##
+## You can override the alert message format or its parts such as subject
+## or sender using the MAIL-FORMAT statement. Macros such as $DATE, etc.
+## are expanded on runtime. For example to override the sender:
+#
+# set mail-format { from: monit@foo.bar }
+#
+#
+## You can set the alert recipients here, which will receive the alert for
+## each service. The event alerts may be restricted using the list.
+#
+# set alert sysadm@foo.bar # receive all alerts
+# set alert manager@foo.bar only on { timeout } # receive just service-
+# # timeout alert
+#
+#
+## Monit has an embedded webserver, which can be used to view the
+## configuration, actual services parameters or manage the services using the
+## web interface.
+#
+set httpd port 2812 and
+ use address localhost # only accept connection from localhost
+ allow localhost # allow localhost to connect to the server and
+# allow admin:monit # require user 'admin' with password 'monit'
+#
+#
+###############################################################################
+## Services
+###############################################################################
+##
+## Check the general system resources such as load average, cpu and memory
+## usage. Each rule specifies the tested resource, the limit and the action
+## which will be performed in the case that the test failed.
+#
+check system localhost
+# if loadavg (1min) > 4 then alert
+# if loadavg (5min) > 2 then alert
+# if memory usage > 75% then alert
+# if cpu usage (user) > 70% then alert
+# if cpu usage (system) > 30% then alert
+# if cpu usage (wait) > 20% then alert
+#
+#
+
+# vixie cron
+check process cron with pidfile /var/run/cron.pid
+ group system
+ start program = "/etc/init.d/vixie-cron start"
+ stop program = "/etc/init.d/vixie-cron stop"
+ if 5 restarts within 5 cycles then timeout
+ depends on cron_rc
+
+check file cron_rc with path /etc/init.d/vixie-cron
+ group system
+ if failed checksum then unmonitor
+ if failed permission 755 then unmonitor
+ if failed uid root then unmonitor
+ if failed gid root then unmonitor
+
+check process syslogd with pidfile /var/run/syslog-ng.pid
+ start program = "/etc/init.d/syslog-ng start"
+ stop program = "/etc/init.d/syslog-ng stop"
+ if 5 restarts within 5 cycles then timeout
+
+check file syslogd_file with path /var/log/messages
+ if timestamp > 65 minutes then alert # Have you seen "-- MARK --"?
+
+
+# vsftp
+check process vsftpd with pidfile /var/run/vsftpd.pid
+ start program = "/etc/init.d/vsftpd start"
+ stop program = "/etc/init.d/vsftpd stop"
+ if failed port 21 protocol ftp then restart
+ if 5 restarts within 5 cycles then timeout
+
+check process sshd with pidfile /var/run/sshd.pid
+ start program "/etc/init.d/sshd start"
+ stop program "/etc/init.d/sshd stop"
+ if failed port 22 protocol ssh then restart
+ if 5 restarts within 5 cycles then timeout
+
+# apache2
+check process apache with pidfile /var/run/apache2.pid
+ group www
+ start program = "/etc/init.d/apache2 start"
+ stop program = "/etc/init.d/apache2 stop"
+ if failed port 80 protocol http then restart
+ if 5 restarts within 5 cycles then timeout
+
+# postfix
+check process postfix with pidfile /var/spool/postfix/pid/master.pid
+ group mail
+ start program = "/etc/init.d/postfix start"
+ stop program = "/etc/init.d/postfix stop"
+ if failed port 25 protocol smtp then restart
+ if 5 restarts within 5 cycles then timeout
+ depends on postfix_rc
+
+check file postfix_rc with path /etc/init.d/postfix
+ group mail
+ if failed checksum then unmonitor
+ if failed permission 755 then unmonitor
+ if failed uid root then unmonitor
+ if failed gid root then unmonitor
+
+# postgresql
+check process postgresql with pidfile /var/postgresql/data/postmaster.pid
+ group database
+ start program = "/etc/init.d/postgresql start"
+ stop program = "/etc/init.d/postgresql stop"
+
+# slapd
+check process slapd with pidfile /var/run/openldap/slapd.pid
+ group database
+ start program = "/etc/init.d/slapd start"
+ stop program = "/etc/init.d/slapd stop"
+# if failed port 389 protocol ldap3 then restart
+# if 5 restarts within 5 cycles then timeout
+
+check process smbd with pidfile /var/run/samba/smbd.pid
+ group samba
+ start program = "/etc/init.d/samba start"
+ stop program = "/etc/init.d/samba stop"
+ if failed port 139 type TCP then restart
+ if 5 restarts within 5 cycles then timeout
+ depends on smbd_bin
+
+check file smbd_bin with path /usr/sbin/smbd
+ group samba
+ if failed checksum then unmonitor
+ if failed permission 755 then unmonitor
+ if failed uid root then unmonitor
+ if failed gid root then unmonitor
+
+check process nmbd with pidfile /var/run/samba/nmbd.pid
+ group samba
+ start program = "/etc/init.d/samba start"
+ stop program = "/etc/init.d/samba stop"
+ if failed port 138 type UDP then restart
+ if failed port 137 type UDP then restart
+ if 5 restarts within 5 cycles then timeout
+ depends on nmbd_bin
+
+check file nmbd_bin with path /usr/sbin/nmbd
+ group samba
+ if failed checksum then unmonitor
+ if failed permission 755 then unmonitor
+ if failed uid root then unmonitor
+ if failed gid root then unmonitor
+
+check process ddclient with pidfile /var/run/ddclient.pid
+ group other
+ start program = "/etc/init.d/ddclient start"
+ stop program = "/etc/init.d/ddclient stop"
+
+## Check a file for existence, checksum, permissions, uid and gid. In addition
+## to the recipients in the global section, customized alert will be send to
+## the additional recipient. The service may be grouped using the GROUP option.
+#
+# check file apache_bin with path /usr/local/apache/bin/httpd
+# if failed checksum and
+# expect the sum 8f7f419955cefa0b33a2ba316cba3659 then unmonitor
+# if failed permission 755 then unmonitor
+# if failed uid root then unmonitor
+# if failed gid root then unmonitor
+# alert security@foo.bar on {
+# checksum, permission, uid, gid, unmonitor
+# } with the mail-format { subject: Alarm! }
+# group server
+#
+#
+## Check that a process is running, responding on the HTTP and HTTPS request,
+## check its resource usage such as cpu and memory, number of children.
+## In the case that the process is not running, monit will restart it by
+## default. In the case that the service was restarted very often and the
+## problem remains, it is possible to disable the monitoring using the
+## TIMEOUT statement. The service depends on another service (apache_bin) which
+## is defined in the monit control file as well.
+#
+# check process apache with pidfile /usr/local/apache/logs/httpd.pid
+# start program = "/etc/init.d/httpd start"
+# stop program = "/etc/init.d/httpd stop"
+# if cpu > 60% for 2 cycles then alert
+# if cpu > 80% for 5 cycles then restart
+# if totalmem > 200.0 MB for 5 cycles then restart
+# if children > 250 then restart
+# if loadavg(5min) greater than 10 for 8 cycles then stop
+# if failed host www.tildeslash.com port 80 protocol http
+# and request "/monit/doc/next.php"
+# then restart
+# if failed port 443 type tcpssl protocol http
+# with timeout 15 seconds
+# then restart
+# if 3 restarts within 5 cycles then timeout
+# depends on apache_bin
+# group server
+#
+#
+## Check the filesystem permissions, uid, gid, space and inode usage. Other
+## services such as databases may depend on this resource and automatical
+## graceful stop may be cascaded to them before the filesystem will become
+## full and the data will be lost.
+#
+# check filesystem datafs with path /dev/sdb1
+# start program = "/bin/mount /data"
+# stop program = "/bin/umount /data"
+# if failed permission 660 then unmonitor
+# if failed uid root then unmonitor
+# if failed gid disk then unmonitor
+# if space usage > 80% for 5 times within 15 cycles then alert
+# if space usage > 99% then stop
+# if inode usage > 30000 then alert
+# if inode usage > 99% then stop
+# group server
+#
+#
+## Check a file's timestamp: when it becomes older then 15 minutes, the
+## file is not updated and something is wrong. In the case that the size
+## of the file exceeded given limit, perform the script.
+#
+# check file database with path /data/mydatabase.db
+# if failed permission 700 then alert
+# if failed uid data then alert
+# if failed gid data then alert
+# if timestamp > 15 minutes then alert
+# if size > 100 MB then exec "/my/cleanup/script"
+#
+#
+## Check the directory permission, uid and gid. An event is triggered
+## if the directory does not belong to the user with the uid 0 and
+## the gid 0. In the addition the permissions have to match the octal
+## description of 755 (see chmod(1)).
+#
+# check directory bin with path /bin
+# if failed permission 755 then unmonitor
+# if failed uid 0 then unmonitor
+# if failed gid 0 then unmonitor
+#
+#
+## Check the remote host network services availability and the response
+## content. One of three pings, a successfull connection to a port and
+## application level network check is performed.
+#
+# check host myserver with address 192.168.1.1
+# if failed icmp type echo count 3 with timeout 3 seconds then alert
+# if failed port 3306 protocol mysql with timeout 15 seconds then alert
+# if failed url
+# http://user:password@www.foo.bar:8080/?querystring
+# and content == 'action="j_security_check"'
+# then alert
+#
+#
+###############################################################################
+## Includes
+###############################################################################
+##
+## It is possible to include the configuration or its parts from other files or
+## directories.
+#
+# include /etc/monit.d/*
+#
+#
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/contrib/monit.upstart /tmp/QeMlhPoI46/monit-5.0.3/contrib/monit.upstart
--- monit-4.8.1/contrib/monit.upstart 1970-01-01 01:00:00.000000000 +0100
+++ monit-5.0.3/contrib/monit.upstart 2008-03-31 22:13:31.000000000 +0100
@@ -0,0 +1,26 @@
+# This is an event.d (upstart) script to keep monit running
+# To install disable the old way of doing things:
+#
+# /etc/init.d/monit stop && update-rc.d -f monit remove
+#
+# then put this script here: /etc/event.d/monit
+#
+# You can manually start and stop monit like this:
+#
+# start monit
+# stop monit
+#
+# Michael Hale (http://halethegeek.com)
+
+start on runlevel 2
+start on runlevel 3
+start on runlevel 4
+start on runlevel 5
+
+stop on runlevel 0
+stop on runlevel 6
+
+exec /usr/sbin/monit -Ic /etc/monit/monitrc
+instance
+respawn
+
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/contrib/rc.monit /tmp/QeMlhPoI46/monit-5.0.3/contrib/rc.monit
--- monit-4.8.1/contrib/rc.monit 2006-01-01 22:01:06.000000000 +0000
+++ monit-5.0.3/contrib/rc.monit 2008-04-10 20:06:31.000000000 +0100
@@ -6,7 +6,7 @@
#
# chkconfig: 2345 98 02
# description: Monit is a utility for managing and monitoring processes,
-# files, directories and devices on a Unix system.
+# files, directories and filesystems on a Unix system.
# processname: monit
# pidfile: /var/run/monit.pid
# config: /etc/monitrc
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/contrib/wap.php /tmp/QeMlhPoI46/monit-5.0.3/contrib/wap.php
--- monit-4.8.1/contrib/wap.php 2006-01-01 22:01:06.000000000 +0000
+++ monit-5.0.3/contrib/wap.php 2008-03-31 22:13:31.000000000 +0100
@@ -3,7 +3,7 @@
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
-// published by the Free Software Foundation; either version 2 of the
+// published by the Free Software Foundation; either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful, but
@@ -47,7 +47,7 @@
// This script requires PHP, and a working webserver! Tested on PHP4.
//
// @author Author David Fletcher,
-// @version \$Id: wap.php,v 1.2 2004/11/20 23:49:19 hauk Exp $
+// @version \$Id: wap.php,v 1.4 2007/10/05 21:32:42 martinp Exp $
//Configuration data
$addr = 'localhost';
@@ -136,6 +136,11 @@
// Make sure we can access the path array
global $ary_path,$service_no;
+ //Service type 5 is system information, not a standard service
+ if(isset($attrs['TYPE']) && $attrs['TYPE'] == 5){
+ $name = 'SYSTEM';
+ }
+
// Push the tag into the array
array_push($ary_path, $name);
@@ -235,7 +240,7 @@
//Do outputs linked to the machine, not to a specific service
echo '
Hostname: '.$data_parsed['SYSTEM']['NAME'].' ';
$days = floor($data_parsed['SERVER']['UPTIME']/60/60/24);
$hours = $data_parsed['SERVER']['UPTIME']/60/60%24;
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/CONTRIBUTORS /tmp/QeMlhPoI46/monit-5.0.3/CONTRIBUTORS
--- monit-4.8.1/CONTRIBUTORS 2006-01-22 22:13:09.000000000 +0000
+++ monit-5.0.3/CONTRIBUTORS 2008-10-04 19:50:13.000000000 +0100
@@ -1,30 +1,27 @@
The Monit Project
- http://www.tildeslash.com/monit/
+ http://mmonit.com/monit/
============================================================================
The monit project group:
- Jan-Henrik Haukeland (hauk@tildeslash.com)
- The Project Manager and prime mover
-
Martin Pala (martinp@tildeslash.com)
- Specialist for planning, strategy and mixing drinks
+ The Project Manager and overhead projector maintainer
+ Jan-Henrik Haukeland (hauk@tildeslash.com)
+ Whiteboard and coffee machine operator
+
+Monit Emeritae (old team members now off doing other things):
+
Rory Toma (rory@digeo.com)
VP of Run Level 9
-
+
Christian Hopp (chopp@iei.tu-clausthal.de)
Research exotic stuff and brews interesting tea
-
-Old group members now off doing other things:
-
Thomas "Leppo" Oppel (oppel at kbis de)
- Created Suse Packages for monit and managed monit packages
- at savannah.gnu.org
Other major contributors:
@@ -40,22 +37,32 @@
Contributors in alphabetical order:
- Michael Amster (mamster@webeasy.com)
- Philipp Berndt (philipp.berndt@gmx.net)
- Olivier Beyssac (ob@r14.freenix.org)
- Marco Bisioli (bisioli@adriacom.it)
- Joe Bryant (JBryant@RiteAid.com)
- David Fletcher (david@megapico.co.uk)
- Peter Holdaway
- Mostafa Hosseini (mostafah@oeone.com)
- Francois Isabelle (Francois.Isabelle@ca.kontron.com)
- Oliver Jehle (oliver.jehle@monex.li)
- Artyom Khafizov (afk@inbox.ru)
- Kianusch Sayah Karadji (kianusch.sayah.karadji@sk-tech.net)
- Vlada Macek (tuttle@bbs.fsik.cvut.cz)
- Michel Marti (michel.marti@objectxp.com)
- Arkadiusz Miskiewicz (arekm@pld-linux.org)
- Tatsuya Nonogaki (nonotats@asahi.email.ne.jp)
- Rick Robino (rrobino@wavedivision.com>)
- Richard Schwaninger (risc@vmilch.at)
- Margarida Sequeira (margarida@openbsd.org)
+ Michael Amster
+ Philipp Berndt
+ Olivier Beyssac
+ Marco Bisioli
+ Joe Bryant
+ Will Bryant
+ Dave Cheney
+ Sébastien Debrard
+ Fco.Javier Felix
+ David Fletcher
+ Pierrick Grasland
+ Klaus Heinz
+ Peter Holdaway
+ Mostafa Hosseini
+ Francois Isabelle
+ Oliver Jehle
+ Artyom Khafizov
+ Bret McDanel
+ Kianusch Sayah Karadji
+ Thomas Lohmueller
+ Vlada Macek
+ Michel Marti
+ Wilhelm Meier
+ Arkadiusz Miskiewicz
+ Tatsuya Nonogaki
+ Rick Robino
+ Richard Schwaninger
+ Margarida Sequeira
+
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/control.c /tmp/QeMlhPoI46/monit-5.0.3/control.c
--- monit-4.8.1/control.c 2006-04-27 21:16:03.000000000 +0100
+++ monit-5.0.3/control.c 2009-02-13 13:06:31.000000000 +0000
@@ -1,20 +1,30 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
#include
@@ -60,7 +70,7 @@
* @author Rory Toma,
* @author Martin Pala,
*
- * @version \$Id: control.c,v 1.103 2006/04/27 20:16:03 martinp Exp $
+ * @version \$Id: control.c,v 1.121 2009/02/13 09:18:05 hauk Exp $
*
* @file
*/
@@ -69,13 +79,13 @@
/* -------------------------------------------------------------- Prototypes */
-static void do_start(Service_T);
-static int do_stop(Service_T);
-static void do_monitor(Service_T);
-static void do_unmonitor(Service_T);
-static void *wait_start(void *);
-static int wait_stop(Service_T);
-static void do_depend(Service_T, int);
+static void do_start(Service_T);
+static int do_stop(Service_T);
+static void do_monitor(Service_T);
+static void do_unmonitor(Service_T);
+static void wait_start(Service_T);
+static int wait_stop(Service_T);
+static void do_depend(Service_T, int);
/* ------------------------------------------------------------------ Public */
@@ -89,7 +99,6 @@
void control_service_daemon(const char *S, const char *action) {
Socket_T s;
- char *auth= Util_getBasicAuthHeader();
ASSERT(S);
ASSERT(action);
@@ -97,7 +106,7 @@
if(Util_getAction(action) == ACTION_IGNORE) {
LogError("%s: Cannot %s service '%s' -- invalid action %s\n",
prog, action, S, action);
- goto error;
+ return;
}
s= socket_new(Run.bind_addr?Run.bind_addr:"localhost",
@@ -107,44 +116,71 @@
LogError("%s: Cannot connect to the monit daemon."
" Did you start it with http support?\n", prog);
- goto error;
} else {
-
- if(socket_print(s, "GET /%s?action=%s HTTP/1.0\r\n%s\r\n",
- S, action, auth?auth:"") < 0)
+
+ char *auth = Util_getBasicAuthHeaderMonit();
+
+ if(socket_print(s,
+ "POST /%s HTTP/1.0\r\n"
+ "Content-Type: application/x-www-form-urlencoded\r\n"
+ "Content-Length: %d\r\n"
+ "%s"
+ "\r\n"
+ "action=%s",
+ S,
+ strlen("action=") + strlen(action),
+ auth?auth:"",
+ action) < 0)
+ {
LogError("%s: Cannot send the command '%s' to the monit daemon -- %s",
prog, action?action:"null", STRERROR);
+ }
+ FREE(auth);
socket_free(&s);
}
-error:
- FREE(auth);
-
}
/**
* Check to see if we should try to start/stop service
* @param S A service name as stated in the config file
- * @param action A string describing the action to execute
- * @return TRUE if the service was handled successfully otherwise FALSE
+ * @param A A string describing the action to execute
*/
-void control_service(const char *S, const char *action) {
+void control_service_string(const char *S, const char *A) {
+
+ int a;
+
+ ASSERT(S);
+ ASSERT(A);
+
+ if((a = Util_getAction(A)) == ACTION_IGNORE) {
+ LogError("%s: service '%s' -- invalid action %s\n", prog, S, A);
+ return;
+ }
+ control_service(S, a);
+}
+
+
+/**
+ * Check to see if we should try to start/stop service
+ * @param S A service name as stated in the config file
+ * @param A An action id describing the action to execute
+ */
+void control_service(const char *S, int A) {
Service_T s = NULL;
ASSERT(S);
- ASSERT(action);
if(!(s= Util_getService(S))) {
- LogError("%s: Cannot %s service '%s' -- not found in %s\n",
- prog, action, S, Run.controlfile);
+ LogError("%s: service '%s' -- doesn't exist\n", prog, S);
return;
}
- switch(Util_getAction(action)) {
+ switch(A) {
case ACTION_START:
if(s->type==TYPE_PROCESS) {
@@ -154,7 +190,7 @@
return;
}
if(!s->start) {
- DEBUG("%s: Start method not defined -- process %s\n", prog, S);
+ LogError("%s: Start method not defined -- process %s\n", prog, S);
Util_monitorSet(s);
return;
}
@@ -166,7 +202,7 @@
case ACTION_STOP:
if(s->type==TYPE_PROCESS && !s->stop) {
- DEBUG("%s: Stop method not defined -- process %s\n", prog, S);
+ LogError("%s: Stop method not defined -- process %s\n", prog, S);
Util_monitorUnset(s);
return;
}
@@ -180,7 +216,7 @@
case ACTION_RESTART:
if(s->type==TYPE_PROCESS && (!s->start || !s->stop)) {
- DEBUG("%s: Start or stop method not defined -- process %s\n", prog, S);
+ LogError("%s: Start or stop method not defined -- process %s\n", prog, S);
Util_monitorSet(s);
return;
}
@@ -212,8 +248,7 @@
break;
default:
- LogError("%s: Cannot %s service '%s' -- invalid action %s\n",
- prog, action, S, action);
+ LogError("%s: service '%s' -- invalid action %s\n", prog, S, A);
break;
}
}
@@ -266,25 +301,12 @@
}
if(s->start && (s->type!=TYPE_PROCESS || !Util_isProcessRunning(s))) {
- int status;
- pthread_t thread;
-
LogInfo("'%s' start: %s\n", s->name, s->start->arg[0]);
spawn(s, s->start, "Started");
if(s->type==TYPE_PROCESS) {
/* We only wait for a process type, other service types does not
* have a pid file to watch */
- LOCK(Run.mutex)
- Run.wait_start++;
- END_LOCK;
- status= pthread_create(&thread, NULL, wait_start, s);
- if(status != 0) {
- LOCK(Run.mutex)
- Run.wait_start--;
- END_LOCK;
- LogError("Warning: Failed to create the start controller thread. "
- "Thread error -- %s.\n", strerror(status));
- }
+ wait_start(s);
}
}
Util_monitorSet(s);
@@ -315,7 +337,6 @@
if(s->stop && (s->type!=TYPE_PROCESS || Util_isProcessRunning(s))) {
LogInfo("'%s' stop: %s\n", s->name, s->stop->arg[0]);
spawn(s, s->stop, "Stopped");
-
if(s->type==TYPE_PROCESS) {
/* Only wait for process service types */
if(!wait_stop(s))
@@ -432,35 +453,23 @@
* posted to notify the user.
* @param service A Service to wait for
*/
-static void *wait_start(void *service) {
-
- Service_T s= service;
- int max_tries= Run.polltime;
+static void wait_start(Service_T s) {
+ int max_tries= s->start->timeout;
ASSERT(s);
- pthread_detach(pthread_self());
-
while(max_tries-- && !Run.stopped) {
if(Util_isProcessRunning(s))
break;
sleep(1);
}
- if(!Util_isProcessRunning(s)) {
- Event_post(s, EVENT_EXEC, STATE_FAILED, s->action_EXEC,
- "'%s' failed to start", s->name);
- } else {
- Event_post(s, EVENT_EXEC, STATE_PASSED, s->action_EXEC,
- "'%s' started", s->name);
- }
+ if(!Util_isProcessRunning(s))
+ Event_post(s, EVENT_EXEC, STATE_FAILED, s->action_EXEC, "failed to start");
+ else
+ Event_post(s, EVENT_EXEC, STATE_SUCCEEDED, s->action_EXEC, "started");
- LOCK(Run.mutex)
- Run.wait_start--;
- END_LOCK;
-
- return NULL;
-
+ return;
}
@@ -475,7 +484,7 @@
*/
static int wait_stop(Service_T s) {
- int max_tries= Run.polltime;
+ int max_tries= s->stop->timeout;
ASSERT(s);
@@ -486,12 +495,10 @@
}
if(Util_isProcessRunning(s)) {
- Event_post(s, EVENT_EXEC, STATE_FAILED, s->action_EXEC,
- "'%s' failed to stop", s->name);
+ Event_post(s, EVENT_EXEC, STATE_FAILED, s->action_EXEC, "failed to stop");
return FALSE;
} else {
- Event_post(s, EVENT_EXEC, STATE_PASSED, s->action_EXEC,
- "'%s' stopped", s->name);
+ Event_post(s, EVENT_EXEC, STATE_SUCCEEDED, s->action_EXEC, "stopped");
}
return TRUE;
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/COPYING /tmp/QeMlhPoI46/monit-5.0.3/COPYING
--- monit-4.8.1/COPYING 2006-01-01 22:01:02.000000000 +0000
+++ monit-5.0.3/COPYING 2008-03-31 22:13:31.000000000 +0100
@@ -1,285 +1,626 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
- Preamble
+ Preamble
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
this License.
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
@@ -287,15 +628,15 @@
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
+state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@@ -304,37 +645,47 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
+ along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- , 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
+
+
+ License Exception
+
+In addition, as a special exception, the copyright holders give
+permission to link the code of portions of this program with the
+OpenSSL library under certain conditions as described in each
+individual source file, and distribute linked combinations
+including the two.
+
+You must obey the GNU General Public License in all respects
+for all of the code used other than OpenSSL. If you modify
+file(s) with this exception, you may extend this exception to your
+version of the file(s), but you are not obligated to do so. If you
+do not wish to do so, delete this exception statement from your
+version. If you delete this exception statement from all source
+files in the program, then also delete it here.
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/daemonize.c /tmp/QeMlhPoI46/monit-5.0.3/daemonize.c
--- monit-4.8.1/daemonize.c 2006-04-27 21:16:03.000000000 +0100
+++ monit-5.0.3/daemonize.c 2009-02-13 13:06:31.000000000 +0000
@@ -1,20 +1,30 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
@@ -65,7 +75,7 @@
*
* @author Jan-Henrik Haukeland,
*
- * @version \$Id: daemonize.c,v 1.21 2006/04/27 20:16:03 martinp Exp $
+ * @version \$Id: daemonize.c,v 1.27 2009/02/13 09:18:05 hauk Exp $
*
* @file
*/
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/debian/changelog /tmp/QeMlhPoI46/monit-5.0.3/debian/changelog
--- monit-4.8.1/debian/changelog 2009-08-24 16:12:08.000000000 +0100
+++ monit-5.0.3/debian/changelog 2009-08-24 16:12:09.000000000 +0100
@@ -1,3 +1,80 @@
+monit (1:5.0.3-3~blueyedppa1) hardy; urgency=low
+
+ * Backport for Hardy.
+
+ -- Daniel Hahler Mon, 24 Aug 2009 17:02:57 +0200
+
+monit (1:5.0.3-3) unstable; urgency=low
+
+ * Daemon poll interval moved to rc-file instead of defaults
+ (Closes: #541425)
+ * Package upgraded (Closes: 453248)
+ * Configuration snippets are included from /etc/monit/conf.d/*
+ (Closes: #296479)
+
+ -- Stefan Alfredsson Tue, 18 Aug 2009 22:49:13 +0200
+
+monit (1:5.0.3-2) unstable; urgency=low
+
+ * inet6 and getaddr() fix (Thanks to Michael Stapelberg!)
+ (Closes: #541139)
+
+ -- Stefan Alfredsson Wed, 12 Aug 2009 07:46:19 +0200
+
+monit (1:5.0.3-1) unstable; urgency=low
+
+ * New upstream release
+ * CPU-count fix in upstream release (Closes: #517816)
+ * Full eventqueue bug fixed in upstream release (Closes: #514709)
+ * Non-md5sum password bug fix by upstream (Closes: #474009)
+ * Uses unique message id's (Closes: #498346)
+ * Typo in "monit status" fixed (Closes: #506923)
+ * New format of debian watch file (Closes: #529128)
+ * Enabled PAM functionality
+
+ -- Stefan Alfredsson Sat, 08 Aug 2009 10:21:37 +0200
+
+monit (1:4.10.1-4) unstable; urgency=low
+
+ * Patch for config file location was not applied (Closes: #479357)
+ (thanks to DVZ-Team )
+ * The relocation patch created an unneccessary "file.c.orig", this
+ was removed from the patch.
+
+ -- Stefan Alfredsson Sun, 24 Aug 2008 23:44:46 +0000
+
+monit (1:4.10.1-3) unstable; urgency=low
+
+ * SSL enabled as upstream provided GPL/OpenSSL
+ license exception (Closes: #466821)
+
+ -- Stefan Alfredsson Fri, 22 Feb 2008 07:25:01 +0100
+
+monit (1:4.10.1-2) unstable; urgency=low
+
+ * Added build-dependency on dpatch (Closes: #463469)
+
+ -- Stefan Alfredsson Thu, 31 Jan 2008 22:22:59 +0100
+
+monit (1:4.10.1-1) unstable; urgency=low
+
+ * New upstream release (Closes: #453248)
+ * Upstream has fixed pid testing since v4.8 (Closes: #364844)
+ * Event queue segfault problem patched by upstream (Closes: #399027)
+ * HTTP segfault patched by upstream (Closes: #433164)
+ * Added LSB formatted dependency to init-script (Closes: #460299)
+ * Removed bashism echo -e in init-script (Closes: #411886)
+
+ -- Stefan Alfredsson Tue, 29 Jan 2008 21:36:33 +0100
+
+monit (1:4.9-1) unstable; urgency=low
+
+ * New upstream release
+ * Updated init-script to use printf instead of echo -e (Closes: #411886)
+ * Removed LFS patch because its integrated by upstream
+
+ -- Stefan Alfredsson Wed, 25 Jul 2007 00:05:35 +0200
+
monit (1:4.8.1-2.1) unstable; urgency=medium
* Non-maintainer upload.
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/debian/control /tmp/QeMlhPoI46/monit-5.0.3/debian/control
--- monit-4.8.1/debian/control 2009-08-24 16:12:08.000000000 +0100
+++ monit-5.0.3/debian/control 2009-08-24 16:12:09.000000000 +0100
@@ -2,8 +2,8 @@
Section: admin
Priority: optional
Maintainer: Stefan Alfredsson
-Build-Depends: debhelper (>> 3.0.0), byacc, flex, cdbs (>= 0.2.4), libssl-dev, automake1.9
-Standards-Version: 3.6.1
+Build-Depends: debhelper (>> 3.0.0), byacc, flex, cdbs (>= 0.2.4), libssl-dev, automake1.9, dpatch, libpam-dev
+Standards-Version: 3.8.2.0
Package: monit
Architecture: any
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/debian/copyright /tmp/QeMlhPoI46/monit-5.0.3/debian/copyright
--- monit-4.8.1/debian/copyright 2009-08-24 16:12:08.000000000 +0100
+++ monit-5.0.3/debian/copyright 2009-08-24 16:12:09.000000000 +0100
@@ -1,26 +1,53 @@
-This package was debianized by Fredrik Steen on
-Tue, 21 May 2002 09:52:55 +0200.
+This package was originally debianized by Fredrik Steen
+on Tue, 21 May 2002 09:52:55 +0200.
+
+The current Debian maintainser is Stefan Alfredsson
It was downloaded from http://www.tildeslash.com/monit/dist/
-Upstream Author: Jan-Henrik Haukeland
+Version 5.0.3 of the package was downloaded from http://mmonit.com/monit/dist/
+
+Upstream Authors: Jan-Henrik Haukeland and
+others according to the CONTRIBUTORS file distributed in the source
+archive.
+
+
+Copyright (C) 2000-2009 Tildeslash Ltd. All rights reserved.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
-Copyright:
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
- This package is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 dated June, 1991.
-
- This package is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this package; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA.
On Debian GNU/Linux systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL'.
+On Tue Feb 19 11:50:18 2008 UTC (2 days, 1 hour ago) by hauk,
+the following license exception was given:
+
+http://cvs.savannah.gnu.org/viewvc/monit/monit/COPYING?revision=1.3&view=markup
+
+ License Exception
+
+In addition, as a special exception, the copyright holders give
+permission to link the code of portions of this program with the
+OpenSSL library under certain conditions as described in each
+individual source file, and distribute linked combinations
+including the two.
+
+You must obey the GNU General Public License in all respects
+for all of the code used other than OpenSSL. If you modify
+file(s) with this exception, you may extend this exception to your
+version of the file(s), but you are not obligated to do so. If you
+do not wish to do so, delete this exception statement from your
+version. If you delete this exception statement from all source
+files in the program, then also delete it here.
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/debian/monit.default /tmp/QeMlhPoI46/monit-5.0.3/debian/monit.default
--- monit-4.8.1/debian/monit.default 2009-08-24 16:12:08.000000000 +0100
+++ monit-5.0.3/debian/monit.default 2009-08-24 16:12:09.000000000 +0100
@@ -1,11 +1,11 @@
# Defaults for monit initscript
# sourced by /etc/init.d/monit
# installed at /etc/default/monit by maintainer scripts
-# Fredrik Steen
+# Stefan Alfredsson
# You must set this variable to for monit to start
startup=0
-# To change the intervals which monit should run uncomment
-# and change this variable.
-# CHECK_INTERVALS=180
+# To change the intervals which monit should run,
+# edit the configuration file /etc/monit/monitrc
+# It can no longer be configured here.
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/debian/monit.dirs /tmp/QeMlhPoI46/monit-5.0.3/debian/monit.dirs
--- monit-4.8.1/debian/monit.dirs 2009-08-24 16:12:08.000000000 +0100
+++ monit-5.0.3/debian/monit.dirs 2009-08-24 16:12:09.000000000 +0100
@@ -1,3 +1,4 @@
etc/default
etc/monit
+etc/monit/conf.d
var/lib/monit
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/debian/monit.docs /tmp/QeMlhPoI46/monit-5.0.3/debian/monit.docs
--- monit-4.8.1/debian/monit.docs 2009-08-24 16:12:08.000000000 +0100
+++ monit-5.0.3/debian/monit.docs 2009-08-24 16:12:09.000000000 +0100
@@ -1,6 +1,8 @@
FAQ.txt
README
README.SSL
-UPGRADE.txt
+CHANGES.txt
+CONTRIBUTORS
doc/monit.html
debian/README.Debian
+contrib
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/debian/monit.init /tmp/QeMlhPoI46/monit-5.0.3/debian/monit.init
--- monit-4.8.1/debian/monit.init 2009-08-24 16:12:08.000000000 +0100
+++ monit-5.0.3/debian/monit.init 2009-08-24 16:12:09.000000000 +0100
@@ -1,13 +1,20 @@
#!/bin/sh
+### BEGIN INIT INFO
+# Provides: monit
+# Required-Start: $remote_fs
+# Required-Stop: $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: service and resource monitoring daemon
+### END INIT INFO
# /etc/init.d/monit start and stop monit daemon monitor process.
# Fredrik Steen, stone@debian.org
-:
+# Stefan Alfredsson, alfs@debian.org
+
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/monit
CONFIG="/etc/monit/monitrc"
DELAY="/etc/monit/monit_delay"
-CHECK_INTERVALS=180
-# We default to 180s (3min) check intervals
NAME=monit
DESC="daemon monitor"
@@ -20,15 +27,15 @@
. /etc/default/monit
fi
-ARGS="-d $CHECK_INTERVALS -c $CONFIG -s /var/lib/monit/monit.state"
+ARGS="-c $CONFIG -s /var/lib/monit/monit.state"
monit_not_configured () {
- echo -e "monit won't be started/stopped\n\tunless it it's configured"
+ printf "%b\n" "monit won't be started/stopped\n\tunless it it's configured"
if [ "$1" != "stop" ]
then
- echo -e "\tplease configure monit and then edit /etc/default/monit"
- echo -e "\tand set the \"startup\" variable to 1 in order to allow "
- echo -e "\tmonit to start"
+ printf "%b\n" "\tplease configure monit and then edit /etc/default/monit"
+ printf "%b\n" "\tand set the \"startup\" variable to 1 in order to allow "
+ printf "%b\n" "\tmonit to start"
fi
exit 0
}
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/debian/monit.pam /tmp/QeMlhPoI46/monit-5.0.3/debian/monit.pam
--- monit-4.8.1/debian/monit.pam 1970-01-01 01:00:00.000000000 +0100
+++ monit-5.0.3/debian/monit.pam 2009-08-24 16:12:09.000000000 +0100
@@ -0,0 +1,5 @@
+# monit: auth account password session
+auth sufficient pam_securityserver.so
+auth sufficient pam_unix.so
+auth required pam_deny.so
+account required pam_permit.so
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/debian/patches/00list /tmp/QeMlhPoI46/monit-5.0.3/debian/patches/00list
--- monit-4.8.1/debian/patches/00list 1970-01-01 01:00:00.000000000 +0100
+++ monit-5.0.3/debian/patches/00list 2009-08-24 16:12:09.000000000 +0100
@@ -0,0 +1,2 @@
+config_file_relocation
+monit.1-debian-path
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/debian/patches/config_file_relocation-2.patch /tmp/QeMlhPoI46/monit-5.0.3/debian/patches/config_file_relocation-2.patch
--- monit-4.8.1/debian/patches/config_file_relocation-2.patch 2009-08-24 16:12:08.000000000 +0100
+++ monit-5.0.3/debian/patches/config_file_relocation-2.patch 1970-01-01 01:00:00.000000000 +0100
@@ -1,50 +0,0 @@
-#!/bin/sh -e
-## 50_config_file_relocation.dpatch by Stefan Alfredsson
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
-if [ $# -ne 1 ]; then
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-fi
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-case "$1" in
- -patch) patch $patch_opts -p1 < $0;;
- -unpatch) patch $patch_opts -p1 -R < $0;;
- *)
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
---- file-orig.c Tue Apr 5 16:56:26 2005
-+++ file.c Tue Apr 5 16:58:55 2005
-@@ -155,6 +155,11 @@
- return (rcfile);
- }
- memset(rcfile, 0, STRLEN);
-+ snprintf(rcfile, STRLEN, "/etc/monit/%s", MONITRC);
-+ if(File_exist(rcfile)) {
-+ return (rcfile);
-+ }
-+ memset(rcfile, 0, STRLEN);
- snprintf(rcfile, STRLEN, "/etc/%s", MONITRC);
- if(File_exist(rcfile)) {
- return (rcfile);
-@@ -170,8 +175,8 @@
- return (rcfile);
- }
- LogError("%s: Cannot find the control file at "
-- "~/.%s, /etc/%s, /usr/local/etc/%s or at ./%s \n",
-- prog, MONITRC, MONITRC, MONITRC, MONITRC);
-+ "~/.%s, /etc/monit/%s, /etc/%s, /usr/local/etc/%s or at ./%s \n",
-+ prog, MONITRC, MONITRC, MONITRC, MONITRC, MONITRC);
- exit(1);
-
- }
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/debian/patches/config_file_relocation.dpatch /tmp/QeMlhPoI46/monit-5.0.3/debian/patches/config_file_relocation.dpatch
--- monit-4.8.1/debian/patches/config_file_relocation.dpatch 1970-01-01 01:00:00.000000000 +0100
+++ monit-5.0.3/debian/patches/config_file_relocation.dpatch 2009-08-24 16:12:09.000000000 +0100
@@ -0,0 +1,33 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## config_file_relocation.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad monit-4.10.1/file.c /tmp/dpep.zWsLpf/monit-4.10.1/file.c
+--- monit-4.10.1/file.c Sun Aug 12 20:02:48 2007
++++ /tmp/dpep.zWsLpf/monit-4.10.1/file.c Tue Jan 29 21:43:29 2008
+@@ -158,6 +158,11 @@
+ return (rcfile);
+ }
+ memset(rcfile, 0, STRLEN);
++ snprintf(rcfile, STRLEN, "/etc/monit/%s", MONITRC);
++ if(File_exist(rcfile)) {
++ return (rcfile);
++ }
++ memset(rcfile, 0, STRLEN);
+ snprintf(rcfile, STRLEN, "/etc/%s", MONITRC);
+ if(File_exist(rcfile)) {
+ return (rcfile);
+@@ -178,8 +183,8 @@
+ return (rcfile);
+ }
+ LogError("%s: Cannot find the control file at "
+- "~/.%s, /etc/%s, %s/%s, /usr/local/etc/%s or at ./%s \n",
+- prog, MONITRC, MONITRC, SYSCONFDIR, MONITRC, MONITRC, MONITRC);
++ "~/.%s, /etc/monit/%s, /etc/%s, /usr/local/etc/%s or at ./%s \n",
++ prog, MONITRC, MONITRC, MONITRC, MONITRC, MONITRC);
+ exit(1);
+
+ }
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/debian/patches/config_file_relocation.patch-old /tmp/QeMlhPoI46/monit-5.0.3/debian/patches/config_file_relocation.patch-old
--- monit-4.8.1/debian/patches/config_file_relocation.patch-old 2009-08-24 16:12:08.000000000 +0100
+++ monit-5.0.3/debian/patches/config_file_relocation.patch-old 1970-01-01 01:00:00.000000000 +0100
@@ -1,63 +0,0 @@
-#!/bin/sh -e
-## 50_config_file_relocation.dpatch by Fredrik Steen
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
-if [ $# -ne 1 ]; then
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-fi
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-case "$1" in
- -patch) patch $patch_opts -p1 < $0;;
- -unpatch) patch $patch_opts -p1 -R < $0;;
- *)
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
-diff -urNad /home/stone/debian/monit/monit-4.x/monit-4.0/file.c monit-4.0/file.c
---- /home/stone/debian/monit/monit-4.x/monit-4.0/file.c 2003-09-24 16:00:48.000000000 +0200
-+++ monit-4.0/file.c 2003-09-24 16:10:18.000000000 +0200
-@@ -175,6 +175,19 @@
- return (rcfile);
-
- }
-+
-+/**
-+ * Added by Fredrik Steen
-+ * Debian want's to have configfiles in subdir in /etc
-+ */
-+ memset(rcfile, 0, STRLEN);
-+ snprintf(rcfile, STRLEN, "/etc/monit/%s", MONITRC);
-+
-+ if(exist_file(rcfile)) {
-+
-+ return (rcfile);
-+
-+ }
-
- memset(rcfile, 0, STRLEN);
- snprintf(rcfile, STRLEN, "/etc/%s", MONITRC);
-@@ -194,8 +207,12 @@
-
- }
-
-- log("%s: Cannot find the control file at ~/.%s, /etc/%s or at ./%s \n",
-- prog, MONITRC, MONITRC, MONITRC);
-+ /**
-+ * Changed by Fredrik Steen
-+ * Changed the message to match with new location /etc/monit/
-+ */
-+ log("%s: Cannot find the control file at ~/.%s, /etc/%s, /etc/monit/%s or at ./%s \n",
-+ prog, MONITRC, MONITRC, MONITRC, MONITRC);
-
- exit(1);
-
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/debian/patches/monit.1-debian-path.dpatch /tmp/QeMlhPoI46/monit-5.0.3/debian/patches/monit.1-debian-path.dpatch
--- monit-4.8.1/debian/patches/monit.1-debian-path.dpatch 1970-01-01 01:00:00.000000000 +0100
+++ monit-5.0.3/debian/patches/monit.1-debian-path.dpatch 2009-08-24 16:12:09.000000000 +0100
@@ -0,0 +1,49 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## monit.1-debian-path.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad monit-5.0.3~/monit.1 monit-5.0.3/monit.1
+--- monit-5.0.3~/monit.1 2009-08-08 10:47:51.000000000 +0200
++++ monit-5.0.3/monit.1 2009-08-08 10:48:08.000000000 +0200
+@@ -313,7 +313,7 @@
+ .IX Header "HOW TO MONITOR"
+ Monit is configured and controlled via a control file called
+ \&\fBmonitrc\fR. The default location for this file is ~/.monitrc. If
+-this file does not exist, Monit will try /etc/monitrc, then
++this file does not exist, Monit will try /etc/monit/monitrc, then
+ \&\f(CW@sysconfdir\fR@/monitrc and finally ./monitrc.
+ .PP
+ A Monit control file consists of a series of service entries and
+@@ -471,7 +471,7 @@
+ .PP
+ .Vb 2
+ \& # Run Monit in standard run\-levels
+-\& mo:2345:respawn:/usr/local/bin/Monit \-Ic /etc/monitrc
++\& mo:2345:respawn:/usr/sbin/monit \-Ic /etc/monit/monitrc
+ .Ve
+ .PP
+ After you have modified init's configuration file, you can run
+@@ -1757,7 +1757,7 @@
+ Example:
+ .PP
+ .Vb 2
+-\& check file monit.bin with path "/usr/local/bin/monit"
++\& check file monit.bin with path "/usr/sbin/monit"
+ \& if failed permission 0555 then unmonitor
+ .Ve
+ .PP
+@@ -3662,9 +3662,9 @@
+ \&\fI~/.monitrc\fR
+ Default run control file
+ .PP
+-\&\fI/etc/monitrc\fR
++\&\fI/etc/monit/monitrc\fR
+ If the control file is not found in the default
+- location and /etc contains a \fImonitrc\fR file, this
++ location and /etc/monit/ contains a \fImonitrc\fR file, this
+ file will be used instead.
+ .PP
+ \&\fI./monitrc\fR
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/debian/patches/monit.1.path-debian-fix.patch /tmp/QeMlhPoI46/monit-5.0.3/debian/patches/monit.1.path-debian-fix.patch
--- monit-4.8.1/debian/patches/monit.1.path-debian-fix.patch 2009-08-24 16:12:08.000000000 +0100
+++ monit-5.0.3/debian/patches/monit.1.path-debian-fix.patch 1970-01-01 01:00:00.000000000 +0100
@@ -1,79 +0,0 @@
---- monit-orig.1 Tue Apr 5 17:01:31 2005
-+++ monit.1 Tue Apr 5 17:06:07 2005
-@@ -301,8 +301,8 @@
- .IX Header "HOW TO MONITOR"
- monit is configured and controlled via a control file called
- \&\fBmonitrc\fR. The default location for this file is ~/.monitrc. If
--this file does not exist, monit will try /etc/monitrc, then
--/usr/local/etc/monitrc and finally ./monitrc.
-+this file does not exist, monit will try /etc/monit/monitrc, then
-+/etc/monitrc, then /usr/local/etc/monitrc and finally ./monitrc.
- .PP
- A monit control file consists of a series of service entries and
- global option statements in a free\-format, token-oriented syntax.
-@@ -445,7 +445,7 @@
- .PP
- .Vb 2
- \& # Run monit in standard run\-levels
--\& mo:2345:respawn:/usr/local/bin/monit \-Ic /etc/monitrc
-+\& mo:2345:respawn:/usr/sbin/monit \-Ic /etc/monit/monitrc
- .Ve
- .PP
- After you have modified init's configuration file, you can run
-@@ -1414,7 +1414,7 @@
- script. Example:
- .PP
- .Vb 3
--\& check file monit.bin with path "/usr/local/bin/monit"
-+\& check file monit.bin with path "/usr/sbin/monit"
- \& if failed permission 0555 then unmonitor
- \& alert foo@bar
- .Ve
-@@ -3219,7 +3219,7 @@
- .IX Item "4. monit starts the node group"
- .PD
- .PP
--\&\fBMonit: \f(BI/etc/monitrc\fB\fR
-+\&\fBMonit: \f(BI/etc/monit/monitrc\fB\fR
- .PP
- This example describes a cluster with 2 nodes. Services running
- on Node 1 are in the group \fInode1\fR and Node 2 services are in
-@@ -3310,7 +3310,7 @@
- .PP
- .Vb 2
- \& #/etc/inittab
--\& mo:2345:respawn:/usr/local/bin/monit \-d 10 \-c /etc/monitrc \-g local
-+\& mo:2345:respawn:/usr/sbin/monit \-d 10 \-c /etc/monit/monitrc \-g local
- .Ve
- .PP
- \&\fBheartbeat: \f(BI/etc/ha.d/haresources\fB\fR
-@@ -3333,7 +3333,7 @@
- \& #
- \& # sample script for starting/stopping all services on node1
- \& #
--\& prog="/usr/local/bin/monit \-g node1"
-+\& prog="/usr/sbin/monit \-g node1"
- \& start()
- \& {
- \& echo \-n $"Starting $prog:"
-@@ -3386,9 +3386,9 @@
- \&\fI~/.monitrc\fR
- Default run control file
- .PP
--\&\fI/etc/monitrc\fR
-+\&\fI/etc/monit/monitrc\fR
- If the control file is not found in the default
-- location and /etc contains a \fImonitrc\fR file, this
-+ location and /etc/monit contains a \fImonitrc\fR file, this
- file will be used instead.
- .PP
- \&\fI./monitrc\fR
-@@ -3493,6 +3493,8 @@
- Rory Toma
- .PP
- See also http://www.tildeslash.com/monit/who.html
-++.PP
-++Edited by Stefan Alfredsson for the Debian project.
- .SH "COPYRIGHT"
- .IX Header "COPYRIGHT"
- Copyright (C) 2000\-2005 by the monit project group. All Rights
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/debian/patches/monit.1.path-debian-fix.patch-old /tmp/QeMlhPoI46/monit-5.0.3/debian/patches/monit.1.path-debian-fix.patch-old
--- monit-4.8.1/debian/patches/monit.1.path-debian-fix.patch-old 2009-08-24 16:12:08.000000000 +0100
+++ monit-5.0.3/debian/patches/monit.1.path-debian-fix.patch-old 1970-01-01 01:00:00.000000000 +0100
@@ -1,59 +0,0 @@
---- monit.1 2004-04-05 08:19:45.000000000 +0200
-+++ monit.2 2004-04-19 16:14:48.000000000 +0200
-@@ -297,7 +297,7 @@ useful to be able to test a remote host
- .IX Header "HOW TO MONITOR"
- monit is configured and controlled via a control file called
- \&\fBmonitrc\fR. The default location for this file is ~/.monitrc. If
--this file does not exist, monit will try /etc/monitrc and finally
-+this file does not exist, monit will try /etc/monit/monitrc and finally
- \&./monitrc.
- .PP
- A monit control file consists of a series of service entries and
-@@ -438,7 +438,7 @@ the command line. Here is a sample /etc/
- .PP
- .Vb 2
- \& # Run monit in standard run-levels
--\& mo:2345:respawn:/usr/local/bin/monit -Ic /etc/monitrc
-+\& mo:2345:respawn:/usr/sbin/monit -Ic /etc/monit/monitrc
- .Ve
- .PP
- After you have modified init's configuration file, you can run
-@@ -2897,7 +2897,7 @@ and restart the services there.
- .IX Item "4. monit starts the node group"
- .PD
- .PP
--\&\fBMonit: \f(BI/etc/monitrc\fB\fR
-+\&\fBMonit: \f(BI/etc/monit/monitrc\fB\fR
- .PP
- This example describes a cluster with 2 nodes. Services running
- on Node 1 are in the group \fInode1\fR and Node 2 services are in
-@@ -2988,7 +2988,7 @@ group heartbeat is member of.
- .PP
- .Vb 2
- \& #/etc/inittab
--\& mo:2345:respawn:/usr/local/bin/monit -d 10 -c /etc/monitrc -g local
-+\& mo:2345:respawn:/usr/sbin/monit -d 10 -c /etc/monit/monitrc -g local
- .Ve
- .PP
- \&\fBheartbeat: \f(BI/etc/ha.d/haresources\fB\fR
-@@ -3064,9 +3064,9 @@ a rc-script called at boot time and befo
- \&\fI~/.monitrc\fR
- Default run control file
- .PP
--\&\fI/etc/monitrc\fR
-+\&\fI/etc/monit/monitrc\fR
- If the control file is not found in the default
-- location and /etc contains a \fImonitrc\fR file, this
-+ location and /etc/monit contains a \fImonitrc\fR file, this
- file will be used instead.
- .PP
- \&\fI./monitrc\fR
-@@ -3171,6 +3171,8 @@ Christian Hopp
- .PP
- See also http://www.tildeslash.com/monit/who.html
-+.PP
-+Edited by Fredrik Steen for the Debian project.
- .SH "COPYRIGHT"
- .IX Header "COPYRIGHT"
- Copyright (C) 2000\-2004 by the monit project group. All Rights
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/debian/patches/monit-lfs.patch /tmp/QeMlhPoI46/monit-5.0.3/debian/patches/monit-lfs.patch
--- monit-4.8.1/debian/patches/monit-lfs.patch 2009-08-24 16:12:08.000000000 +0100
+++ monit-5.0.3/debian/patches/monit-lfs.patch 1970-01-01 01:00:00.000000000 +0100
@@ -1,282 +0,0 @@
-===================================================================
-RCS file: /sources/monit/monit/http/cervlet.c,v
-retrieving revision 1.205
-retrieving revision 1.206
-diff -u -r1.205 -r1.206
---- monit/http/cervlet.c 2006/07/04 10:40:17 1.205
-+++ monit/http/cervlet.c 2006/07/05 12:47:49 1.206
-#@@ -146,7 +146,7 @@
-# * @author Martin Pala
-# * @author Christian Hopp
-# *
-#- * @version \$Id: cervlet.c,v 1.205 2006/07/04 10:40:17 martinp Exp $
-#+ * @version \$Id: cervlet.c,v 1.206 2006/07/05 12:47:49 hauk Exp $
-# *
-# * @file
-# */
-@@ -1060,11 +1060,11 @@
- } else {
-
- out_print(res,
-- "
",
- (s->error & EVENT_SIZE)?" color='#ff0000'":"",
-- (unsigned long) s->inf->st_size);
-+ (unsigned long long) s->inf->st_size);
-
- }
- }
-@@ -2419,8 +2419,8 @@
- }
- if(s->type == TYPE_FILE) {
- out_print(res,
-- " %-33s %lu B\n",
-- "size", (unsigned long) s->inf->st_size);
-+ " %-33s %llu B\n",
-+ "size", (unsigned long long) s->inf->st_size);
- if(s->checksum) {
- out_print(res,
- " %-33s %s(%s)\n",
-===================================================================
-RCS file: /sources/monit/monit/configure.ac,v
-retrieving revision 1.142
-retrieving revision 1.143
-diff -u -r1.142 -r1.143
---- monit/configure.ac 2006/07/03 15:38:59 1.142
-+++ monit/configure.ac 2006/07/05 12:47:49 1.143
-#@@ -1,7 +1,7 @@
-# # Process this file with autoconf to produce a configure script.
-# # Mark Ferlatte,
-# #
-#-# $Id: configure.ac,v 1.142 2006/07/03 15:38:59 martinp Exp $
-#+# $Id: configure.ac,v 1.143 2006/07/05 12:47:49 hauk Exp $
-#
-# # autoconf requirement
-# AC_PREREQ([2.53])
-#@@ -10,7 +10,7 @@
-# AC_INIT([monit], [4.8.2-cvs], [monit-general@nongnu.org])
-#
-# # Package info
-#-AC_REVISION([$Revision: 1.142 $])
-#+AC_REVISION([$Revision: 1.143 $])
-# AC_CONFIG_SRCDIR([monitor.c])
-#
-# # ------------------------------------------------------------------------
-@@ -291,6 +291,9 @@
- AC_CHECK_FUNCS(setlocale)
- AC_CHECK_FUNCS(getaddrinfo)
-
-+# Turn on large-file support, on those platforms that implement it
-+AC_SYS_LARGEFILE
-+
-
- # Check if we do need external GNU replacements
- AC_FUNC_GETLOADAVG
-===================================================================
-RCS file: /sources/monit/monit/monitor.h,v
-retrieving revision 1.187
-retrieving revision 1.188
-diff -u -r1.187 -r1.188
---- monit/monitor.h 2006/06/28 09:02:43 1.187
-+++ monit/monitor.h 2006/07/05 12:47:49 1.188
-@@ -493,7 +493,7 @@
- /** Defines size object */
- typedef struct mysize {
- int operator; /**< Comparison operator */
-- unsigned long size; /**< Size watermark */
-+ unsigned long long size; /**< Size watermark */
- int test_changes; /**< TRUE if we only should test for changes */
- EventAction_T action; /**< Description of the action upon event occurence */
-
-@@ -585,8 +585,8 @@
- long space_total; /**< Used space total blocks */
-
- /* File specific */
-- size_t st_size; /**< Size */
-- size_t readpos; /**< Position for regex matching */
-+ off_t st_size; /**< Size */
-+ off_t readpos; /**< Position for regex matching */
- ino_t st_ino_prev; /**< Previous inode for regex matching */
- char *cs_sum; /**< Checksum */
-
-===================================================================
-RCS file: /sources/monit/monit/p.y,v
-retrieving revision 1.236
-retrieving revision 1.237
-diff -u -r1.236 -r1.237
---- monit/p.y 2006/06/23 20:38:12 1.236
-+++ monit/p.y 2006/07/05 12:47:49 1.237
-#@@ -30,7 +30,7 @@
-# * @author Martin Pala
-# * @author Christian Hopp
-# * @author Rory Toma
-#- * @version \$Id: p.y,v 1.236 2006/06/23 20:38:12 martinp Exp $
-#+ * @version \$Id: p.y,v 1.237 2006/07/05 12:47:49 hauk Exp $
-# */
-#
-# #include
-@@ -1448,7 +1448,7 @@
-
- size : IF SIZE operator NUMBER unit rate1 THEN action1 recovery {
- sizeset.operator= $3;
-- sizeset.size= ((unsigned long)$4 * $5);
-+ sizeset.size= ((unsigned long long)$4 * $5);
- addeventaction(&(sizeset).action, $8, $9);
- addsize(&sizeset, FALSE);
- }
-@@ -2044,7 +2044,7 @@
- s->action= ss->action;
- s->test_changes= ss->test_changes;
- if(ss->test_changes || nosize)
-- s->size= (unsigned long)buf.st_size;
-+ s->size= (unsigned long long)buf.st_size;
-
- s->next= current->sizelist;
- current->sizelist= s;
-===================================================================
-RCS file: /sources/monit/monit/util.c,v
-retrieving revision 1.184
-retrieving revision 1.185
-diff -u -r1.184 -r1.185
---- monit/util.c 2006/04/27 20:16:03 1.184
-+++ monit/util.c 2006/07/05 12:47:49 1.185
-#@@ -119,7 +119,7 @@
-# * @author Christian Hopp
-# * @author Michael Amster,
-# *
-#- * @version \$Id: util.c,v 1.184 2006/04/27 20:16:03 martinp Exp $
-#+ * @version \$Id: util.c,v 1.185 2006/07/05 12:47:49 hauk Exp $
-# * @file
-# */
-#
-@@ -862,7 +862,7 @@
- "Size",
- ratio1, actionnames[a->failed->id]);
- else
-- printf(" %-20s = if %s %lu byte(s) %s then %s else if passed %s then %s\n",
-+ printf(" %-20s = if %s %llu byte(s) %s then %s else if passed %s then %s\n",
- "Size", operatornames[sl->operator], sl->size,
- ratio1, actionnames[a->failed->id],
- ratio2, actionnames[a->passed->id]);
-@@ -1759,7 +1759,7 @@
- * @param rightExpression rval
- * Returns the boolean value of the expression
- */
--int Util_evalQExpression(int operator, int left, int right) {
-+int Util_evalQExpression(int operator, long long left, long long right) {
-
- switch(operator) {
- case OPERATOR_GREATER:
-===================================================================
-RCS file: /sources/monit/monit/util.h,v
-retrieving revision 1.15
-retrieving revision 1.16
-diff -u -r1.15 -r1.16
---- monit/util.h 2006/04/11 23:23:26 1.15
-+++ monit/util.h 2006/07/05 12:47:49 1.16
-#@@ -30,7 +30,7 @@
-# * @author Christian Hopp
-# * @author Michael Amster,
-# *
-#- * @version \$Id: util.h,v 1.15 2006/04/11 23:23:26 hauk Exp $
-#+ * @version \$Id: util.h,v 1.16 2006/07/05 12:47:49 hauk Exp $
-# * @file
-# */
-#
-@@ -371,7 +371,7 @@
- * @param rightExpression rval
- * @return the boolean value of the expression
- */
--int Util_evalQExpression(int operator, int left, int right);
-+int Util_evalQExpression(int operator, long long left, long long right);
-
-
- /*
-===================================================================
-RCS file: /sources/monit/monit/validate.c,v
-retrieving revision 1.154
-retrieving revision 1.155
-diff -u -r1.154 -r1.155
---- monit/validate.c 2006/06/28 09:02:43 1.154
-+++ monit/validate.c 2006/07/05 12:47:49 1.155
-#@@ -90,7 +90,7 @@
-# * @author Martin Pala
-# * @author Christian Hopp
-# *
-#- * @version \$Id: validate.c,v 1.154 2006/06/28 09:02:43 martinp Exp $
-#+ * @version \$Id: validate.c,v 1.155 2006/07/05 12:47:49 hauk Exp $
-# * @file
-# */
-#
-@@ -1094,7 +1094,7 @@
- /* reset expected value for next cycle */
- sl->size= s->inf->st_size;
- } else {
-- DEBUG("'%s' size has not changed [current size=%lu B]\n", s->name,
-+ DEBUG("'%s' size has not changed [current size=%llu B]\n", s->name,
- s->inf->st_size);
- Event_post(s, EVENT_CHANGED, STATE_PASSED, sl->action,
- "'%s' size was not changed", s->name, s->path);
-@@ -1105,10 +1105,10 @@
- /* we are testing constant value for failed or passed state */
- if(Util_evalQExpression(sl->operator, s->inf->st_size, sl->size)) {
- Event_post(s, EVENT_SIZE, STATE_FAILED, sl->action,
-- "'%s' size test failed for %s -- current size is %lu B",
-+ "'%s' size test failed for %s -- current size is %llu B",
- s->name, s->path, s->inf->st_size);
- } else {
-- DEBUG("'%s' file size check passed [current size=%lu B]\n", s->name,
-+ DEBUG("'%s' file size check passed [current size=%llu B]\n", s->name,
- s->inf->st_size);
- Event_post(s, EVENT_SIZE, STATE_PASSED, sl->action, "'%s' size passed", s->name);
- }
-===================================================================
-RCS file: /sources/monit/monit/xml.c,v
-retrieving revision 1.25
-retrieving revision 1.26
-diff -u -r1.25 -r1.26
---- monit/xml.c 2006/07/04 10:40:17 1.25
-+++ monit/xml.c 2006/07/05 12:47:49 1.26
-#@@ -50,7 +50,7 @@
-# *
-# * @author Martin Pala,
-# *
-#- * @version \$Id: xml.c,v 1.25 2006/07/04 10:40:17 martinp Exp $
-#+ * @version \$Id: xml.c,v 1.26 2006/07/05 12:47:49 hauk Exp $
-# *
-# * @file
-# */
-@@ -214,8 +214,8 @@
- }
- if(S->type == TYPE_FILE) {
- buf_print(B,
-- "\t\t%lu\r\n",
-- (unsigned long) S->inf->st_size);
-+ "\t\t%llu\r\n",
-+ (unsigned long long) S->inf->st_size);
- if(S->checksum) {
- buf_print(B,
- "\t\t%s\r\n",
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/debian/patches/rcfile.dpatch /tmp/QeMlhPoI46/monit-5.0.3/debian/patches/rcfile.dpatch
--- monit-4.8.1/debian/patches/rcfile.dpatch 1970-01-01 01:00:00.000000000 +0100
+++ monit-5.0.3/debian/patches/rcfile.dpatch 2009-08-24 16:12:09.000000000 +0100
@@ -0,0 +1,73 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## rcfile.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad monit-5.0.3~/debian/monit.init monit-5.0.3/debian/monit.init
+--- monit-5.0.3~/debian/monit.init 2009-08-08 10:21:37.000000000 +0200
++++ monit-5.0.3/debian/monit.init 2009-08-18 22:50:06.000000000 +0200
+@@ -15,8 +15,6 @@
+ DAEMON=/usr/sbin/monit
+ CONFIG="/etc/monit/monitrc"
+ DELAY="/etc/monit/monit_delay"
+-CHECK_INTERVALS=180
+-# We default to 180s (3min) check intervals
+ NAME=monit
+ DESC="daemon monitor"
+
+@@ -29,7 +27,7 @@
+ . /etc/default/monit
+ fi
+
+-ARGS="-d $CHECK_INTERVALS -c $CONFIG -s /var/lib/monit/monit.state"
++ARGS="-c $CONFIG -s /var/lib/monit/monit.state"
+
+ monit_not_configured () {
+ printf "%b\n" "monit won't be started/stopped\n\tunless it it's configured"
+diff -urNad monit-5.0.3~/monitrc monit-5.0.3/monitrc
+--- monit-5.0.3~/monitrc 2008-11-08 23:10:26.000000000 +0100
++++ monit-5.0.3/monitrc 2009-08-18 22:50:06.000000000 +0200
+@@ -16,7 +16,8 @@
+ ##
+ ## Start monit in the background (run as a daemon):
+ #
+-# set daemon 120 # check services at 2-minute intervals
++
++set daemon 180 # check services at 3-minute intervals
+ # with start delay 240 # optional: delay the first check by 4-minutes
+ # # (by default check immediately after monit start)
+ #
+@@ -136,7 +137,7 @@
+ ## additional recipients by specifying a local alert handler. The service may
+ ## be grouped using the GROUP option.
+ #
+-# check file apache_bin with path /usr/local/apache/bin/httpd
++# check file apache_bin with path /usr/sbin/apache2
+ # if failed checksum and
+ # expect the sum 8f7f419955cefa0b33a2ba316cba3659 then unmonitor
+ # if failed permission 755 then unmonitor
+@@ -156,9 +157,9 @@
+ ## statement. This service depends on another service (apache_bin) which
+ ## is defined above.
+ #
+-# check process apache with pidfile /usr/local/apache/logs/httpd.pid
+-# start program = "/etc/init.d/httpd start" with timeout 60 seconds
+-# stop program = "/etc/init.d/httpd stop"
++# check process apache with pidfile /var/run/apache2.pid
++# start program = "/etc/init.d/apache2 start" with timeout 60 seconds
++# stop program = "/etc/init.d/apache2 stop"
+ # if cpu > 60% for 2 cycles then alert
+ # if cpu > 80% for 5 cycles then restart
+ # if totalmem > 200.0 MB for 5 cycles then restart
+@@ -235,6 +236,6 @@
+ ## It is possible to include additional configuration parts from other files or
+ ## directories.
+ #
+-# include /etc/monit.d/*
+-#
+-#
++
++include /etc/monit/conf.d/*
++
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/debian/patches/use-getaddrinfo-instead-of-gethostbyname-to-work-with-ipv6.dpatch /tmp/QeMlhPoI46/monit-5.0.3/debian/patches/use-getaddrinfo-instead-of-gethostbyname-to-work-with-ipv6.dpatch
--- monit-4.8.1/debian/patches/use-getaddrinfo-instead-of-gethostbyname-to-work-with-ipv6.dpatch 1970-01-01 01:00:00.000000000 +0100
+++ monit-5.0.3/debian/patches/use-getaddrinfo-instead-of-gethostbyname-to-work-with-ipv6.dpatch 2009-08-24 16:12:09.000000000 +0100
@@ -0,0 +1,44 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## use-getaddrinfo-instead-of-gethostbyname-to-work-with-ipv6.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad monit-5.0.3~/net.c monit-5.0.3/net.c
+--- monit-5.0.3~/net.c 2009-05-25 21:02:56.000000000 +0200
++++ monit-5.0.3/net.c 2009-08-12 07:44:20.000000000 +0200
+@@ -240,16 +240,21 @@
+ int create_socket(const char *hostname, int port, int type, int timeout) {
+
+ int s;
+- struct hostent *hp;
++ int err;
+ struct sockaddr_in sin;
++ struct sockaddr_in *sa;
++ struct addrinfo hints;
++ struct addrinfo *result;
+
+ ASSERT(hostname);
+
+- if((hp= gethostbyname(hostname)) == NULL) {
++ memset(&hints, 0, sizeof(struct addrinfo));
++ hints.ai_family = AF_INET;
++ if((err= getaddrinfo(hostname, NULL, &hints, &result)) != 0) {
+ return -1;
+ }
+
+- endhostent();
++ sa = (struct sockaddr_in *)result->ai_addr;
+
+ if((s= socket(AF_INET, type, 0)) < 0) {
+ return -1;
+@@ -257,7 +262,7 @@
+
+ sin.sin_family= AF_INET;
+ sin.sin_port= htons(port);
+- memcpy(&sin.sin_addr, hp->h_addr, hp->h_length);
++ memcpy(&sin.sin_addr, &(sa->sin_addr), result->ai_addrlen);
+
+ if(! set_noblock(s)) {
+ goto error;
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/debian/rules /tmp/QeMlhPoI46/monit-5.0.3/debian/rules
--- monit-4.8.1/debian/rules 2009-08-24 16:12:08.000000000 +0100
+++ monit-5.0.3/debian/rules 2009-08-24 16:12:09.000000000 +0100
@@ -1,7 +1,7 @@
#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/dpatch.mk
include /usr/share/cdbs/1/class/autotools.mk
-include /usr/share/cdbs/1/rules/simple-patchsys.mk
# This variable adds several arguments to the ./configure invocation,
# in *addition* to what autotools.mk does normally. So the end command
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/debian/watch /tmp/QeMlhPoI46/monit-5.0.3/debian/watch
--- monit-4.8.1/debian/watch 2009-08-24 16:12:08.000000000 +0100
+++ monit-5.0.3/debian/watch 2009-08-24 16:12:09.000000000 +0100
@@ -1,5 +1,2 @@
-# Example watch control file for uscan
-# Rename this file to "watch" and then you can run the "uscan" command
-# to check for upstream updates and more.
-# Site Directory Pattern Version Scrip
-http://www.tildeslash.com /monit/dist/ monit-(.*)\.tar\.gz debian uupdate
+version=3
+http://mmonit.com/monit/dist/monit-([\d\.]*).tar.gz
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/device/device_common.c /tmp/QeMlhPoI46/monit-5.0.3/device/device_common.c
--- monit-4.8.1/device/device_common.c 2006-04-27 21:16:03.000000000 +0100
+++ monit-5.0.3/device/device_common.c 2009-05-25 20:02:57.000000000 +0100
@@ -1,29 +1,39 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
/**
- * System independent device methods.
+ * System independent filesystem methods.
*
* @author Jan-Henrik Haukeland,
* @author Martin Pala,
*
- * @version \$Id: device_common.c,v 1.6 2006/04/27 20:16:03 martinp Exp $
+ * @version \$Id: device_common.c,v 1.14 2009/05/04 19:37:14 martinp Exp $
*
* @file
*/
@@ -67,7 +77,7 @@
/**
* This function validates whether given object is valid for filesystem
* informations statistics and stores path suitable for it in given
- * device information structure for later use. Filesystem must be mounted.
+ * filesystem information structure for later use. Filesystem must be mounted.
*
* Valid objects are file or directory that are part of requested
* filesystem, block special device or mountpoint.
@@ -93,7 +103,8 @@
if(S_ISREG(buf.st_mode) || S_ISDIR(buf.st_mode)) {
- return strncpy(inf->mntpath, object, sizeof(inf->mntpath));
+ inf->mntpath[sizeof(inf->mntpath) - 1] = 0;
+ return strncpy(inf->mntpath, object, sizeof(inf->mntpath) - 1);
} else if(S_ISBLK(buf.st_mode)) {
@@ -114,11 +125,11 @@
* given information structure.
*
* @param inf Information structure where resulting data will be stored
- * @param object Identifies requested device - either file, directory,
+ * @param object Identifies requested filesystem - either file, directory,
* block special device or mountpoint
* @return TRUE if informations were succesfully read otherwise FALSE
*/
-int device_usage(Info_T inf, char *object) {
+int filesystem_usage(Info_T inf, char *object) {
ASSERT(inf);
ASSERT(object);
@@ -127,7 +138,10 @@
return FALSE;
}
- return device_usage_sysdep(inf);
+ /* save the previous filesystem flags */
+ inf->_flags= inf->flags;
+
+ return filesystem_usage_sysdep(inf);
}
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/device/device.h /tmp/QeMlhPoI46/monit-5.0.3/device/device.h
--- monit-4.8.1/device/device.h 2006-01-01 22:01:06.000000000 +0000
+++ monit-5.0.3/device/device.h 2009-02-13 13:06:34.000000000 +0000
@@ -1,27 +1,37 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
#ifndef MONIT_DEVICE_H
#define MONIT_DEVICE_H
char *device_path(Info_T, char *);
-int device_usage(Info_T, char *);
+int filesystem_usage(Info_T, char *);
#endif
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/device/device_sysdep.h /tmp/QeMlhPoI46/monit-5.0.3/device/device_sysdep.h
--- monit-4.8.1/device/device_sysdep.h 2006-01-01 22:01:06.000000000 +0000
+++ monit-5.0.3/device/device_sysdep.h 2009-02-13 13:06:34.000000000 +0000
@@ -1,27 +1,37 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
#ifndef MONIT_DEVICE_SYSDEP_H
#define MONIT_DEVICE_SYSDEP_H
char *device_mountpoint_sysdep(Info_T, char *);
-int device_usage_sysdep(Info_T);
+int filesystem_usage_sysdep(Info_T);
#endif
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/device/sysdep_AIX.c /tmp/QeMlhPoI46/monit-5.0.3/device/sysdep_AIX.c
--- monit-4.8.1/device/sysdep_AIX.c 2006-04-27 21:16:03.000000000 +0100
+++ monit-5.0.3/device/sysdep_AIX.c 2009-05-25 20:02:57.000000000 +0100
@@ -1,40 +1,76 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
/**
- * System dependent device methods.
+ * System dependent filesystem methods.
*
* @author Jan-Henrik Haukeland,
* @author Martin Pala,
*
- * @version \$Id: sysdep_AIX.c,v 1.11 2006/04/27 20:16:03 martinp Exp $
+ * @version \$Id: sysdep_AIX.c,v 1.20 2009/05/04 19:37:15 martinp Exp $
*
* @file
*/
#include
+#ifdef HAVE_STDIO_H
+#include
+#endif
+
+#ifdef HAVE_ERRNO_H
+#include
+#endif
+
+#ifdef HAVE_STRING_H
+#include
+#endif
+
+#ifdef HAVE_STRINGS_H
+#include
+#endif
+
+#ifdef HAVE_MNTENT_H
+#include
+#endif
+
+#ifdef HAVE_SYS_STATFS_H
+#include
+#endif
+
#include "monitor.h"
#include "device_sysdep.h"
/**
- * Unknown OS special block device dummy mountpoint method.
+ * AIX special block device mountpoint method. Filesystem must be mounted.
+ * In the case of success, mountpoint is stored in filesystem information
+ * structure for later use.
*
* @param inf Information structure
* @param blockdev Identifies block special device
@@ -42,7 +78,32 @@
*/
char *device_mountpoint_sysdep(Info_T inf, char *blockdev) {
- LogError("%s: Unsupported mounted filesystem information method", prog);
+ struct mntent *mnt;
+ FILE *mntfd;
+
+ ASSERT(inf);
+ ASSERT(blockdev);
+
+
+ if((mntfd= setmntent("/etc/mtab", "r")) == NULL) {
+ LogError("%s: Cannot open /etc/mtab file\n", prog);
+ return NULL;
+ }
+
+ /* Finf->mntpathirst match is significant */
+ while((mnt= getmntent(mntfd)) != NULL) {
+
+ if(IS(blockdev, mnt->mnt_fsname)) {
+
+ endmntent(mntfd);
+ inf->mntpath[sizeof(inf->mntpath) - 1] = 0;
+ return strncpy(inf->mntpath, mnt->mnt_dir, sizeof(inf->mntpath) - 1);
+
+ }
+
+ }
+
+ endmntent(mntfd);
return NULL;
@@ -50,16 +111,32 @@
/**
- * Unknown OS filesystem dummy usage statistics.
+ * AIX filesystem usage statistics. In the case of success result is stored in
+ * given information structure.
*
* @param inf Information structure
* @return FALSE
*/
-int device_usage_sysdep(Info_T inf) {
+int filesystem_usage_sysdep(Info_T inf) {
+
+ struct statfs usage;
+
+ ASSERT(inf);
- LogError("%s: Unsupported filesystem informations gathering method\n", prog);
+ if(statfs(inf->mntpath, &usage) != 0) {
+ LogError("%s: Error getting usage statistics for filesystem '%s' -- %s\n",
+ prog, inf->mntpath, STRERROR);
+ return FALSE;
+ }
+
+ inf->f_bsize= usage.f_bsize;
+ inf->f_blocks= usage.f_blocks;
+ inf->f_blocksfree= usage.f_bavail;
+ inf->f_blocksfreetotal= usage.f_bfree;
+ inf->f_files= usage.f_files;
+ inf->f_filesfree= usage.f_ffree;
- return FALSE;
+ return TRUE;
}
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/device/sysdep_DARWIN.c /tmp/QeMlhPoI46/monit-5.0.3/device/sysdep_DARWIN.c
--- monit-4.8.1/device/sysdep_DARWIN.c 2006-04-27 21:16:03.000000000 +0100
+++ monit-5.0.3/device/sysdep_DARWIN.c 2009-05-25 20:02:57.000000000 +0100
@@ -1,29 +1,39 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
/**
- * System dependent device methods.
+ * System dependent filesystem methods.
*
* @author Jan-Henrik Haukeland,
* @author Martin Pala,
*
- * @version \$Id: sysdep_DARWIN.c,v 1.14 2006/04/27 20:16:03 martinp Exp $
+ * @version \$Id: sysdep_DARWIN.c,v 1.22 2009/05/04 19:37:15 martinp Exp $
*
* @file
*/
@@ -55,7 +65,7 @@
/**
* MacOS X special block device mountpoint method. Filesystem must be mounted.
- * In the case of success, mountpoint is stored in device information
+ * In the case of success, mountpoint is stored in filesystem information
* structure for later use.
*
* @param inf Information structure where resulting data will be stored
@@ -70,12 +80,13 @@
ASSERT(blockdev);
if(statfs(blockdev, &usage) != 0) {
- LogError("%s: Error getting mountpoint for device '%s' -- %s\n",
+ LogError("%s: Error getting mountpoint for filesystem '%s' -- %s\n",
prog, blockdev, STRERROR);
return NULL;
}
- return strncpy(inf->mntpath, usage.f_mntonname, sizeof(inf->mntpath));
+ inf->mntpath[sizeof(inf->mntpath) - 1] = 0;
+ return strncpy(inf->mntpath, usage.f_mntonname, sizeof(inf->mntpath) - 1);
}
@@ -87,14 +98,14 @@
* @param inf Information structure where resulting data will be stored
* @return TRUE if informations were succesfully read otherwise FALSE
*/
-int device_usage_sysdep(Info_T inf) {
+int filesystem_usage_sysdep(Info_T inf) {
struct statfs usage;
ASSERT(inf);
if(statfs(inf->mntpath, &usage) != 0) {
- LogError("%s: Error getting usage statistics for device '%s' -- %s\n",
+ LogError("%s: Error getting usage statistics for filesystem '%s' -- %s\n",
prog, inf->mntpath, STRERROR);
return FALSE;
}
@@ -105,6 +116,7 @@
inf->f_blocksfreetotal= usage.f_bfree;
inf->f_files= usage.f_files;
inf->f_filesfree= usage.f_ffree;
+ inf->flags= usage.f_flags;
return TRUE;
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/device/sysdep_FREEBSD.c /tmp/QeMlhPoI46/monit-5.0.3/device/sysdep_FREEBSD.c
--- monit-4.8.1/device/sysdep_FREEBSD.c 2006-04-27 21:16:03.000000000 +0100
+++ monit-5.0.3/device/sysdep_FREEBSD.c 2009-05-25 20:02:57.000000000 +0100
@@ -1,29 +1,39 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
/**
- * System dependent device methods.
+ * System dependent filesystem methods.
*
* @author Jan-Henrik Haukeland,
* @author Martin Pala,
*
- * @version \$Id: sysdep_FREEBSD.c,v 1.14 2006/04/27 20:16:03 martinp Exp $
+ * @version \$Id: sysdep_FREEBSD.c,v 1.23 2009/05/04 19:37:15 martinp Exp $
*
* @file
*/
@@ -55,7 +65,7 @@
/**
* FreeBSD special block device mountpoint method. Filesystem must be mounted.
- * In the case of success, mountpoint is stored in device information
+ * In the case of success, mountpoint is stored in filesystem information
* structure for later use.
*
* @param inf Information structure where resulting data will be stored
@@ -70,12 +80,13 @@
ASSERT(blockdev);
if(statfs(blockdev, &usage) != 0) {
- LogError("%s: Error getting mountpoint for device '%s' -- %s\n",
+ LogError("%s: Error getting mountpoint for filesystem '%s' -- %s\n",
prog, blockdev, STRERROR);
return NULL;
}
- return strncpy(inf->mntpath, usage.f_mntonname, sizeof(inf->mntpath));
+ inf->mntpath[sizeof(inf->mntpath) - 1] = 0;
+ return strncpy(inf->mntpath, usage.f_mntonname, sizeof(inf->mntpath) - 1);
}
@@ -87,14 +98,14 @@
* @param inf Information structure where resulting data will be stored
* @return TRUE if informations were succesfully read otherwise FALSE
*/
-int device_usage_sysdep(Info_T inf) {
+int filesystem_usage_sysdep(Info_T inf) {
struct statfs usage;
ASSERT(inf);
if(statfs(inf->mntpath, &usage) != 0) {
- LogError("%s: Error getting usage statistics for device '%s' -- %s\n",
+ LogError("%s: Error getting usage statistics for filesystem '%s' -- %s\n",
prog, inf->mntpath, STRERROR);
return FALSE;
}
@@ -105,6 +116,7 @@
inf->f_blocksfreetotal= usage.f_bfree;
inf->f_files= usage.f_files;
inf->f_filesfree= usage.f_ffree;
+ inf->flags= usage.f_flags;
return TRUE;
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/device/sysdep_HPUX.c /tmp/QeMlhPoI46/monit-5.0.3/device/sysdep_HPUX.c
--- monit-4.8.1/device/sysdep_HPUX.c 2006-04-27 21:16:03.000000000 +0100
+++ monit-5.0.3/device/sysdep_HPUX.c 2009-05-25 20:02:57.000000000 +0100
@@ -1,29 +1,39 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
/**
- * System dependent device methods.
+ * System dependent filesystem methods.
*
* @author Jan-Henrik Haukeland,
* @author Martin Pala,
*
- * @version \$Id: sysdep_HPUX.c,v 1.14 2006/04/27 20:16:03 martinp Exp $
+ * @version \$Id: sysdep_HPUX.c,v 1.23 2009/05/04 19:37:15 martinp Exp $
*
* @file
*/
@@ -60,7 +70,7 @@
/**
* HPUX special block device mountpoint method. Filesystem must be mounted.
- * In the case of success, mountpoint is stored in device information
+ * In the case of success, mountpoint is stored in filesystem information
* structure for later use.
*
* @param inf Information structure where resulting data will be stored
@@ -77,7 +87,7 @@
if((mntfd= setmntent("/etc/mnttab", "r")) == NULL) {
- LogError("%s: Cannot open /etc/mnttab file", prog);
+ LogError("%s: Cannot open /etc/mnttab file\n", prog);
return NULL;
}
@@ -87,7 +97,8 @@
if(IS(blockdev, mnt->mnt_fsname)) {
endmntent(mntfd);
- return strncpy(inf->mntpath, mnt->mnt_dir, sizeof(inf->mntpath));
+ inf->mntpath[sizeof(inf->mntpath) - 1] = 0;
+ return strncpy(inf->mntpath, mnt->mnt_dir, sizeof(inf->mntpath) - 1);
}
@@ -107,14 +118,14 @@
* @param inf Information structure where resulting data will be stored
* @return TRUE if informations were succesfully read otherwise FALSE
*/
-int device_usage_sysdep(Info_T inf) {
+int filesystem_usage_sysdep(Info_T inf) {
struct statfs usage;
ASSERT(inf);
- if(statfsdev(inf->mntpath, &usage) != 0) {
- LogError("%s: Error getting usage statistics for device '%s' -- %s\n",
+ if(statfs(inf->mntpath, &usage) != 0) {
+ LogError("%s: Error getting usage statistics for filesystem '%s' -- %s\n",
prog, inf->mntpath, STRERROR);
return FALSE;
}
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/device/sysdep_LINUX.c /tmp/QeMlhPoI46/monit-5.0.3/device/sysdep_LINUX.c
--- monit-4.8.1/device/sysdep_LINUX.c 2006-04-27 21:16:03.000000000 +0100
+++ monit-5.0.3/device/sysdep_LINUX.c 2009-05-25 20:02:57.000000000 +0100
@@ -1,29 +1,39 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
/**
- * System dependent device methods.
+ * System dependent filesystem methods.
*
* @author Jan-Henrik Haukeland,
* @author Martin Pala,
*
- * @version \$Id: sysdep_LINUX.c,v 1.13 2006/04/27 20:16:03 martinp Exp $
+ * @version \$Id: sysdep_LINUX.c,v 1.24 2009/05/04 19:37:15 martinp Exp $
*
* @file
*/
@@ -46,8 +56,8 @@
#include
#endif
-#ifdef HAVE_SYS_VFS_H
-# include
+#ifdef HAVE_SYS_STATVFS_H
+# include
#endif
#ifdef HAVE_MNTENT_H
@@ -60,7 +70,7 @@
/**
* Linux special block device mountpoint method. Filesystem must be mounted.
- * In the case of success, mountpoint is stored in device information
+ * In the case of success, mountpoint is stored in filesystem information
* structure for later use.
*
* @param inf Information structure where resulting data will be stored
@@ -77,7 +87,7 @@
if((mntfd= setmntent("/etc/mtab", "r")) == NULL) {
- LogError("%s: Cannot open /etc/mtab file", prog);
+ LogError("%s: Cannot open /etc/mtab file\n", prog);
return NULL;
}
@@ -87,7 +97,8 @@
if(IS(blockdev, mnt->mnt_fsname)) {
endmntent(mntfd);
- return strncpy(inf->mntpath, mnt->mnt_dir, sizeof(inf->mntpath));
+ inf->mntpath[sizeof(inf->mntpath) - 1] = 0;
+ return strncpy(inf->mntpath, mnt->mnt_dir, sizeof(inf->mntpath) - 1);
}
@@ -107,14 +118,14 @@
* @param inf Information structure where resulting data will be stored
* @return TRUE if informations were succesfully read otherwise FALSE
*/
-int device_usage_sysdep(Info_T inf) {
+int filesystem_usage_sysdep(Info_T inf) {
- struct statfs usage;
+ struct statvfs usage;
ASSERT(inf);
- if(statfs(inf->mntpath, &usage) != 0) {
- LogError("%s: Error getting usage statistics for device '%s' -- %s\n",
+ if(statvfs(inf->mntpath, &usage) != 0) {
+ LogError("%s: Error getting usage statistics for filesystem '%s' -- %s\n",
prog, inf->mntpath, STRERROR);
return FALSE;
}
@@ -125,6 +136,7 @@
inf->f_blocksfreetotal= usage.f_bfree;
inf->f_files= usage.f_files;
inf->f_filesfree= usage.f_ffree;
+ inf->flags= usage.f_flag;
return TRUE;
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/device/sysdep_NETBSD.c /tmp/QeMlhPoI46/monit-5.0.3/device/sysdep_NETBSD.c
--- monit-4.8.1/device/sysdep_NETBSD.c 2006-04-27 21:16:03.000000000 +0100
+++ monit-5.0.3/device/sysdep_NETBSD.c 2009-05-25 20:02:57.000000000 +0100
@@ -1,28 +1,38 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
/**
- * System dependent device methods.
+ * System dependent filesystem methods.
*
* @author Martin Pala,
*
- * @version \$Id: sysdep_NETBSD.c,v 1.4 2006/04/27 20:16:03 martinp Exp $
+ * @version \$Id: sysdep_NETBSD.c,v 1.13 2009/05/04 19:37:15 martinp Exp $
*
* @file
*/
@@ -49,12 +59,16 @@
#include
#endif
+#ifdef HAVE_SYS_STATVFS_H
+#include
+#endif
+
#include "monitor.h"
#include "device_sysdep.h"
/**
* NetBSD special block device mountpoint method. Filesystem must be mounted.
- * In the case of success, mountpoint is stored in device information
+ * In the case of success, mountpoint is stored in filesystem information
* structure for later use.
*
* @param inf Information structure where resulting data will be stored
@@ -63,18 +77,27 @@
*/
char *device_mountpoint_sysdep(Info_T inf, char *blockdev) {
+#if(__NetBSD_Version__ >= 300000000)
+ struct statvfs usage;
+#else
struct statfs usage;
+#endif
ASSERT(inf);
ASSERT(blockdev);
+#if(__NetBSD_Version__ >= 300000000)
+ if(statvfs(blockdev, &usage) != 0) {
+#else
if(statfs(blockdev, &usage) != 0) {
- LogError("%s: Error getting mountpoint for device '%s' -- %s\n",
+#endif
+ LogError("%s: Error getting mountpoint for filesystem '%s' -- %s\n",
prog, blockdev, STRERROR);
return NULL;
}
- return strncpy(inf->mntpath, usage.f_mntonname, sizeof(inf->mntpath));
+ inf->mntpath[sizeof(inf->mntpath) - 1] = 0;
+ return strncpy(inf->mntpath, usage.f_mntonname, sizeof(inf->mntpath) - 1);
}
@@ -86,14 +109,22 @@
* @param inf Information structure where resulting data will be stored
* @return TRUE if informations were succesfully read otherwise FALSE
*/
-int device_usage_sysdep(Info_T inf) {
+int filesystem_usage_sysdep(Info_T inf) {
+#if(__NetBSD_Version__ >= 300000000)
+ struct statvfs usage;
+#else
struct statfs usage;
+#endif
ASSERT(inf);
+#if(__NetBSD_Version__ >= 300000000)
+ if(statvfs(inf->mntpath, &usage) != 0) {
+#else
if(statfs(inf->mntpath, &usage) != 0) {
- LogError("%s: Error getting usage statistics for device '%s' -- %s\n",
+#endif
+ LogError("%s: Error getting usage statistics for filesystem '%s' -- %s\n",
prog, inf->mntpath, STRERROR);
return FALSE;
}
@@ -104,6 +135,11 @@
inf->f_blocksfreetotal= usage.f_bfree;
inf->f_files= usage.f_files;
inf->f_filesfree= usage.f_ffree;
+#if(__NetBSD_Version__ >= 300000000)
+ inf->flags= usage.f_flag;
+#else
+ inf->flags= usage.f_flags;
+#endif
return TRUE;
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/device/sysdep_OPENBSD.c /tmp/QeMlhPoI46/monit-5.0.3/device/sysdep_OPENBSD.c
--- monit-4.8.1/device/sysdep_OPENBSD.c 2006-04-27 21:16:03.000000000 +0100
+++ monit-5.0.3/device/sysdep_OPENBSD.c 2009-05-25 20:02:57.000000000 +0100
@@ -1,29 +1,39 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
/**
- * System dependent device methods.
+ * System dependent filesystem methods.
*
* @author Jan-Henrik Haukeland,
* @author Martin Pala,
*
- * @version \$Id: sysdep_OPENBSD.c,v 1.14 2006/04/27 20:16:03 martinp Exp $
+ * @version \$Id: sysdep_OPENBSD.c,v 1.22 2009/05/04 19:37:15 martinp Exp $
*
* @file
*/
@@ -55,7 +65,7 @@
/**
* OpenBSD special block device mountpoint method. Filesystem must be mounted.
- * In the case of success, mountpoint is stored in device information
+ * In the case of success, mountpoint is stored in filesystem information
* structure for later use.
*
* @param inf Information structure where resulting data will be stored
@@ -70,12 +80,13 @@
ASSERT(blockdev);
if(statfs(blockdev, &usage) != 0) {
- LogError("%s: Error getting mountpoint for device '%s' -- %s\n",
+ LogError("%s: Error getting mountpoint for filesystem '%s' -- %s\n",
prog, blockdev, STRERROR);
return NULL;
}
- return strncpy(inf->mntpath, usage.f_mntonname, sizeof(inf->mntpath));
+ inf->mntpath[sizeof(inf->mntpath) - 1] = 0;
+ return strncpy(inf->mntpath, usage.f_mntonname, sizeof(inf->mntpath) - 1);
}
@@ -87,14 +98,14 @@
* @param inf Information structure where resulting data will be stored
* @return TRUE if informations were succesfully read otherwise FALSE
*/
-int device_usage_sysdep(Info_T inf) {
+int filesystem_usage_sysdep(Info_T inf) {
struct statfs usage;
ASSERT(inf);
if(statfs(inf->mntpath, &usage) != 0) {
- LogError("%s: Error getting usage statistics for device '%s' -- %s\n",
+ LogError("%s: Error getting usage statistics for filesystem '%s' -- %s\n",
prog, inf->mntpath, STRERROR);
return FALSE;
}
@@ -105,6 +116,7 @@
inf->f_blocksfreetotal= usage.f_bfree;
inf->f_files= usage.f_files;
inf->f_filesfree= usage.f_ffree;
+ inf->flags= usage.f_flags;
return TRUE;
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/device/sysdep_SOLARIS.c /tmp/QeMlhPoI46/monit-5.0.3/device/sysdep_SOLARIS.c
--- monit-4.8.1/device/sysdep_SOLARIS.c 2006-04-27 21:16:03.000000000 +0100
+++ monit-5.0.3/device/sysdep_SOLARIS.c 2009-05-25 20:02:57.000000000 +0100
@@ -1,29 +1,39 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
/**
- * System dependent device methods.
+ * System dependent filesystem methods.
*
* @author Jan-Henrik Haukeland,
* @author Martin Pala,
*
- * @version \$Id: sysdep_SOLARIS.c,v 1.13 2006/04/27 20:16:03 martinp Exp $
+ * @version \$Id: sysdep_SOLARIS.c,v 1.22 2009/05/04 19:37:15 martinp Exp $
*
* @file
*/
@@ -60,7 +70,7 @@
/**
* Solaris special block device mountpoint method. Filesystem must be mounted.
- * In the case of success, mountpoint is stored in device information
+ * In the case of success, mountpoint is stored in filesystem information
* structure for later use.
*
* @param inf Information structure where resulting data will be stored
@@ -77,7 +87,7 @@
if((mntfd= fopen("/etc/mnttab", "r")) == NULL) {
- LogError("%s: Cannot open /etc/mnttab file", prog);
+ LogError("%s: Cannot open /etc/mnttab file\n", prog);
return NULL;
}
@@ -87,7 +97,8 @@
if(IS(blockdev, mnt.mnt_special)) {
fclose(mntfd);
- return strncpy(inf->mntpath, mnt.mnt_mountp, sizeof(inf->mntpath));
+ inf->mntpath[sizeof(inf->mntpath) - 1] = 0;
+ return strncpy(inf->mntpath, mnt.mnt_mountp, sizeof(inf->mntpath) - 1);
}
@@ -107,14 +118,14 @@
* @param inf Information structure where resulting data will be stored
* @return TRUE if informations were succesfully read otherwise FALSE
*/
-int device_usage_sysdep(Info_T inf) {
+int filesystem_usage_sysdep(Info_T inf) {
struct statvfs usage;
ASSERT(inf);
if(statvfs(inf->mntpath, &usage) != 0) {
- LogError("%s: Error getting usage statistics for device '%s' -- %s\n",
+ LogError("%s: Error getting usage statistics for filesystem '%s' -- %s\n",
prog, inf->mntpath, STRERROR);
return FALSE;
}
@@ -125,6 +136,7 @@
inf->f_blocksfreetotal= usage.f_bfree/(usage.f_frsize?(usage.f_bsize/usage.f_frsize):1);
inf->f_files= usage.f_files;
inf->f_filesfree= usage.f_ffree;
+ inf->flags= usage.f_flag;
return TRUE;
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/device/sysdep_UNKNOWN.c /tmp/QeMlhPoI46/monit-5.0.3/device/sysdep_UNKNOWN.c
--- monit-4.8.1/device/sysdep_UNKNOWN.c 2006-04-27 21:16:03.000000000 +0100
+++ monit-5.0.3/device/sysdep_UNKNOWN.c 2009-02-13 13:06:35.000000000 +0000
@@ -1,29 +1,39 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
/**
- * System dependent device methods.
+ * System dependent filesystem methods.
*
* @author Jan-Henrik Haukeland,
* @author Martin Pala,
*
- * @version \$Id: sysdep_UNKNOWN.c,v 1.11 2006/04/27 20:16:03 martinp Exp $
+ * @version \$Id: sysdep_UNKNOWN.c,v 1.18 2009/02/13 09:18:14 hauk Exp $
*
* @file
*/
@@ -42,7 +52,7 @@
*/
char *device_mountpoint_sysdep(Info_T inf, char *blockdev) {
- LogError("%s: Unsupported mounted filesystem information method", prog);
+ LogError("%s: Unsupported mounted filesystem information method\n", prog);
return NULL;
@@ -55,7 +65,7 @@
* @param inf Information structure
* @return FALSE
*/
-int device_usage_sysdep(Info_T inf) {
+int filesystem_usage_sysdep(Info_T inf) {
LogError("%s: Unsupported filesystem informations gathering method\n",
prog);
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/doc/examples.html /tmp/QeMlhPoI46/monit-5.0.3/doc/examples.html
--- monit-4.8.1/doc/examples.html 2006-05-16 20:16:21.000000000 +0100
+++ monit-5.0.3/doc/examples.html 2009-05-28 22:47:57.000000000 +0100
@@ -1,87 +1,143 @@
- [index.gif]
-
-Real-world configuration examples
-
- Here's some real-world configuration examples for monit. It can be
- helpful to look at the examples given here to see how a service is
- running, where it put its pidfile, how to call the start and stop
- methods for a service, etc.
-
- You are welcome to cut & paste configuration into your own monitrc
- control file. NB! please check and edit as needed, some ip-addresses
- and paths mentioned here may or will differ from your system.
-
- You may also want to checkout Christian Hopp's configuration example.
- He demonstrate how you can setup a clean and structured configuration
- utilizing the monit include statement (which he was responsible for).
- Each check for a particular service is written in it's own file and
- included in the top-level monit control file. Many of the service
- files are also well worth studying in their own rights. Although this
- example is for a Linux Debian distribution it is general enough to be
- of interest for any platform.
-
- * System Services
- + Cron (program timer)
- + Gdm (gnome desktop manager)
- + Inetd (internet service manager)
- + Syslogd (system logfile daemon)
- + Xfs (X font server)
- + YPBind (Yellow page bind daemon)
- + Net-SNMP (SNMP agent)
- + NTP (time server)
- + Nscd (name service caching daemon)
- * Name Services
- + Bind (chrooted)
- * FTP Services
- + Proftpd
- * Login Services
- + SSHD
- * WWW Services
- + Apache (web server)
- + Zope (appication server)
- + Squid (http/ftp proxy)
- + Privoxy (spamfilter proxy)
- * Mail Services
- + Postfix (mail server)
- + sendmail (mail server)
- + Qpopper (pop3 server)
- + Spamassassin daemon (spam scan daemon)
- + Amavis-new (mail virus scanner)
- + Policyd (Postfix access policy delegation daemon)
- * Virus Scanner
- + Sophie (virus scan daemon)
- + Trophie (virus scan daemon)
- + Clamavd (virus scan daemon)
- * Printing Services
- + LPRng (printer daemon)
- * Database Services
- + MySQL Server
- + OpenLDAP Server
- * File Services
- + Samba (windows file/domain server)
- * Sun ONE Services
- + iPlanetDirectoryServer (Sun ONE)
- + iPlanetMessagingServer processes (Sun ONE)
- + iPlanetCalendarServer processes (Sun ONE)
- * Misc Services
- + apcupsd (APC ups daemon)
- + Webmin (remote admin service)
- + STunnel (SSL tunnel)
- * Misc Usage
- + Watch and analyze crashdumps (Solaris)
- + Watch and analyze crashdumps (Linux)
- + Start and stop tcpdump based on condition
- + Rotate tcpdump until condition occures
- + MySQL event driven process list
-
-System Services
-
- Cron (program timer)
-
- When used with Solaris the init.d script needs a modification. Add the
- following line after start of cron according to the Monit FAQ:
- /usr/bin/pgrep -x -u 0 -P 1 cron > /var/run/cron.pid
+
+
+
+
+
+
Real-world configuration examples
+
+Here's some real-world configuration examples for monit. It can be
+helpful to look at the examples given here to see how a service is
+running, where it put its pidfile, how to call the start and stop
+methods for a service, etc.
+
+
You are welcome to cut & paste configuration into your own
+monitrc control file. NB! please check and edit as
+needed, some ip-addresses and paths mentioned here may or will differ
+from your system.
+
+
You may also want to checkout Christian Hopp's configuration
+example. He demonstrate how you can setup a clean and structured
+configuration utilizing the monit include statement (which he was
+responsible for). Each check for a particular service is written
+in it's own file and included in the top-level monit control
+file. Many of the service files are also well worth studying in their
+own rights. Although this example is for a Linux Debian distribution
+it is general enough to be of interest for any platform.
+
+
+
check process cron with pidfile /var/run/cron.pid
group system
start program = "/etc/init.d/cron start"
@@ -95,27 +151,29 @@
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
+
check process gdm with pidfile /var/run/gdm.pid
start program = "/etc/init.d/gdm start"
stop program = "/etc/init.d/gdm stop"
if 5 restarts within 5 cycles then timeout
+
check process inetd with pidfile /var/run/inetd.pid
start program = "/etc/init.d/inetd start"
stop program = "/etc/init.d/inetd stop"
- if failed host 192.168.1.1 port 25 protocol smtp then restart # e.g. exim
- if failed host 192.168.1.1 port 515 then restart # e.g. cups-l
-pd
+ if failed host 192.168.1.1 port 25 protocol smtp then restart # e.g. exim
+ if failed host 192.168.1.1 port 515 then restart # e.g. cups-lpd
if failed host 192.168.1.1 port 113 then restart # e.g. ident
if 5 restarts within 5 cycles then timeout
+
check process syslogd with pidfile /var/run/syslogd.pid
start program = "/etc/init.d/sysklogd start"
stop program = "/etc/init.d/sysklogd stop"
@@ -123,99 +181,109 @@
check file syslogd_file with path /var/log/syslog
if timestamp > 65 minutes then alert # Have you seen "-- MARK --"?
+
check process xfs with pidfile /var/run/xfs.pid
start program = "/etc/init.d/xfs start"
stop program = "/etc/init.d/xfs stop"
if 5 restarts within 5 cycles then timeout
+
check process ypbind with pidfile /var/run/ypbind.pid
start program = "/etc/init.d/nis start"
stop program = "/etc/init.d/nis stop"
if 5 restarts within 5 cycles then timeout
+
check process snmpd with pidfile /var/run/snmpd
start program = "/etc/init.d/snmpd start"
stop program = "/etc/init.d/snmpd stop"
if failed host 192.168.1.1 port 161 type udp then restart
if failed host 192.168.1.1 port 199 type tcp then restart
if 5 restarts within 5 cycles then timeout
+
check process ntpd with pidfile /var/run/ntpd.pid
start program = "/etc/init.d/ntpd start"
stop program = "/etc/init.d/ntpd stop"
if failed host 127.0.0.1 port 123 type udp then alert
if 5 restarts within 5 cycles then timeout
+
check process nscd with pidfile /var/run/nscd/nscd.pid
start program = "/etc/init.d/nscd start"
stop program = "/etc/init.d/nscd stop"
if 5 restarts within 5 cycles then timeout
+
check process named with pidfile /var/named/chroot/var/run/named/named.pid
start program = "/etc/init.d/named start"
stop program = "/etc/init.d/named stop"
if failed host 127.0.0.1 port 53 type tcp protocol dns then alert
if failed host 127.0.0.1 port 53 type udp protocol dns then alert
if 5 restarts within 5 cycles then timeout
+
check process proftpd with pidfile /var/run/proftpd.pid
start program = "/etc/init.d/proftpd start"
stop program = "/etc/init.d/proftpd stop"
if failed port 21 protocol ftp then restart
if 5 restarts within 5 cycles then timeout
+
check process sshd with pidfile /var/run/sshd.pid
start program "/etc/init.d/sshd start"
stop program "/etc/init.d/sshd stop"
if failed port 22 protocol ssh then restart
if 5 restarts within 5 cycles then timeout
+
-WWW Services
-
- Apache (web server)
-
- Hint: It is recommended to use a "token" file (an empty file) for
- monit to request. That way, it is easy to filter out all the requests
- made by monit in the httpd access log file. Here's a trick shared by
- Marco Ermini, place the following in httpd.conf to stop apache from
- loggin any requests done by monit:
+
+ Hint: It is recommended to use a "token" file (an empty file)
+ for monit to request. That way, it is easy to filter out all the
+ requests made by monit in the httpd access log file. Here's a trick
+ shared by Marco Ermini, place the following in httpd.conf to stop
+ apache from loggin any requests done by monit:
+
+
SetEnvIf Request_URI "^\/monit\/token$" dontlog
CustomLog logs/access.log common env=!dontlog
+
- In some cases init scripts for apache and apache-ssl are separated,
- e.g. Debian Linux.
+
+ In some cases init scripts for apache and apache-ssl are separated, e.g. Debian Linux.
+
+
check process apache with pidfile /opt/apache_misc/logs/httpd.pid
group www
start program = "/etc/init.d/apache start"
stop program = "/etc/init.d/apache stop"
- if failed host 192.168.1.1 port 80
+ if failed host 192.168.1.1 port 80
protocol HTTP request /monit/token then restart
- if failed host 192.168.1.1 port 443 type TCPSSL
+ if failed host 192.168.1.1 port 443 type TCPSSL
certmd5 12-34-56-78-90-AB-CD-EF-12-34-56-78-90-AB-CD-EF
- protocol HTTP request /monit/token then restart
+ protocol HTTP request /monit/token then restart
if 5 restarts within 5 cycles then timeout
depends on apache_bin
depends on apache_rc
@@ -233,9 +301,10 @@
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
+
check process zope with pidfile /opt/Zope/var/zProcessManager.pid
start program = "/etc/init.d/zope start"
stop program = "/etc/init.d/zope stop"
@@ -243,9 +312,10 @@
if failed host 192.168.1.1 port 8080 protocol HTTP then restart
if 5 restarts within 5 cycles then timeout
every 5
+
check process squid with pidfile /opt/squid/logs/squid.pid
group www
start program = "/etc/init.d/squid start"
@@ -268,9 +338,10 @@
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
+
check process privoxy with pidfile /opt/privoxy/var/privoxy.pid
group www
start program = "/etc/init.d/privoxy start"
@@ -293,11 +364,12 @@
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
+
check process postfix with pidfile /var/spool/postfix/pid/master.pid
group mail
start program = "/etc/init.d/postfix start"
@@ -312,9 +384,36 @@
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
+
+ check process exim with pidfile /var/run/exim.pid
+ group mail
+ start program = "/etc/init.d/exim start"
+ stop program = "/etc/init.d/exim stop"
+ if failed port 25 protocol smtp then restart
+ if 5 restarts within 5 cycles then timeout
+ depends on exim_bin
+ depends on exim_rc
+ check file exim_bin with path /usr/sbin/exim
+ group mail
+ if failed checksum then unmonitor
+ if failed permission 4755 then unmonitor
+ if failed uid root then unmonitor
+ if failed gid root then unmonitor
+
+ check file exim_rc with path /etc/init.d/exim
+ group mail
+ if failed checksum then unmonitor
+ if failed permission 755 then unmonitor
+ if failed uid root then unmonitor
+ if failed gid root then unmonitor
+
check process sendmail with pidfile /var/run/sendmail.pid
group mail
start program = "/etc/init.d/sendmail start"
@@ -337,9 +436,10 @@
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
+
check process qpopper with pidfile /var/run/popper.pid
group mail
start program = "/etc/init.d/qpopper start"
@@ -362,9 +462,10 @@
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
+
check process spamd with pidfile /var/run/spamd.pid
group mail
start program = "/etc/init.d/spamd start"
@@ -375,7 +476,7 @@
depends on spamd_bin
depends on spamd_rc
- check file smapd_bin with path /usr/local/bin/spamd
+ check file spamd_bin with path /usr/local/bin/spamd
group mail
if failed checksum then unmonitor
if failed permission 755 then unmonitor
@@ -388,9 +489,10 @@
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
+
check process amavisd with pidfile /opt/virus/amavis-new/var/run/amavisd.pid
group mail
start program = "/etc/init.d/amavis-new start"
@@ -413,9 +515,10 @@
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
+
check process policyd with pidfile /var/run/policyd.pid
group mail
start program = "/etc/init.d/policyd start"
@@ -446,23 +549,20 @@
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
+
check process sophie with pidfile /var/run/sophie.pid
group virus
start program = "/etc/init.d/sophie start"
stop program = "/etc/init.d/sophie stop"
if failed unixsocket /var/run/sophie then restart
if 5 restarts within 5 cycles then timeout
-
-Virus Scanner
-
-
- Sophie (virus scan daemon)
-
+
check process sophie with pidfile /var/run/sophie.pid
group virus
start program = "/etc/init.d/sophie start"
@@ -485,9 +585,11 @@
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
+
check process trophie with pidfile /var/run/trophie.pid
group virus
start program = "/etc/init.d/trophie start"
@@ -510,9 +612,10 @@
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
+
check process clamavd with pidfile /var/run/clamd.pid
group virus
start program = "/etc/init.d/clamavd start"
@@ -535,13 +638,15 @@
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
+
-Database Services
-
- MySQL Server
-
- The name of the pidfile consists usually of the fully quallified
- domainname and pidfile as extension.
+
+ The name of the pidfile consists usually of the fully
+ quallified domainname and pidfile as extension.
+
+
check process mysql with pidfile /opt/mysql/data/myserver.mydomain.pid
group database
start program = "/etc/init.d/mysql start"
@@ -564,9 +669,10 @@
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
+
check process slapd with pidfile /var/run/slapd.pid
group database
start program = "/etc/init.d/slapd start"
@@ -589,14 +695,32 @@
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
+
-File Services
-
- Samba (windows file/domain server)
- Hint: For enhanced controllability of the service it is handy to split
- up the samba init file into two pieces, one for smbd (the file
- service) and one for nmbd (the name service).
+
+ Generally choosing either the socket or a TCP/IP connect is sufficient.
+
+
+check process postgres with pidfile /var/postgres/postmaster.pid
+ group database
+ start program = "/etc/init.d/postgresql start"
+ stop program = "/etc/init.d/postgresql stop"
+ if failed unixsocket /var/run/postgresql/.s.PGSQL.5432 protocol pgsql then restart
+ if failed host 192.168.1.1 port 5432 protocol pgsql then restart
+ if 5 restarts within 5 cycles then timeout
+
+ Hint: For enhanced controllability of the service it is
+ handy to split up the samba init file into two pieces, one for smbd
+ (the file service) and one for nmbd (the name service).
+
+
check process smbd with pidfile /opt/samba2.2/var/locks/smbd.pid
group samba
start program = "/etc/init.d/smbd start"
@@ -611,6 +735,9 @@
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
+
+
+
check process nmbd with pidfile /opt/samba2.2/var/locks/nmbd.pid
group samba
start program = "/etc/init.d/nmbd start"
@@ -626,11 +753,11 @@
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
+
check process lprng with pidfile /var/run/lpd.515
group printer
start program = "/etc/init.d/lprng start"
@@ -653,40 +780,43 @@
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
+
-Sun ONE Services
-
- iPlanetDirectoryServer slapd
-
+
check process ldap-master
with pidfile /usr/iplanet/ldapmaster/slapd-master-1/logs/pid
start program "/usr/iplanet/ldapmaster/slapd-master-1/start-slapd"
stop program "/usr/iplanet/ldapmaster/slapd-master-1/stop-slapd"
if 5 restarts within 5 cycles then timeout
if failed host 192.168.1.1 port 389 protocol ldap3 then restart
+
- iPlanetMessagingServer MTA dispatcher
-
- check process mta-dispatcher
+
+ check process mta-dispatcher
with pidfile /usr/iplanet/msg-ims-1/config/pidfile.imta_dispatch
start program "/usr/iplanet/msg-ims-1/imsimta start dispatcher"
stop program "/usr/iplanet/msg-ims-1/imsimta stop dispatcher"
group messaging
if 5 restarts within 5 cycles then timeout
if failed host 192.168.1.1 port 25 protocol smtp then restart
+
- iPlanetMessagingServer MTA job controler
-
- check process mta-job_controller
+
iPlanetMessagingServer MTA job controler
+
+ check process mta-job_controller
with pidfile /usr/iplanet/msg-ims-1/config/pidfile.imta_jbc
start program "/usr/iplanet/msg-ims-1/imsimta start job_controller"
stop program "/usr/iplanet/msg-ims-1/imsimta stop job_controller"
group messaging
if 5 restarts within 5 cycles then timeout
if failed host 192.168.1.1 port 28442 then restart
+
- iPlanetMessagingServer stored
-
+
iPlanetMessagingServer stored
+
check process store with pidfile /usr/iplanet/msg-ims-1/config/pidfile.store
start program "/usr/iplanet/msg-ims-1/start-msg store"
stop program "/usr/iplanet/msg-ims-1/stop-msg store"
@@ -704,45 +834,49 @@
check file stored.per with path /usr/iplanet/msg-ims-1/config/stored.per
if timestamp > 70 minutes then alert
group messaging
+
- iPlanetMessagingServer mshttpd
-
+
iPlanetMessagingServer mshttpd
+
check process webmail with pidfile /usr/iplanet/msg-ims-1/config/pidfile.http
start program "/usr/iplanet/msg-ims-1/start-msg http"
stop program "/usr/iplanet/msg-ims-1/stop-msg http"
group messaging
if 5 restarts within 5 cycles then timeout
if failed host 192.168.1.1 port 80 protocol http then restart
+
- iPlanetMessagingServer popd
-
+
iPlanetMessagingServer popd
+
check process pop3 with pidfile /usr/iplanet/msg-ims-1/config/pidfile.pop
start program "/usr/iplanet/msg-ims-1/start-msg pop"
stop program "/usr/iplanet/msg-ims-1/stop-msg pop"
group messaging
if 5 restarts within 5 cycles then timeout
if failed host 192.168.1.1 port 110 protocol pop then restart
+
- iPlanetMessagingServer imapd
-
+
iPlanetMessagingServer imapd
+
check process imap4 with pidfile /usr/iplanet/msg-ims-1/config/pidfile.imap
start program "/usr/iplanet/msg-ims-1/start-msg imap"
stop program "/usr/iplanet/msg-ims-1/stop-msg imap"
group messaging
if 5 restarts within 5 cycles then timeout
if failed host 192.168.1.1 port 143 protocol imap then restart
+
- iPlanetMessagingServer madmand (SNMP subagent)
-
- check process snmp-subagent with pidfile /usr/iplanet/msg-ims-1/config/pidfile
-.snmp
+
iPlanetMessagingServer madmand (SNMP subagent)
+
+ check process snmp-subagent with pidfile /usr/iplanet/msg-ims-1/config/pidfile.snmp
start program "/usr/iplanet/msg-ims-1/start-msg snmp"
stop program "/usr/iplanet/msg-ims-1/stop-msg snmp"
group messaging
if 5 restarts within 5 cycles then timeout
+
check process mmp with pidfile /usr/iplanet/mmp-ims2/pidfile
start program "/usr/iplanet/mmp-ims2/AService.rc start"
stop program "/usr/iplanet/mmp-ims2/AService.rc stop"
@@ -750,60 +884,61 @@
if 5 restarts within 5 cycles then timeout
if failed host 192.168.1.2 port 110 protocol pop then restart
if failed host 192.168.1.2 port 143 protocol imap then restart
+
- iPlanetCalendarServer csadmind
-
- check process calendar-admin with pidfile /usr/iplanet/SUNWics5/cal/bin/config
-/pidfile.admin
+
+ check process calendar-admin with pidfile /usr/iplanet/SUNWics5/cal/bin/config/pidfile.admin
start program "/usr/iplanet/SUNWics5/cal/bin/csstart service admin"
stop program "/usr/iplanet/SUNWics5/cal/bin/csstop service admin"
group calendar
if 5 restarts within 5 cycles then timeout
+
- iPlanetCalendarServer cshttpd
-
- check process calendar-http with pidfile /usr/iplanet/SUNWics5/cal/bin/config/
-pidfile.http
+
iPlanetCalendarServer cshttpd
+
+ check process calendar-http with pidfile /usr/iplanet/SUNWics5/cal/bin/config/pidfile.http
start program "/usr/iplanet/SUNWics5/cal/bin/csstart service http"
stop program "/usr/iplanet/SUNWics5/cal/bin/csstop service http"
group calendar
if 5 restarts within 5 cycles then timeout
if failed host 192.168.1.3 port 80 protocol http then restart
+
- iPlanetCalendarServer csdwpd (database wire protocol)
-
- check process calendar-dwp with pidfile /usr/iplanet/SUNWics5/cal/bin/config/p
-idfile.dwp
+
+ check process calendar-dwp with pidfile /usr/iplanet/SUNWics5/cal/bin/config/pidfile.dwp
start program "/usr/iplanet/SUNWics5/cal/bin/csstart service dwp"
stop program "/usr/iplanet/SUNWics5/cal/bin/csstop service dwp"
group calendar
if 5 restarts within 5 cycles then timeout
if failed host 192.168.1.3 port 9779 protocol dwp then restart
if cpu usage > 2% for 5 cycles then restart # There's a leak in csdwpd
+
- iPlanetCalendarServer csnotifyd
-
- check process calendar-notify with pidfile /usr/iplanet/SUNWics5/cal/bin/confi
-g/pidfile.notify
+
iPlanetCalendarServer csnotifyd
+
+ check process calendar-notify with pidfile /usr/iplanet/SUNWics5/cal/bin/config/pidfile.notify
start program "/usr/iplanet/SUNWics5/cal/bin/csstart service notify"
stop program "/usr/iplanet/SUNWics5/cal/bin/csstop service notify"
group calendar
if 5 restarts within 5 cycles then timeout
+
- iPlanetCalendarServer enpd (event notification service broker)
-
- check process calendar-ens with pidfile /usr/iplanet/SUNWics5/cal/bin/config/p
-idfile.ens
+
iPlanetCalendarServer enpd (event notification service broker)
+
+ check process calendar-ens with pidfile /usr/iplanet/SUNWics5/cal/bin/config/pidfile.ens
start program "/usr/iplanet/SUNWics5/cal/bin/csstart service ens"
stop program "/usr/iplanet/SUNWics5/cal/bin/csstop service ens"
group calendar
if 5 restarts within 5 cycles then timeout
if failed host 192.168.1.3 port 7997 then restart
+
check process apcupsd with pidfile /var/run/apcupsd.pid
group ups
start program = "/etc/init.d/apcupsd start"
@@ -826,9 +961,10 @@
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
+
check process webmin with pidfile /var/webmin/miniserv.pid
group webmin
start program = "/etc/init.d/webmin start"
@@ -842,9 +978,10 @@
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
+
check process stunnel_pop3 with pidfile /opt/var/stunnel/stunnel.110.pid
start program = "/etc/init.d/stunnel start_pop3"
stop program = "/etc/init.d/stunnel stop_pop3"
@@ -874,86 +1011,96 @@
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
+
- Monit set to watch the directory timestamp change and send last core
- backtrace:
+Monit set to watch the directory timestamp change and send last core backtrace:
+
check directory httpd_core with path /var/crash/core
- if changed timestamp then exec "/bin/bash -c 'if [ `/bin/cat /tmp/monit_http
-d_core.tmp | head -1` != `/bin/ls /var/crash/core/core.httpd* | tail -1` ]; the
-n /usr/bin/gdb -x /etc/gdb.batch /usr/sbin/httpd `/bin/ls /var/crash/core/core.
-httpd* | tail -1 | tee /tmp/monit_httpd_core.tmp` | mail -s httpd_crash admin@f
-oo.bar webmaster@foo.bar; fi'"
-
- Start and stop tcpdump based on condition
-
- As soon as the remote SMTP service of host bar is not available
- tcpdump is started. When the connection is available again, tcpdump is
- stopped. Only first ocurrence is catched (noexec flag is created to
- prevent another outage monitoring).
+ if changed timestamp then exec "/bin/bash -c 'if [ `/bin/cat /tmp/monit_httpd_core.tmp | head -1` != `/bin/ls /var/crash/core/core.httpd* | tail -1` ]; then /usr/bin/gdb -x /etc/gdb.batch /usr/sbin/httpd `/bin/ls /var/crash/core/core.httpd* | tail -1 | tee /tmp/monit_httpd_core.tmp` | mail -s httpd_crash admin@foo.bar webmaster@foo.bar; fi'"
+
+As soon as the remote SMTP service of host bar is not available tcpdump is started.
+When the connection is available again, tcpdump is stopped. Only first
+ocurrence is catched (noexec flag is created to prevent another outage monitoring).
+
check host bar with address 10.1.1.2
- if failed port 25 protocol smtp then exec "/bin/bash -c 'if [ ! -f /tmp/noex
-ec ]; then touch /tmp/noexec; tcpdump -w /tmp/foo_bar.dump host bar; fi'" else
-if recovered then exec "killall tcpdump"
-
- Rotate tcpdump until condition occures
-
- This allows to let tcpdump write the data to file and rotate it to
- keep the size of the dump small until network problem occures (we
- don't need to flood the filesystem with data which are ok). As soon as
- the problem occures, monit sets noexec flag => the dump contains the
- data which preceded the problem as well. Script for tcpdump and
- rotation created (/tmp/dumprotate):
+ if failed port 25 protocol smtp then exec "/bin/bash -c 'if [ ! -f /tmp/noexec ]; then touch /tmp/noexec; tcpdump -w /tmp/foo_bar.dump host bar; fi'" else if recovered then exec "killall tcpdump"
+
+This allows to let tcpdump write the data to file and rotate it to keep the size of
+the dump small until network problem occures (we don't need to flood the filesystem
+with data which are ok). As soon as the problem occures, monit sets noexec flag
+=> the dump contains the data which preceded the problem as well.
+
+Script for tcpdump and rotation created (/tmp/dumprotate):
+
#!/bin/bash
killall tcpdump
if [ ! -f /tmp/noexec ]
then
tcpdump -w /tmp/foo_bar.dump host bar
fi
+
- The script is started from cron each 30 minutes:
+The script is started from cron each 30 minutes:
+
0,30 * * * * /tmp/dumprotate
+
- Monit watches the host availablity and as soon as it failed, sets
- noexec flag (with 5 minutes extent):
+Monit watches the host availablity and as soon as it failed, sets noexec flag
+(with 5 minutes extent):
+
check host bar with address 10.1.1.2
- if failed port 25 protocol smtp then exec "/bin/bash -c 'sleep 300; touch /t
-mp/noexec'"
+ if failed port 25 protocol smtp then exec "/bin/bash -c 'sleep 300; touch /tmp/noexec'"
+
+This allows to obtain process list of mysql threads as soon as mysql
+refuses connections. For example we needed to know why mysql
+returned "Too many connections" to clients occasionaly. (note that
+for simplicity in this example is showed mysql root account without
+password - you realy should use restricted account ;)
- This allows to obtain process list of mysql threads as soon as mysql
- refuses connections. For example we needed to know why mysql returned
- "Too many connections" to clients occasionaly. (note that for
- simplicity in this example is showed mysql root account without
- password - you realy should use restricted account ;)
+
check process mysqld with pidfile /var/run/mysqld.pid
- if failed port 3306 protocol mysql then exec "/bin/bash -c '(date && /usr/bi
-n/mysqladmin -u root processlist && echo) >> /tmp/mysql_processlist'"
+ if failed port 3306 protocol mysql then exec "/bin/bash -c '(date && /usr/bin/mysqladmin -u root processlist && echo) >> /tmp/mysql_processlist'"
+
+
+
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/doc/monit.html /tmp/QeMlhPoI46/monit-5.0.3/doc/monit.html
--- monit-4.8.1/doc/monit.html 2006-05-16 20:16:20.000000000 +0100
+++ monit-5.0.3/doc/monit.html 2009-05-28 22:47:57.000000000 +0100
@@ -2,9 +2,9 @@
-monit - utility for monitoring services on a Unix system
+Monit - utility for monitoring services on a Unix system
-
+
@@ -38,7 +38,7 @@
monit is a utility for managing and monitoring processes,
-files, directories and devices on a Unix system. Monit conducts
-automatic maintenance and repair and can execute meaningful
-causal actions in error situations. E.g. monit can start a
-process if it does not run, restart a process if it does not
-respond and stop a process if it uses to much resources. You may
-use monit to monitor files, directories and devices for changes,
-such as timestamps changes, checksum changes or size changes.
+files, directories and filesystems on a Unix system. Monit
+conducts automatic maintenance and repair and can execute
+meaningful causal actions in error situations. E.g. Monit can
+start a process if it does not run, restart a process if it does
+not respond and stop a process if it uses too much resources. You
+may use Monit to monitor files, directories and filesystems for
+changes, such as timestamps changes, checksum changes or size
+changes.
Monit is controlled via an easy to configure control file based
on a free-format, token-oriented syntax. Monit logs to syslog or
to its own log file and notifies you about error conditions via
customizable alert messages. Monit can perform various TCP/IP
network checks, protocol checks and can utilize SSL for such
checks. Monit provides a http(s) interface and you may use a
-browser to access the monit program.
The behavior of monit is controlled by command-line options
+
The behavior of Monit is controlled by command-line options
and a run control file, ~/.monitrc, the syntax of which we
describe in a later section. Command-line options override
.monitrc declarations.
@@ -161,7 +158,8 @@
-dn
Run as a daemon once per n seconds
-g
- Set group name for start, stop, restart and status
+ Set group name for start, stop, restart, monitor and
+ unmonitor.
-H[filename]
Print MD5 and SHA1 hashes of the file or of stdin if the
- filename is omitted; monit will exit afterwards
+ filename is omitted; Monit will exit afterwards
-V
Print version number and patch level
-h
Print a help text
-
In addition to the options above, monit can be started with one
-of the following action arguments; monit will then execute the
+
In addition to the options above, Monit can be started with one
+of the following action arguments; Monit will then execute the
action and exit without transforming itself to a daemon.
start all
Start all services listed in the control file and
enable monitoring for them. If the group option is
set, only start and enable monitoring of services in
- the named group.
+ the named group (no ``all'' verb is required in this
+ case).
start name
Start the named service and enable monitoring for
it. The name is a service entry name from the
@@ -197,21 +196,24 @@
Stop all services listed in the control file and
disable their monitoring. If the group option is
set, only stop and disable monitoring of the services
- in the named group.
+ in the named group (no ``all'' verb is required in this
+ case).
stop name
Stop the named service and disable its monitoring.
The name is a service entry name from the monitrc
file.
restart all
Stop and start all services. If the group option
- is set, only restart the services in the named group.
+ is set, only restart the services in the named group
+ (no ``all'' verb is required in this case).
restart name
Restart the named service. The name is a service entry
name from the monitrc file.
monitor all
Enable monitoring of all services listed in the
control file. If the group option is set, only start
- monitoring of services in the named group.
+ monitoring of services in the named group (no ``all''
+ verb is required in this case).
monitor name
Enable monitoring of the named service. The name is
a service entry name from the monitrc file. Monit will
@@ -220,7 +222,8 @@
unmonitor all
Disable monitoring of all services listed in the
control file. If the group option is set, only disable
- monitoring of services in the named group.
+ monitoring of services in the named group (no ``all''
+ verb is required in this case).
unmonitor name
Disable monitoring of the named service. The name is
a service entry name from the monitrc file. Monit
@@ -231,50 +234,50 @@
summary
Print short status information for each service.
reload
- Reinitialize a running monit daemon, the daemon will
+ Reinitialize a running Monit daemon, the daemon will
reread its configuration, close and reopen log files.
quit
- Kill a monit daemon process
+ Kill a Monit daemon process
validate
Check all services listed in the control file. This
- action is also the default behavior when monit runs
+ action is also the default behavior when Monit runs
in daemon mode.
You may use monit to monitor daemon processes or similar programs
+
You may use Monit to monitor daemon processes or similar programs
running on localhost. Monit is particular useful for monitoring
daemon processes, such as those started at system boot time from
/etc/init.d/. For instance sendmail, sshd, apache and mysql. In
-difference to many monitoring systems, monit can act if an error
+difference to many monitoring systems, Monit can act if an error
situation should occur, e.g.; if sendmail is not running, monit
-can start sendmail or if apache is using to much system resources
-(e.g. if a DoS attack is in progress) monit can stop or restart
-apache and send you an alert message. Monit does also monitor
-process characteristics, such as; if a process has become a
-zombie and how much memory or cpu cycles a process is using.
-
You may also use monit to monitor files, directories and devices
-on localhost. Monit can monitor these items for changes, such as
-timestamps changes, checksum changes or size changes. This is
-also useful for security reasons - you can monitor the md5
-checksum of files that should not change.
-
You may even use monit to monitor remote hosts. First and
-foremost monit is a utility for monitoring and mending services
-on localhost, but if a service depends on a remote service,
-e.g. a database server or an application server, it might by
-useful to be able to test a remote host as well.
+can start sendmail or if apache is using too much resources (e.g.
+if a DoS attack is in progress) Monit can stop or restart apache
+and send you an alert message. Monit can also monitor process
+characteristics, such as; if a process has become a zombie and
+how much memory or cpu cycles a process is using.
+
You may also use Monit to monitor files, directories and
+filesystems on localhost. Monit can monitor these items for
+changes, such as timestamps changes, checksum changes or size
+changes. This is also useful for security reasons - you can
+monitor the md5 checksum of files that should not change.
+
You may even use Monit to monitor remote hosts. First and
+foremost Monit is a utility for monitoring and mending services
+on localhost, but if a service depends on a remote service, e.g.
+a database server or an application server, it might by useful to
+be able to test a remote host as well.
You may monitor the general system-wide resources such as cpu
usage, memory and load average.
monit is configured and controlled via a control file called
+
Monit is configured and controlled via a control file called
monitrc. The default location for this file is ~/.monitrc. If
-this file does not exist, monit will try /etc/monitrc, then
-/usr/local/etc/monitrc and finally ./monitrc.
-
A monit control file consists of a series of service entries and
+this file does not exist, Monit will try /etc/monitrc, then
+@sysconfdir@/monitrc and finally ./monitrc.
+
A Monit control file consists of a series of service entries and
global option statements in a free-format, token-oriented syntax.
Comments begin with a # and extend through the end of the line.
There are three kinds of tokens in the control file: grammar
@@ -298,10 +301,10 @@
service type.
-
This is the hello galaxy version of a monit control file:
+
A Monit control file example:
#
- # monit control file
+ # Monit control file
#
set daemon 120 # Poll at 2-minute intervals
@@ -309,7 +312,7 @@
set alert foo@bar.baz
set httpd port 2812 and use address localhost
allow localhost # Allow localhost to connect
- allow admin:monit # Allow Basic Auth
+ allow admin:Monit # Allow Basic Auth
check system myhost.mydomain.tld
if loadavg (1min) > 4 then alert
@@ -321,7 +324,7 @@
check process apache
with pidfile "/usr/local/apache/logs/httpd.pid"
- start program = "/etc/init.d/httpd start"
+ start program = "/etc/init.d/httpd start" with timeout 60 seconds
stop program = "/etc/init.d/httpd stop"
if 2 restarts within 3 cycles then timeout
if totalmem > 100 Mb then alert
@@ -347,49 +350,57 @@
include /etc/monit/mysql.monitrc
include /etc/monit/mail/*.monitrc
-
This example illustrate a service entry for monitoring the apache
-web server process as well as related files. The meaning of the
-various statements will be explained in the following sections.
+
The above example illustrates a service entry for monitoring the
+apache web server process as well as related files. The meaning
+of the various statements will be explained in the following
+sections.
monit will log status and error messages to a log file. Use the
+
Monit will log status and error messages to a log file. Use the
set logfile statement in the monitrc control file. To setup
-monit to log to its own logfile, use e.g. set logfile
+Monit to log to its own logfile, use e.g. set logfile
/var/log/monit.log. If syslog is given as a value for the
-l command-line switch (or the keyword set logfile syslog
-is found in the control file) monit will use the syslog system
-daemon to log messages. The priority is assigned to each message
-based on the context. To turn off logging, simply do not set
-the logfile in the control file (and of course, do not use the -l
+is found in the control file) Monit will use the syslog system
+daemon to log messages with a priority assigned to each message
+based on the context. To turn off logging, simply do not set the
+logfile in the control file (and of course, do not use the -l
switch)
The -d interval command-line switch runs monit in daemon
+
The -d interval command-line switch runs Monit in daemon
mode. You must specify a numeric argument which is a polling
interval in seconds.
-
In daemon mode, monit detaches from the console, puts itself in
+
In daemon mode, Monit detaches from the console, puts itself in
the background and runs continuously, monitoring each specified
service and then goes to sleep for the given poll interval.
+
Simply invoking
- Simply invoking
-
- monit -d 300
+ Monit -d 300
will poll all services described in your ~/.monitrc file every
5 minutes.
It is strongly recommended to set the poll interval in your
~/.monitrc file instead, by using set daemon n, where n
-is an integer number of seconds. If you do this, monit will
+is an integer number of seconds. If you do this, Monit will
always start in daemon mode (as long as no action arguments are
-given).
+given). Example (check every 5 minutes):
+
+ set daemon 300
+
If you need Monit to wait some time at startup before it start
+checking services you can use the delay statement. Example (check
+every 5 minutes, wait 1 minute on start before first monitoring
+cycle):
+
+ set daemon 300 with start delay 60
Monit makes a per-instance lock-file in daemon mode. If you need
-more monit instances, you will need more configuration files,
+more Monit instances, you will need more configuration files,
each pointing to its own lock-file.
-
Calling monit with a monit daemon running in the background
-sends a wake-up signal to the daemon, forcing it to check
+
Calling monit with a Monit daemon running in the background
+sends a wake-up signal to the daemon, forcing it to check
services immediately.
The quit argument will kill a running daemon process instead
of waking it up.
Monit can run and be controlled from init. If monit should
-crash, init will re-spawn a new monit process. Using init to
-start monit is probably the best way to run monit if you want to
-be certain that you always have a running monit daemon on your
+
Monit can run and be controlled from init. If Monit should
+crash, init will re-spawn a new Monit process. Using init to
+start Monit is probably the best way to run Monit if you want to
+be certain that you always have a running Monit daemon on your
system. (It's obvious, but never the less worth to stress; Make
sure that the control file does not have any syntax errors before
-you start monit from init. Also, make sure that if you run monit
-from init, that you do not start monit from a startup scripts as
+you start Monit from init. Also, make sure that if you run monit
+from init, that you do not start Monit from a startup scripts as
well).
-
To setup monit to run from init, you can either use the 'set
+
To setup Monit to run from init, you can either use the 'set
init' statement in monit's control file or use the -I option from
the command line and here is what you must add to /etc/inittab:
- # Run monit in standard run-levels
- mo:2345:respawn:/usr/local/bin/monit -Ic /etc/monitrc
+ # Run Monit in standard run-levels
+ mo:2345:respawn:/usr/local/bin/Monit -Ic /etc/monitrc
After you have modified init's configuration file, you can run
the following command to re-examine /etc/inittab and start monit:
@@ -420,10 +431,10 @@
For systems without telinit:
kill -1 1
-
If monit is used to monitor services that are also started at
+
If Monit is used to monitor services that are also started at
boot time (e.g. services started via SYSV init rc scripts or via
inittab) then, in some cases, a race condition could occur. That
-is; if a service is slow to start, monit can assume that the
+is; if a service is slow to start, Monit can assume that the
service is not running and possibly try to start it and raise an
alert, while, in fact the service is already about to start or
already in its startup sequence. Please see the FAQ for solutions
@@ -432,7 +443,7 @@
The monit control file, monitrc, can include additional
+
The Monit control file, monitrc, can include additional
configuration files. This feature helps to maintain a certain
structure or to place repeating settings into one file. Include
statements can be placed at virtually any spot. The syntax is the
@@ -445,7 +456,7 @@
the globstring need to be embedded into quotes (') or double
quotes (``). For example,
- INCLUDE "/etc/monit/monit configuration files/printer.*.monitrc"
+ INCLUDE "/etc/monit/Monit configuration files/printer.*.monitrc"
loads any file matching the single globstring. If the globstring
matches a directory instead of a file, it is silently ignored.
INCLUDE statements in included files are parsed as in the main
@@ -464,17 +475,20 @@
GROUP groupname
With this statement it is possible to group similar service
entries together and manage them as a whole. Monit provides
-functions to start, stop and restart a group of services, like
-so:
+functions to start, stop, restart, monitor and unmonitor a
+group of services, like so:
To start a group of services from the console:
- monit -g <groupname> start
+ Monit -g <groupname> start
To stop a group of services:
- monit -g <groupname> stop
+ Monit -g <groupname> stop
To restart a group of services:
- monit -g <groupname> restart
+ Monit -g <groupname> restart
+
Note:
+the status and summary commands don't support the -g
+option and will print the state of all services.
@@ -482,30 +496,47 @@
Monit supports three monitoring modes per service: active,
passive and manual. See also the example section below for
usage of the mode statement.
-
In active mode, monit will monitor a service and in case of
-problems monit will act and raise alerts, start, stop or restart
+
In active mode, Monit will monitor a service and in case of
+problems Monit will act and raise alerts, start, stop or restart
the service. Active mode is the default mode.
-
In passive mode, monit will passively monitor a service and
+
In passive mode, Monit will passively monitor a service and
specifically not try to fix a problem, but it will still raise
alerts in case of a problem.
For use in clustered environments there is also a manual
-mode. In this mode, monit will enter active mode only if a
+mode. In this mode, Monit will enter active mode only if a
service was brought under monit's control, for example by
executing the following command in the console:
- monit start sybase
- (monit will call sybase's start method and enable monitoring)
-
If a service was not started by monit or was stopped or disabled
+ Monit start sybase
+ (Monit will call sybase's start method and enable monitoring)
+
If a service was not started by Monit or was stopped or disabled
for example by:
- monit stop sybase
- (monit will call sybase's stop method and disable monitoring)
-
monit will not monitor the service. This allows for having
-services configured in monitrc and start it with monit only if it
+ Monit stop sybase
+ (Monit will call sybase's stop method and disable monitoring)
+
Monit will then not monitor the service. This allows for having
+services configured in monitrc and start it with Monit only if it
should run. This feature can be used to build a simple failsafe
cluster. To see how, read more about how to setup a cluster with
-monit using the heartbeat system in the examples sections
+Monit using the heartbeat system in the examples sections
below.
+
A service's monitoring state is persistent across Monit restart.
+This means that you probably would like to make certain that
+services in manual mode are stopped or in unmonitored mode at
+server shutdown. Do for instance the following in a server
+shutdown script:
+
+ Monit stop sybase
+
or
+
+ Monit unmonitor sybase
+
If you use Monit in a HA-cluster you should place the state file
+in a temporary filesystem so if the machine should crash and the
+stand-by machine take over services, any manual monitoring mode
+services that were started on the crashed machine won't be
+started on reboot. Use for example:
+
+ set statefile /tmp/monit.state
@@ -523,9 +554,10 @@
o A file checksum problem
o A file size problem
o A file/directory timestamp problem
- o A file/directory/device permission problem
- o A file/directory/device uid problem
- o A file/directory/device gid problem
+ o A file/directory/filesystem permission problem
+ o A file/directory/filesystem uid problem
+ o A file/directory/filesystem gid problem
+ o An action is done per administrator's request
Monit will send an alert each time a monitored object changed.
This involves:
@@ -533,34 +565,38 @@
o A file checksum changed
o A file size changed
o A file content match
- o A file/directory timestamp changed
-
You use the alert statement to notify monit that you want alert
+ o A file/directory timestamp changed
+ o A filesystem mount flags changed
+ o A process PID changed
+ o A process PPID changed
+
You use the alert statement to notify Monit that you want alert
messages sent to an email address. If you do not specify an alert
-statement, monit will not send alert messages.
+statement, Monit will not send alert messages.
There are two forms of alert statement:
o Global - common for all services
o Local - per service
In both cases you can use more than one alert statement. In other
words, you can send many different emails to many different
-addresses. (in case you now got a new business idea; monit is not
-really suitable for sending spam).
+addresses.
Recipients in the global and in the local lists are alerted when
a service failed, recovered or changed. If the same email address
-is in the global and in the local list, monit will send only one
+is in the global and in the local list, Monit will only send one
alert. Local (per service) defined alert email addresses override
global addresses in case of a conflict. Finally, you may choose
to only use a global alert list (recommended), a local per
service list or both.
+
It is also possible to disable the global alerts locally for
+particular service(s) and recipients.
If a change occurred on a monitored services, monit will send an
-alert to all recipients in the global list who have registered
+
If a change occurred on a monitored services, Monit will send an
+alert to all recipients in the global list who has registered
interest for the event type. Here is the syntax for the global
alert statement:
will send a default email to the address foo@bar whenever an
event occurred on any service. Such an event may be that a
-service timed out, a service was doesn't exist or a service does
-exist (on recovery) and so on. If you want to send alert messages
-to more email addresses, add a set alert 'email' statement for
-each address.
+service timed out, a service doesn't exist and so on. If you want
+to send alert messages to more email addresses, add a set alert
+'email' statement for each address.
For explanations of the events, MAIL-FORMAT and REMINDER
keywords above, please see below.
+
You can also use the NOT option ahead of the events list which
+will reverse the meaning of the list. That is, only send alerts
+for events not in the list. This can save you some
+configuration bytes if you are interested in most events except a
+few.
If you only want an alert message sent for certain events and for
certain service(s), for example only for timeout events or only
if a service died, then postfix the alert-statement with a filter
block:
@@ -592,12 +637,42 @@
check process myproc with pidfile /var/run/my.pid
alert foo@bar only on { timeout, nonexist }
...
-
(only and on are noise keywords, ignored by monit. As a
+
(only and on are noise keywords, ignored by Monit. As a
side note; Noise keywords are used in the control file grammar to
make an entry resemble English and thus make it easier to read
(or, so goes the philosophy). The full set of available noise
keywords are listed below in the Control File section).
-
Event filtering can be used to send a mail to different email
+
You can also setup to send alerts for all events except some by
+putting the word not ahead of the list. For example, if you
+want to receive alerts for all events except Monit instance
+events, you can write (note that the noise words 'but' and 'on'
+are optional):
+
+ check system myserver
+ alert foo@bar but not on { instance }
+ ...
This will send alerts for all events to foo@bar, except Monit
+instance events. An instance event BTW, is an event fired
+whenever the Monit program start or stop.
+
Event filtering can be used to send an email to different email
addresses depending on the events that occurred. For instance:
alert foo@bar { nonexist, timeout, resource, icmp, connection }
@@ -608,10 +683,21 @@
security@bar if a checksum, permission, uid or gid problem
occurs. And finally, a message to manager@bar whenever any error
event occurs.
-
This is the list of events you can use in a mail-filter: uid,
+
Here is the list of events you can use in a mail-filter: uid,
gid, size, nonexist, data, icmp, instance, invalid, exec,
-changed, timeout, resource, checksum, match, timestamp,
-connection, permission
You can also disable the alerts localy using the NOALERT
+statement. This is useful if you have lots of services monitored
+and are using the global alert statement, but don't want to
+receive alerts for some minor subset of services:
+
+ noalert appadmin@bar
+
For example, if you stick the noalert statement in a 'check
+system' entry, you won't receive system related alerts (such as
+Monit instance started/stopped/reloaded alert, system overloaded
+alert, etc.) but will receive alerts for all other monitored
+services.
The following example will alert foo@bar on all events on all
services by default, except the service mybar which will send an
alert only on timeout. The trick is based on the fact that local
@@ -624,24 +710,15 @@
...
check process mybar with pidfile /var/run/mybar.pid
alert foo@bar only on { timeout }
-
The 'instance' alert type report events related to monit
-internals, such as when a monit instance was started, stopped or
-reloaded.
-
If the MTA (mailserver) for sending alerts is not available,
-monit can queue events on the local file-system until the MTA
-recover. Monit will then post queued events in order with their
-original timestamp so the events are not lost. This feature is
-most useful if monit is used together with e.g. m/monit and when
-event history is important.
monit provides a default mail message layout that is short and to
+
Monit provides a default mail message layout that is short and to
the point. Here's an example of a standard alert mail sent by
monit:
From: monit@tildeslash.com
- Subject: monit alert -- Does not exist apache
+ Subject: Monit alert -- Does not exist apache
To: hauk@tildeslash.com
Date: Thu, 04 Sep 2003 02:33:03 +0200
@@ -664,22 +741,22 @@
Yours sincerely,
monit
}
-
Where the keyword from: is the email address monit should
+
Where the keyword from: is the email address Monit should
pretend it is sending from. It does not have to be a real mail
address, but it must be a proper formated mail address, on the
form: name@domain. The keyword subject: is for the email
subject line. The subject must be on only one line. The
message: keyword denotes the mail body. If used, this keyword
-should always be the last in a mail-format statement. The mail
-body can be as long as you want and must not contain the '}'
+should always be the last in a mail-format statement. The mail
+body can be as long as you want, but must not contain the '}'
character.
-
All of these format keywords are optional but you must provide at
-least one. Thus if you only want to change the from address monit
-is using you can do:
+
All of these format keywords are optional, but if used, you must
+provide at least one. Thus if you only want to change the from
+address Monit is using you can do:
set alert foo@bar with mail-format { from: bofh@bar.baz }
From the previous example you will notice that some special $XXX
-variables was used. If used, they will be substituted and
+variables were used. If used, they will be substituted and
expanded into the text with these values:
$EVENT
@@ -688,25 +765,28 @@
A string describing the event that occurred. The values are
fixed and are:
Monit by default sends just one error notification when the
-service failed and another one when it has recovered. If you want
-to be notified more then once in the case that the service
-remains failed, you can use the reminder option of alert
-statement (keywords are in capital):
Monit by default sends just one error notification if a service
+failed and another when it recovered. If you want to be notified
+more then once if a service remains in a failed state, you can
+use the reminder option to the alert statement (keywords are in
+capital):
The mail server monit should use to send alert messages is
+
The mail server Monit should use to send alert messages is
defined with a global set statement (keywords are in capital and
optional statements in [brackets]):
- SET MAILSERVER {host name [PORT port]|ip-address [PORT port]}+
- [with TIMEOUT X SECONDS]
The port statement allows to use SMTP servers other then those
-listening on port 25. If omitted, port 25 is used for the
-connection.
+listening on port 25. If omitted, port 25 is used unless ssl or
+tls is used, in which case port 465 is used by default.
+
Monit support plain smtp authentication - you can set a username
+and a password using the USERNAME and PASSWORD options.
+
To use secure communication, use the SSLV2, SSLV3 or TLSV1
+options, you can also specify the server certificate checksum
+using CERTMD5 option.
As you can see, it is possible to set several SMTP servers. If
-monit cannot connect to the first server in the list it will try
+Monit cannot connect to the first server in the list it will try
the second server and so on. Monit has a default 5 seconds
-connection timeout and if the SMTP server is slow, monit could
-timeout when connecting or reading from the server. You can use
-the optional timeout statement to explicit set the timeout to a
-higher value if needed. Here is an example for setting several
-mail servers:
-
- set mailserver mail.tildeslash.com, mail.foo.bar port 10025,
- localhost with timeout 15 seconds
-
Here monit will first try to connect to the server
-``mail.tildeslash.com'', if this server is down monit will try
-``mail.foo.bar'' on port 10025 and finally ``localhost''. We do also
-set an explicit connect and read timeout; If monit cannot connect
-to the first SMTP server in the list within 15 seconds it will
-try the next server and so on. The set mailserver .. statement
-is optional and if not defined monit defaults to use localhost as
-the SMTP server.
+connection timeout and if the SMTP server is slow, Monit could
+timeout when connecting or reading from the server. If this is
+the case, you can use the optional timeout statement to explicit
+set the timeout to a higher value if needed. Here is an example
+for setting several mail servers:
+
+ set mailserver mail.tildeslash.com, mail.foo.bar port 10025
+ username "Rabbi" password "Loewe" using tlsv1, localhost
+ with timeout 15 seconds
+
Here Monit will first try to connect to the server
+``mail.tildeslash.com'', if this server is down Monit will try
+``mail.foo.bar'' on port 10025 using the given credentials via tls
+and finally ``localhost''. We also set an explicit connect and read
+timeout; If Monit cannot connect to the first SMTP server in the
+list within 15 seconds it will try the next server and so on. The
+set mailserver .. statement is optional and if not defined
+Monit will not send email alerts. Not setting a mail server is
+recommended only if alert notification is delegated to M/Monit.
+
Monit, by default, use the local host name in SMTP HELO/EHLO and
+in the Message-ID header. Some mail servers check this
+information against DNS for spam protection and can reject the
+email if the DNS and the hostname used in the transaction does
+not match. If this is the case, you can override the default
+local host name by using the HOSTNAME option:
+
+ set mailserver mail.tildeslash.com using hostname
+ "myhost.example.org"
Monit provide optionally queueing of event alerts that cannot be
-sent. For example, if no mail-server is available at the moment,
-monit can store events in a queue and try to reprocess them at
-the next cycle. As soon as the mail-server recover, monit will
-post the queued events. The queue is persistent across monit
-restarts and provided that the back-end filesystem is persistent
-too, across system restart as well.
+
If the MTA (mail server) for sending alerts is not available,
+Monit can queue events on the local file-system until the MTA
+recover. Monit will then post queued events in order with their
+original timestamp so the events are not lost. This feature is
+most useful if Monit is used together with M/Monit and when event
+history is important.
+
The event queue is persistent across monit restarts and provided
+that the back-end filesystem is persistent too, across system
+restart as well.
By default, the queue is disabled and if the alert handler fails,
-monit will simply drop the alert message. To enable the event
-queue, add the following statement to the monit control file:
+Monit will simply drop the alert message. To enable the event
+queue, add the following statement to the Monit control file:
SET EVENTQUEUE BASEDIR <path> [SLOTS <number>]
The <path> is the path to the directory where events will be
-stored. Optionally if you want to limit the queue size (maximum
-events count), use the slots option. If the slots option is not
-used, monit will store as many events as the backend filesystem
-allows.
+stored. Optionally if you want to limit the queue size, use the
+slots option to only store up to number event messages. If the
+slots option is not used, Monit will store as many events as the
+backend filesystem allows.
Example:
set eventqueue
basedir /var/monit
slots 5000
-
The events are stored in binary format, one file per event. The
-file size is ca. 130 bytes or a bit more (depending on the
+
Events are stored in a binary format, with one file per event.
+The file size is ca. 130 bytes or a bit more (depending on the
message length). The file name is composed of the unix timestamp,
underscore and the service name, for example:
/var/monit/1131269471_apache
-
If you are running more then one monit instance on the same
+
If you are running more then one Monit instance on the same
machine, you must use separated event queue directories to
avoid sending wrong alerts to the wrong addresses.
-
If you want to purge the queue by hand (remove queued
-event-files), monit should be stopped before the removal.
+
If you want to purge the queue by hand, that is, remove queued
+event-files, Monit should be stopped before the removal.
@@ -847,15 +949,15 @@
monit provides a service timeout mechanism for situations
where a service simply refuses to start or respond over a longer
period. In cases like this, and particularly if monit's poll-cycle
-is low, monit will simply increase the machine load by trying to
+is low, Monit will simply increase the machine load by trying to
restart the service.
-
The timeout mechanism monit provides is based on two variables,
+
The timeout mechanism Monit provides is based on two variables,
i.e. the number the service has been started and the number of
poll-cycles. For example, if a service had x restarts within
-y poll-cycles (where x <= y) then monit will timeout and
-not (re)start the service on the next cycle. If a timeout occurs
-monit will send you an alert message if you have register
-interest for this event.
+y poll-cycles (where x <= y) then Monit will timeout and
+not (re)start the service on subsequent cycles until the service
+is manually re-registered.. If a timeout occurs Monit will send
+you an alert message if you have register interest for this event.
The syntax for the timeout statement is as follows (keywords
are in capital):
@@ -868,11 +970,11 @@
zero. This provides some granularity to catch exceptional cases
and do a service timeout, but let occasional service start and
restarts happen without having an accumulated timeout.
-
Here is an example where monit will timeout (not check the
+
Here is an example where Monit will timeout (not check the
service) if the service was restarted 2 times within 3 cycles:
if 2 restarts within 3 cycles then timeout
-
To have monit check the service again after a timeout, run 'monit
+
To have Monit check the service again after a timeout, run 'monit
monitor service' from the command line. This will remove the
timeout lock in the daemon and make the daemon start and check
the service again.
Monit provides several tests you may utilize in a service entry
-to test a service. Basically here are two classes of tests:
-variable and constant object tests.
-
Constant object tests are related to failed/passed state. In the
-case of error, monit will watch whether the failed parameter will
-recover - in such case it will handle recovery related
-action. General format:
+to test a service. There are two classes of tests: variable and
+constant tests. That is, the condition we test is either constant
+e.g. a number or it can vary.
+
For constant object tests if the <TEST> should validate to true,
-then the selected action is executed each cycle the condition
-remains true. The value for comparison is constant. Recovery
-action is evaluated only once (on failed->passed state change
-only). The 'ELSE IF PASSED' part is optional - if omitted,
-monit will do alert action on recovery by default. The alert is
-delivered only once on each state change unless overridden by
-'reminder' alert option.
-
Variable object tests begins with 'IF CHANGED' statement and
-serves for monitoring of object, which property can change legally
-- monit watches whether the value will change again. You can use
-it just for alert or to involve some automatic action, as for
-example to reload monitored process after its configuration file
-was changed. Variable tests are supported for 'checksum',
-'size', 'pid, 'ppid' and 'timestamp' tests only, if you consider
-that other tests can be useful in variable form too, please let
-us know.
+
If the <TEST> condition should evaluate to true, then the
+selected action is executed each cycle the test condition remains
+true. The comparison value is constant. Recovery action is
+evaluated only once (on a failed to succeeded state change only).
+The 'ELSE IF SUCCEEDED' part is optional, if omitted, Monit will
+send an alert on recovery. The alert is sent only once on each
+state change unless overridden by the 'reminder' alert option.
For variable object tests if the <TEST> should validate to true,
-then the selected action is executed once and monit will watch
-for another change. The value for comparison is a variable where
-the last result becomes the actual value, which is compared in
-future cycles. The alert is delivered each time the condition
-becomes true.
-
You can restrict the event ratio needed to change the state:
+
If the <TEST> should evaluate to true, then the selected action
+is executed once. The comparison value is a variable where the
+last result becomes the new value and is compared in future
+cycles. The alert is delivered each time the condition becomes
+true.
+
You can use this test for alerts or for some automatic action,
+for example to reload monitored process after its configuration
+file was changed. Variable tests are supported for 'checksum',
+'size', 'pid, 'ppid' and 'timestamp' tests only.
This part is optional and is supported by all testing rules.
-It defines how many event occurrences during how many cycles
-are needed to trigger the following action. You can use it
-in several ways - the core syntax is:
-
- [<X>] <Y> CYCLES
-
It is possible to use filling words which give the rule better
-first-sight sense. You can use any filling words such as: FOR,
-TIMES, WITHIN, thus for example:
+
If a test match, its action is executed at once. This behaviour
+can optionally be changed and you can for instance require that a
+test must match over several poll cycles before the action is
+executed by using the statement above. You can use this in
+several ways. For example:
if failed port 80 for 3 times within 5 cycles then alert
or
if failed port 80 for 10 cycles then unmonitor
-
When you don't specify the <X>, it equals to <Y> by default,
-thus the rule applies when <Y> consecutive cycles of inverse
-event occurred (relatively to the current service state).
-
When you omit it at all, monit will by default change state
-on first inverse event, which is equivalent to this notation:
-
- 1 times within 1 cycles
-
It is possible to use this option for failed, passed/recovered
-or changed rules. More complex examples:
-
- check device rootfs with path /dev/hda1
- if space usage > 80% 5 times within 15 cycles
- then alert
- else if passed for 10 cycles then alert
+
If you don't specify <X> times, it equals <Y> by default, thus
+the test match if it evaluate to true for <Y> consecutive cycles.
+
It is possible to use this option for failed, succeeded,
+recovered or changed rules. Here is a more complex example:
+
+ check filesystem rootfs with path /dev/hda1
+ if space usage > 80% for 5 times within 15 cycles
+ then alert else if succeeded for 10 cycles then alert
if space usage > 90% for 5 cycles then
exec '/try/to/free/the/space'
if space usage > 99% then exec '/stop/processess'
-
Note that the maximal cycles count which can be used in the rule
-is limited by the size of 'long long' data type on your platform.
-This provides 64 cycles on usual platforms currently. In the case
-that you use unsupported value, the configuration parser will
-tell you the limits during monit startup.
-
You must select an action to be executed from this list:
+
In each test you must select the action to be executed from this
+list:
ALERT sends the user an alert event on each state change (for
-constant object tests) or on each change (for variable object
-tests).
+constant tests) or on each change (for variable tests).
RESTART restarts the service and sends an alert. Restart is
@@ -980,14 +1058,14 @@
STOP stops the service by calling the service's registered
-stop method and send an alert. If monit stops a service it
-will not be checked by monit anymore nor restarted again
-later. To reactivate monitoring of the service again you must
-explicitly enable monitoring from the web interface or from the
-console, e.g. 'monit monitor apache'.
+stop method and send an alert. If Monit stops a service it
+will not be checked by Monit anymore nor restarted again later.
+To reactivate monitoring of the service again you must explicitly
+enable monitoring from the web interface or from the console,
+e.g. 'monit monitor apache'.
-
EXEC may be used to execute an arbitrary program and send
+
EXEC can be used to execute an arbitrary program and send
an alert. If you choose this action you must state the program to
be executed and if the program require arguments you must enclose
the program and its arguments in a quoted string. You may
@@ -996,11 +1074,12 @@
exec "/usr/local/tomcat/bin/startup.sh"
as uid nobody and gid nobody
-
This may be useful if the program to be started cannot change to
-a lesser privileged user and group. This is typically needed for
-Java Servers. Remember, if monit is run by the superuser, then
-all programs executed by monit will be started with superuser
-privileges unless the uid and gid extension was used.
+
The uid and gid switch can be useful if the program to be started
+cannot change to a lesser privileged user and group. This is
+typically needed for Java Servers. Remember, if Monit is run by
+the superuser, then all programs executed by Monit will be
+started with superuser privileges unless the uid and gid
+extension was used.
MONITOR will enable monitoring of the service and send
@@ -1008,7 +1087,7 @@
UNMONITOR will disable monitoring of the service and send
-an alert. The service will not be checked by monit anymore nor
+an alert. The service will not be checked by Monit anymore nor
restarted again later. To reactivate monitoring of the service
you must explicitly enable monitoring from monit's web interface
or from the console using the monitor argument.
Monit can examine how much system resources a services are
-using. This test may only be used within a system or process
-service entry in the monit control file.
-
Depending on the system or process characteristics, services
-can be stopped or restarted and alerts can be generated. Thus
-it is possible to utilize systems which are idle and to spare
-system under high load.
+
Monit can examine how much system resources a service are using.
+This test can only be used within a system or process service
+entry in the Monit control file.
+
Depending on system or process characteristics, services can be
+stopped or restarted and alerts can be generated. Thus it is
+possible to utilize systems which are idle and to spare system
+under high load.
The full syntax for the resource-statements used for resource
testing is as follows (keywords are in capital and optional
statements in [brackets]),
resource is a choice of ``CPU'', ``CPU([user|system|wait])'',
-``MEMORY'', ``CHILDREN'', ``TOTALMEMORY'', ``LOADAVG([1min|5min|15min])''.
-Some resources can be used inside of system service container,
-some in process service container and some in both:
+
resource is a choice of ``CPU'', ``TOTALCPU'',
+``CPU([user|system|wait])'', ``MEMORY'', ``CHILDREN'', ``TOTALMEMORY'',
+``LOADAVG([1min|5min|15min])''. Some resource tests can be used
+inside a check system entry, some in a check process entry and
+some in both:
System only resource tests:
-
CPU([user|system|wait]) is the percent of time that the system
-spend in user or system/kernel space. Some systems such as linux
-2.6 supports 'wait' indicator as well.
+
CPU([user|system|wait]) is the percent of time the system spend
+in user or system/kernel space. Some systems such as linux 2.6
+supports a 'wait' indicator as well.
Process only resource tests:
-
CPU is the CPU usage of the process and its children in
-parts of hundred (percent).
+
CPU is the CPU usage of the process itself (percent).
+
TOTALCPU is the total CPU usage of the process and its children
+in (percent). You will want to use TOTALCPU typically for
+services like Apache webserver where one master process forks the
+child processes as workers.
CHILDREN is the number of child processes of the process.
TOTALMEMORY is the memory usage of the process and its child
processes in either percent or as an amount (Byte, kB, MB, GB).
System and process resource tests:
-
MEMORY is the memory usage of the system or in the process context
-of the process without its child processes in either percent
-(of the systems total) or as an amount (Byte, kB, MB, GB).
+
MEMORY is the memory usage of the system or of a process (without
+children) in either percent (of the systems total) or as an
+amount (Byte, kB, MB, GB).
LOADAVG([1min|5min|15min]) refers to the system's load average.
The load average is the number of processes in the system run
queue, averaged over the specified time period.
@@ -1058,9 +1141,9 @@
``less'', ``equal'', ``notequal'' in human readable form (if not
specified, default is EQUAL).
value is either an integer or a real number (except for
-CHILDREN). For CPU, MEMORY and TOTALMEMORY you need to specify a
-unit. This could be ``%'' or if applicable ``B'' (Byte), ``kB''
-(1024 Byte), ``MB'' (1024 KiloByte) or ``GB'' (1024 MegaByte).
+CHILDREN). For CPU, TOTALCPU, MEMORY and TOTALMEMORY you need to
+specify a unit. This could be ``%'' or if applicable ``B'' (Byte),
+``kB'' (1024 Byte), ``MB'' (1024 KiloByte) or ``GB'' (1024 MegaByte).
action is a choice of ``ALERT'', ``RESTART'', ``START'', ``STOP'',
``EXEC'', ``MONITOR'' or ``UNMONITOR''.
To calculate the cycles, a counter is raised whenever the
@@ -1068,7 +1151,7 @@
(but not below 0). All counters are reset in case of a restart.
The following is an example to check that the CPU usage of a
service is not going beyond 50% during five poll cycles. If it
-does, monit will restart the service:
+does, Monit will restart the service:
if cpu is greater than 50% for 5 cycles then restart
The checksum statement may only be used in a file service
-entry. If specified in the control file, monit will compute
+entry. If specified in the control file, Monit will compute
a md5 or sha1 checksum for a file.
The checksum test in constant form is used to verify that a
file does not change. Syntax (keywords are in capital):
The checksum test in variable form is used to watch for
@@ -1094,12 +1177,12 @@
The choice of MD5 or SHA1 is optional. MD5 features a 256 bit
-and SHA1 a 320 bit checksum. If this option is omitted monit
+and SHA1 a 320 bit checksum. If this option is omitted Monit
tries to guess the method from the EXPECT string or uses MD5 as
default.
expect is optional and if used it specifies a md5 or sha1
-string monit should expect when testing a file's checksum. If
-expect is used, monit will not compute an initial checksum for
+string Monit should expect when testing a file's checksum. If
+expect is used, Monit will not compute an initial checksum for
the file, but instead use the string you submit. For example:
if failed checksum and
@@ -1111,31 +1194,32 @@
action is a choice of ``ALERT'', ``RESTART'', ``START'', ``STOP'',
``EXEC'', ``MONITOR'' or ``UNMONITOR''.
The checksum statement in variable form may be used to check a
-file for changes and if changed, do a specified action. For
+file for changes and if changed, do a specified action. For
instance to reload a server if its configuration file was
-changed. The following illustrate this for the apache web server:
+changed. The following illustrates this for the apache web
+server:
check file httpd.conf path /usr/local/apache/conf/httpd.conf
if changed sha1 checksum
then exec "/usr/local/apache/bin/apachectl graceful"
If you plan to use the checksum statement for security reasons,
(a very good idea, by the way) and to monitor a file or files
-which should not change, then please use constant form and also
-read the DEPENDENCY TREE section below to see a detailed example
-on how to do this properly.
+which should not change, then please use the constant form and
+also read the DEPENDENCY TREE section below to see a detailed
+example on how to do this properly.
Monit can also test the checksum for files on a remote host via
the HTTP protocol. See the CONNECTION TESTING section below.
The timestamp statement in variable form is simply to test an
@@ -1167,7 +1251,7 @@
The constant timestamp version is useful for monitoring systems
able to report its state by changing the timestamp of certain
state files. For instance the iPlanet Messaging server stored
-process system updates the timestamp of:
+process system updates the timestamp of the following files:
The size statement in variable form is simply to test an existing
@@ -1234,9 +1318,9 @@
The variable size test form is useful for checking a file for
changes and send an alert or execute an action. Monit will
register the size of the file at startup and monitor the file for
-changes. As soon as the value changed, monit will do specified
-action, reset the registered value to new result and continue to
-monitor, whether the size changed again.
+changes. As soon as the value changes, Monit will perform the
+specified action, reset the registered value to the new value and
+continue monitoring and test if the size changes again.
One example of use for this statement is to conduct security
checks, for instance:
@@ -1245,16 +1329,16 @@
which will ``cut the cable'' and stop a possible intruder from
compromising the system further. This test is just one of many
you may use to increase the security awareness on a system. If
-you plan to use monit for security reasons we recommend that you
+you plan to use Monit for security reasons we recommend that you
use this test in combination with other supported tests like
checksum, timestamp, and so on.
-
The constant size test form may be useful in similar or different
-contexts. It can, for instance, be used to test if a certain file
-size was exceeded and then alert you or monit may execute a
-certain action specified by you. An example is to use this
-statement to rotate log files after they have reached a certain
-size or to check that a database file does not grow beyond a
-specified threshold.
+
The constant form of this test can be useful in similar or
+different contexts. It can, for instance, be used to test if a
+certain file size was exceeded and then alert you or Monit may
+execute a certain action specified by you. An example is to use
+this statement to rotate log files after they have reached a
+certain size or to check that a database file does not grow
+beyond a specified threshold.
To rotate a log file:
check file myapp.log with path /var/log/myapp.log
@@ -1281,12 +1365,12 @@
The match statement allows you to test the content of a text
-file by using regular expressions. This is a great feature if
-you need to periodically test files, such as log files, for
-certain patterns. If a pattern match, monit defaults to
-raise an alert, other actions are also possible.
-
The syntax (keywords in capital) for using this function is:
+
The match statement allows you to test the content of a text file
+by using regular expressions. This is a great feature if you need
+to periodically test files, such as log files, for certain
+patterns. If a pattern match, Monit defaults to raise an alert,
+other actions are also possible.
+
The syntax (keywords in capital) for using this test is:
The content is only being checked every cycle. If content is
being added and removed between two checks they are unnoticed.
On startup the read position is set to the end of the file
-and monit continue to scan to the end of file on each cycle.
+and Monit continue to scan to the end of file on each cycle.
But if the file size should decrease or inode change the read
position is set to the start of the file.
Only lines ending with a newline character are inspected. Thus,
lines are being ignored until they have been completed with this
-character. Also note that only the first 511 characters of a
-line are inspected.
+character. Also note that only the first 511 characters of a line
+are inspected.
Monit can test the flags of a filesystem for changes. This test
+is implicit and Monit will send alert in case of failure by
+default.
+
This test is useful for detecting changes of the filesystem flags
+such as when the filesystem became read-only based on disk errors
+or the mount flags were changed (such as nosuid). Each platform
+provides different set of flags. POSIX define the RDONLY and
+NOSUID flags which should work on all platforms. Some platforms
+(such as FreeBSD) has additonal flags.
Monit can test devices/file systems and check for space
-usage. This test may only be used within a device service entry
-in the monit control file.
-
Monit will check a device's total space usage. If you only want
-to check available space for non-superuser, you must set the
+
Monit can test file systems for space usage. This test may only
+be used within a filesystem service entry in the Monit control
+file.
+
Monit will check a filesystem's total space usage. If you only
+want to check available space for non-superuser, you must set the
watermark appropriately (i.e. total space minus reserved blocks
for the superuser).
You can obtain (and set) the superuser's reserved blocks size,
for example by using the tune2fs utility on Linux. On Linux 5% of
-available blocks are reserved for the superuser by default. To
-list the reserved blocks for the superuser:
On solaris 10% of the blocks are reserved. You can also use
-tunefs on solaris to change values on a live filesystem.
+available blocks are reserved for the superuser by default. On
+solaris 10% of the blocks are reserved. You can also use tunefs
+on solaris to change values on a live filesystem.
If supported by the file-system, you can use monit to test for
-inodes usage. This test may only be used within a device service
-entry in the monit control file.
-
If the device becomes unavailable, monit will call the entry's
-registered start method, if it is defined and if monit is running
-in active mode. If monit runs in passive mode or the start
-methods is not defined, monit will just send an error alert.
+
If supported by the file-system, you can use Monit to test for
+inodes usage. This test may only be used within a filesystem
+service entry in the Monit control file.
+
If the filesystem becomes unavailable, Monit will call the
+service's registered start method, if it is defined and if Monit
+is running in active mode. If Monit runs in passive mode or the
+start methods is not defined, Monit will just send an error
+alert.
Monit can monitor the permissions. This test may only be used
-within a file, fifo, directory or device service entry in the
-monit control file.
+
Monit can monitor the permission of file objects. This test may
+only be used within a file, fifo, directory or filesystem service
+entry in the Monit control file.
octalnumber defines permissions for a file, a directory or a
-device.
+filesystem as four octal digits (0-7). Valid range: 0000 - 7777 (you
+can omit the leading zeros, Monit will add the zeros to the left
+thus for example ``640'' is valid value and matches ``0640'').
action is a choice of ``ALERT'', ``RESTART'', ``START'', ``STOP'',
``EXEC'', ``MONITOR'' or ``UNMONITOR''.
The web interface will show a permission warning if the test
failed.
We recommend that you use the UNMONITOR action in a permission
statement. The rationale for this feature is security and that
-monit does not start a possible cracked program or
-script. Example:
+Monit does not start a possible cracked program or script.
+Example:
check file monit.bin with path "/usr/local/bin/monit"
- if failed permission 0555 then unmonitor
- alert foo@bar
-
If the test fails, monit will simply send an alert and stop
+ if failed permission 0555 then unmonitor
+
If the test fails, Monit will simply send an alert and stop
monitoring the file and propagate an unmonitor action upward in
a depend tree.
monit can monitor the owner user id (uid). This test may only be
-used within a file, fifo, directory or device service entry in
-the monit control file.
+
Monit can monitor the owner user id (uid) of a file object. This
+test may only be used within a file, fifo, directory or
+filesystem service entry in the Monit control file.
user defines a user id either in numeric or in string form.
@@ -1438,25 +1542,24 @@
fail.
We recommend that you use the UNMONITOR action in a uid
statement. The rationale for this feature is security and that
-monit does not start a possible cracked program or
-script. Example:
+Monit does not start a possible cracked program or script.
+Example:
check file passwd with path /etc/passwd
- if failed uid root then unmonitor
- alert root@localhost
-
If the test fails, monit will simply send an alert and stop
+ if failed uid root then unmonitor
+
If the test fails, Monit will simply send an alert and stop
monitoring the file and propagate an unmonitor action upward in
a depend tree.
monit can monitor the owner group id (gid). This test may only
-be used within a file, fifo, directory or device service entry
-in the monit control file.
+
Monit can monitor the owner group id (gid) of file objects. This
+test may only be used within a file, fifo, directory or
+filesystem service entry in the Monit control file.
user defines a group id either in numeric or in string form.
@@ -1466,24 +1569,20 @@
fail.
We recommend that you use the UNMONITOR action in a gid
statement. The rationale for this feature is security and that
-monit does not start a possible cracked program or
-script. Example:
+Monit does not start a possible cracked program or script.
+Example:
check file shadow with path /etc/shadow
- if failed gid root then unmonitor
- alert root@localhost
-
If the test fails, monit will simply send an alert and stop
+ if failed gid root then unmonitor
+
If the test fails, Monit will simply send an alert and stop
monitoring the file and propagate an unmonitor action upward in
a depend tree.
monit tests the process id (pid) of processes for change. This
-test is implicit and monit will send alert in the case of failure
-by default.
-
You may override the default action using below rule (it may only
-be used within a process service entry in the monit control
-file).
+
Monit can test the process identification number (pid) of a
+process for changes. This test is implicit and Monit will send a
+alert in the case of failure by default.
action is a choice of ``ALERT'', ``RESTART'', ``START'', ``STOP'',
``EXEC'', ``MONITOR'' or ``UNMONITOR''.
-
This test is useful to detect possible process restarts which
-has occurred in the timeframe between two monit testing cycles.
-In the case that the restart was fast and the process provides
-expected service (i.e. all tests passed) you will be notified
+
This test is useful to detect possible process restarts which has
+occurred in the timeframe between two Monit testing cycles. In
+the case that the restart was fast and the process provides
+expected service (i.e. all tests succeeded) you will be notified
that the process was replaced.
For example sshd daemon can restart very quickly, thus if someone
-changes its configuration and do sshd restart outside of monit
-control, you will be notified that the process was replaced by
+changes its configuration and do sshd restart outside of Monit's
+control you will be notified that the process was replaced by a
new instance (or you can optionaly do some other action such as
preventively stop sshd).
-
Another example is MySQL Cluster which has its own watchdog with
-process restart ability. You can use monit for redundant
-monitoring. Monit will just send alert in the case that the MySQL
-cluster restarted the node quickly.
+
Another example is a MySQL Cluster which has its own watchdog
+with process restart ability. You can use Monit for redundant
+monitoring.
Example:
check process sshd with pidfile /var/run/sshd.pid
- if changed pid then exec "/my/script"
- alert root@localhost
monit tests the process parent id (ppid) of processes for change.
-This test is implicit and monit will send alert in the case of
-failure by default.
-
You may override the default action using below rule (it may only
-be used within a process service entry in the monit control file).
+
Monit can test the process parent process identification number
+(ppid) of a process for changes. This test is implicit and Monit
+will send alert in the case of failure by default.
Monit is able to perform connection testing via networked ports
or via Unix sockets. A connection test may only be used within a
-process or within a host service entry in the monit control file.
-
If a service listens on one or more sockets, monit can connect to
+process or within a host service entry in the Monit control file.
+
If a service listens on one or more sockets, Monit can connect to
the port (using either tcp or udp) and verify that the service
will accept a connection and that it is possible to write and
read from the socket. If a connection is not accepted or if there
-is a problem with socket read/write, monit will assume that
-something is wrong and execute a specified action. If monit is
-compiled with openssl, then ssl based network services can also
-be tested.
+is a problem with socket i/o, Monit will assume that something is
+wrong and execute a specified action. If Monit is compiled with
+openssl, then ssl based network services can also be tested.
The full syntax for the statement used for connection testing is
as follows (keywords are in capital and optional statements in
[brackets]),
host:HOST hostname. Optionally specify the host to connect to.
@@ -1580,10 +1673,10 @@
socket. Servers based on Unix sockets, always runs on the local
machine and does not use a port.
type:TYPE {TCP|UDP|TCPSSL}. Optionally specify the socket type
-monit should use when trying to connect to the port. The
+Monit should use when trying to connect to the port. The
different socket types are; TCP, UDP or TCPSSL, where TCP is a
regular stream based socket, UDP is a datagram socket and TCPSSL
-specify that monit should use a TCP socket with SSL when
+specify that Monit should use a TCP socket with SSL when
connecting to a port. The default socket type is TCP. If TCPSSL
is used you may optionally specify the SSL/TLS protocol to be
used and the md5 sum of the server's certificate. The TCPSSL
@@ -1591,16 +1684,18 @@
proto(col):PROTO {protocols}. Optionally specify the protocol
-monit should speak when a connection is established. At the
-moment monit knows how to speak:
+Monit should speak when a connection is established. At the
+moment Monit knows how to speak:
APACHE-STATUSDNSDWPFTPHTTPIMAP
+ CLAMAVLDAP2LDAP3
+ LMTPMYSQLNNTPNTP3
@@ -1608,11 +1703,12 @@
POSTFIX-POLICYRDATERSYNC
+ SIPSMTPSSHTNSPGSQL
-If you have compiled monit with ssl support, monit can also speak
+If you have compiled Monit with ssl support, Monit can also speak
the SSL variants such as:
HTTPSFTPS
@@ -1623,8 +1719,8 @@
HTTPS) :
TYPE TCPSSL PROTOCOL HTTP
If the server's protocol is not found in this list, simply do not
-specify the protocol and monit will utilize a default test,
-including testing if it is possible to read and write to the
+specify the protocol and Monit will utilize a default test,
+including test if it is possible to read and write to the
port. This default test is in most cases more than good enough to
deduce if the server behind the port is up or not.
The protocol statement is:
@@ -1678,7 +1774,7 @@
Obviously, do not use this test unless the httpd server you are
testing is Apache Httpd and mod_status is activated on the
server.
-
send/expect: {SEND|EXPECT} ``string'' .... If monit does not
+
send/expect: {SEND|EXPECT} ``string'' .... If Monit does not
support the protocol spoken by the server, you can write your own
protocol-test using send and expect strings. The SEND
statement sends a string to the server port and the EXPECT
@@ -1690,7 +1786,7 @@
the string is used as it is. The send/expect statement is:
[{SEND|EXPECT} "string"]+
-
Note that monit will send a string as it is, and you must
+
Note that Monit will send a string as it is, and you must
remember to include CR and LF in the string sent to the server if
the protocol expect such characters to terminate a string (most
text based protocols used over Internet does). Likewise monit
@@ -1699,19 +1795,31 @@
terminated by CRLF, (i.e. ``\r\n'') you may remember to add the
same terminating characters to the string you expect from the
server.
-
You can use non-printable characters in a send string if
-needed. Use the hex notation, \0xHEXHEX to send any char in the
-range \0x00-\0xFF, that is, 0-255 in decimal. This may be useful
-when testing some network protocols, particularly those over
-UDP. An example, to test a quake 3 server you can use the
-following,
+
As mentioned above, Monit limits the expect input to 255 bytes.
+You can override the default value by using this set statement at
+the top of the Monit configuration file:
+
+ SET EXPECTBUFFER <number> ["b"|"kb"|"mb"]
+
For example, to set the expect buffer to read 10 kilobytes:
+
+ set expectbuffer 10 kb
+
Note, if you want to test the number of bytes returned from the
+server you need to work around a bound check limit in POSIX
+regex. You cannot use something like expect ``.{5000}'' as the max
+number in a boundary check usually is {255}. However this should
+work, expect ``(.{250}){20}''
+
You can use non-printable characters in a send string if needed.
+Use the hex notation, \0xHEXHEX to send any char in the range
+\0x00-\0xFF, that is, 0-255 in decimal. This may be useful when
+testing some network protocols, particularly those over UDP. For
+example, to test a quake 3 server you can use the following,
Finally, send/expect can be used with any socket type, such as
TCP sockets, UNIX sockets and UDP sockets.
timeout:with TIMEOUT x SECONDS. Optionally specifies the
-connect and read timeout for the connection. If monit cannot
+connect and read timeout for the connection. If Monit cannot
connect to the server within this time it will assume that the
connection failed and execute the specified action. The default
connect timeout is 5 seconds.
@@ -1730,15 +1838,15 @@
[CONTENT {==|!=} "regular-expression"]
[TIMEOUT number SECONDS] [[<X>] <Y> CYCLES]
THEN action
- [ELSE IF PASSED [[<X>] <Y> CYCLES] THEN action]
+ [ELSE IF SUCCEEDED [[<X>] <Y> CYCLES] THEN action]
Where URL-spec is an URL on the standard form as specified in RFC
2396:
<protocol>://<authority><path>?<query>
-
Here is an example on an URL where all components are used:
+
Here is an example of an URL where all components are used:
If a username and password is included in the URL monit will
+
If a username and password is included in the URL Monit will
attempt to login at the server using Basic Authentication.
Testing the content returned by the server is optional. If used,
you can test if the content match or does not match a
@@ -1753,17 +1861,17 @@
Monit will look at the content-length header returned by the
server and download this amount before testing the content. That
is, if the content-length is more than 1Mb or this header is not
-set by the server monit will default to download up to 1 Mb and
+set by the server Monit will default to download up to 1 Mb and
not more.
Only the http(s) protocol is supported in an URL statement. If
-the protocol is https monit will use SSL when connecting to
+the protocol is https Monit will use SSL when connecting to
the server.
In addition monit can perform ICMP Echo tests in remote host
+
In addition Monit can perform ICMP Echo tests in remote host
checks. The icmp test may only be used in a check host entry and
-monit must run with super user privileges, that is, the root user
+Monit must run with super user privileges, that is, the root user
must run monit. The reason is that the icmp test utilize a raw
socket to send the icmp packet and only the super user is allowed
to create a raw socket.
@@ -1775,24 +1883,24 @@
[COUNT number] [WITH] [TIMEOUT number SECONDS]
[[<X>] <Y> CYCLES]
THEN action
- [ELSE IF PASSED [[<X>] <Y> CYCLES] THEN action]
+ [ELSE IF SUCCEEDED [[<X>] <Y> CYCLES] THEN action]
The rules for action and timeout are the same as those mentioned
above in the CONNECTION TESTING section. The count parameter
specifies how many consecutive echo requests will be send to the
host in one cycle. In the case that no reply came within timeout
-frame, monit reports error. When at least one reply was received,
+frame, Monit reports error. When at least one reply was received,
the test will pass. Monit sends by default three echo requests in
one cycle to prevent the random packet loss from generating false
alarm (i.e. up to 66% packet loss is tolerated). You can set the
-count option to different value, which can serve as error ratio.
-For example in the case that you require 100% ping success, you
-can set the count to 1 (i.e. just one attempt will be send, when
-the packet was lost, then error will be reported).
+count option to a value between 1 and 20, which can serve as an
+error ratio. For example if you require 100% ping success, set
+the count to 1 (i.e. just one request will be sent, and if the
+packet was lost an error will be reported).
An icmp ping test is useful for testing if a host is up, before
testing ports at the host. If an icmp ping test is used in a
check host entry, this test is run first and if the ping test
should fail we assume that the connection to the host is down and
-monit does not continue to test any ports. Here's an example:
+Monit does not continue to test any ports. Here's an example:
check host xyzzy with address xyzzy.org
if failed icmp type echo count 5 with timeout 15 seconds
@@ -1802,15 +1910,15 @@
alert foo@bar
In this case, if the icmp test should fail you will get one
alert and only one alert as long as the host is down, and equally
-important, monit will not test port 80 and port 443. Likewise
-if the icmp ping test should succeed (again) monit will continue
+important, Monit will not test port 80 and port 443. Likewise
+if the icmp ping test should succeed (again) Monit will continue
to test both port 80 and 443.
Keep in mind though that some firewalls can block icmp packages
and thus render the test useless.
To check a port connection and receive an alert if monit cannot
+
To check a port connection and receive an alert if Monit cannot
connect to the port, use the following statement:
if failed port 80 then alert
@@ -1826,7 +1934,7 @@
assume that the server behind the port is down. You may increase
or decrease the connect timeout by explicit add a connection
timeout. In the following example the timeout is increased to 15
-seconds and if monit cannot connect to the server within 15
+seconds and if Monit cannot connect to the server within 15
seconds the test will fail and an alert message is sent.
if failed port 80 with timeout 15 seconds then alert
@@ -1847,7 +1955,7 @@
And as mentioned above, if you do not specify a host-statement,
localhost or address is assumed.
Monit also knows how to speak some of the more popular Internet
-protocols. So, besides testing for connections, monit can also
+protocols. So, besides testing for connections, Monit can also
speak with the server in question to verify that the server
works. For example, the following is used to test a http server:
@@ -1862,7 +1970,7 @@
and request "/data/show.php?a=b&c=d"
then restart
The request must contain an URI string specifying a document from
-the http server. The string will be URL encoded by monit before
+the http server. The string will be URL encoded by Monit before
it sends the request to the http server, so it's okay to use URL
unsafe characters in the request. If the request statement isn't
specified, the default web server page will be requested.
@@ -1879,11 +1987,11 @@
and request "/page.html"
with checksum e428302e260e0832007d82de853aa8edf19cd872
then alert
-
monit will compute a checksum (either MD5 or SHA1 is used,
+
Monit will compute a checksum (either MD5 or SHA1 is used,
depending on length of the hash) for the document (in the above
case, /page.html) and compare the computed checksum with the
expected checksum. If the sums does not match then the if-tests
-action is performed, in this case alert. Note that monit will
+action is performed, in this case alert. Note that Monit will
not test the checksum for a document if the server does not
set the HTTP Content-Length header. A HTTP server should set
this header when it server a static document (i.e. a file). A
@@ -1891,7 +1999,7 @@
serving dynamic content (e.g. a document created by a CGI-script
or a Servlet), but to test the checksum for dynamic content is
not very useful. There are no limitation on the document size,
-but keep in mind that monit will use time to download the
+but keep in mind that Monit will use time to download the
document over the network so it's probably smart not to ask monit
to compute a checksum for documents larger than 1Mb or so,
depending on you network connection of course. Tip; If you get a
@@ -1899,7 +2007,7 @@
reason may be that the download timed out. In this case, explicit
set a longer timeout than the default 5 seconds.
As mentioned above, if the server protocol is not supported by
-monit you can write your own protocol test using send/expect
+Monit you can write your own protocol test using send/expect
strings. Here we show a protocol test using send/expect for an
imaginary ``Ali Baba and the Forty Thieves'' protocol:
@@ -1920,7 +2028,7 @@
specific ssl version, as we demonstrate in this example:
if failed host shop.sol.no port 443
- type TCPSSL SSLV3 # Force monit to use ssl version 3
+ type TCPSSL SSLV3 # Force Monit to use ssl version 3
# We expect the server to return this md5 certificate sum
# as either 12-34-56-78-90-AB-CD-EF-12-34-56-78-90-AB-CD-EF
# or e.g. 1234567890ABCDEF1234567890ABCDEF
@@ -1950,17 +2058,54 @@
if failed port 21 and protocol ftp then alert
[*] Well, not quite, since we specify an ip-address directly we
will bypass any DNS round-robin setup, but that's another story.
TARGET :
+you may specify an alternative recipient for the message,
+by adding a valid sip uri after this keyword.
+
MAXFORWARD :
+Limit the number of proxies or gateways that can forward the
+request to the next server. It's value is an integer in the range
+0-255, set by default to 70. If max-forward = 0, the next server
+may respond 200 OK (test succeeded) or send a 483 Too Many Hops
+(test failed)
+
SIP examples:
+
+ check host openser_all with address 127.0.0.1
+ if failed port 5060 type udp protocol sip
+ with target "localhost:5060" and maxforward 6
+ then alert
+
+If sips is supported, that is, sip over ssl, specify tcpssl as
+the connection type.
+
+ check host fwd.pulver.com with address fwd.pulver.com
+ if failed port 5060 type tcpssl protocol SIP
+ and target 613@fwd.pulver.com maxforward 10
+ then alert
If specified in the control file, monit will start a monit daemon
+
If specified in the control file, Monit will start a Monit daemon
with http support. From a Browser you can then start and stop
services, disable or enable service monitoring as well as view
-the status of each service. Also, if monit logs to its own file,
+the status of each service. Also, if Monit logs to its own file,
you can view the content of this logfile in a Browser.
-
The control file statement for starting a monit daemon with http
+
The control file statement for starting a Monit daemon with http
support is a global set-statement:
And you can use this URL, http://localhost:2812/, to access
the daemon from a browser. The port number, in this case 2812,
can be any number that you are allowed to bind to.
-
If you have compiled monit with openssl, you can also start the
+
If you have compiled Monit with openssl, you can also start the
httpd server with ssl support, using the following expression:
set httpd port 2812
ssl enable
pemfile /etc/certs/monit.pem
And you can use this URL, https://localhost:2812/, to access
-the monit web server over an ssl encrypted connection.
+the Monit web server over an ssl encrypted connection.
The pemfile, in the example above, holds both the server's
private key and certificate. This file should be stored in a safe
place on the filesystem and should have strict permissions, that
is, no more than 0700.
In addition, if you want to check for client certificates you can
use the CLIENTPEMFILE statement. In this case, a connecting
-client has to provided a certificate known by monit in order to
+client has to provided a certificate known by Monit in order to
connect. This file also needs to have all necessary CA
certificates. A configuration could look like:
@@ -1994,7 +2139,7 @@
By default self signed client certificates are not allowed. If
you want to use a self signed certificate from a client it has to
be allowed explicitly with the ALLOWSELFCERTIFICATION statement.
-
For more information on how to use monit with SSL and for more
+
For more information on how to use Monit with SSL and for more
information about certificates and generating pem files, please
consult the README.SSL file accompanying the software.
If you only want the http server to accept connect requests to
@@ -2016,42 +2161,29 @@
set httpd port 2812
...
signature {enable|disable}
-
Use disable to hide the server signature - monit will only
+
Use disable to hide the server signature - Monit will only
report its name (e.g. 'monit' instead of for example 'monit
4.2'). By default the version signature is enabled. It is worth
to stress that this option provides no security advantage and
falls into the ``security through obscurity'' category.
If you remove the httpd statement from the config file, monit
will stop the httpd server on configuration reload. Likewise if
-you change the port number, monit will restart the http server
+you change the port number, Monit will restart the http server
using the new specified port number.
-
The status page displayed by the monit web server is
+
The status page displayed by the Monit web server is
automatically refreshed with the same poll time set for the monit
daemon.
Note:
-
We strongly recommend that you start monit with http support (and
+
We strongly recommend that you start Monit with http support (and
bind the server to localhost, only, unless you are behind a
firewall). The built-in web-server is small and does not use much
-resources, and more importantly, monit can use the http server
-for interprocess communication between a monit client and a monit
+resources, and more importantly, Monit can use the http server
+for interprocess communication between a Monit client and a monit
daemon.
-
For instance, you must start a monit daemon with http support
-if you want to be able to use the following console commands.
-(That is; most of the available console commands).
If a monit daemon is running in the background we will ask the
+
For instance, you must start a Monit daemon with http support
+if you want to be able to use most of the available console
+commands. I.e. 'Monit stop all', 'Monit start all' etc.
+
If a Monit daemon is running in the background we will ask the
daemon (via the HTTP protocol) to execute the above commands.
That is, the daemon is requested to start and stop the services.
This ensures that a daemon will not restart a service that you
@@ -2060,7 +2192,7 @@
monit supports two types of authentication schema's for
+
Monit supports two types of authentication schema's for
connecting to the httpd server, (three, if you count SSL client
certificate validation). Both schema's can be used together or by
itself. You must choose at least one.
@@ -2070,10 +2202,8 @@
The http server maintains an access-control list of hosts and
networks allowed to connect to the server. You can add as many
hosts as you want to, but only hosts with a valid domain name or
-its IP address are allowed. If you specify a hostname that does
-not resolve, monit will write an error message in the console and
-not start. Networks require a network IP and a netmask to be
-accepted.
+its IP address are allowed. Networks require a network IP and a
+netmask to be accepted.
The http server will query a name server to check any hosts
connecting to the server. If a host (client) is trying to connect
to the server, but cannot be found in the access list or cannot
@@ -2087,7 +2217,7 @@
allow 10.1.1.1
allow 192.168.1.0/255.255.255.0
allow 10.0.0.0/8
-
Clients, not mentioned in the allow list that tries to connect to
+
Clients, not mentioned in the allow list, trying to connect to
the server are logged with their ip-address.
@@ -2101,77 +2231,95 @@
The biggest weakness with Basic Authentication is that the
username and password is sent in clear-text (i.e. base64 encoded)
over the network. It is therefor recommended that you do not use
-this authentication method unless you run the monit http server
+this authentication method unless you run the Monit http server
with ssl support. With ssl support it is completely safe to
use Basic Authentication since all http data, including Basic
Authentication headers will be encrypted.
-
monit will use Basic Authentication if an allow statement
+
Monit will use Basic Authentication if an allow statement
contains a username and a password separated with a single ':'
-character, like so; allow username:password. The username and
-password must be written in clear-text.
+character, like so: allow username:password. The username and
+password must be written in clear-text. Special characters
+can be used but the password has to be quoted.
+
PAM is supported as well on platforms which provide PAM (such
+as Linux, Mac OS X, FreeBSD, NetBSD). The syntax is:
+allow @mygroup which provides access to the user of group
+called mygroup. Monit uses PAM service called monit for
+PAM authentication, see PAM manual page for detailed instructions
+how to set the PAM service and PAM authentication plugins.
+Example Monit PAM for Mac OS X - /etc/pam.d/monit:
And configuration part for monitrc which allows only group admins
+authenticated using via PAM to access the http interface:
+
+ set httpd port 2812 allow @admin
Alternatively you can use files in ``htpasswd'' format (one
user:passwd entry per line), like so: allow
[cleartext|crypt|md5] /path [users]. By default cleartext
passwords are read. In case the passwords are digested it is
-necessary to specify the cryptographic method. In order to select
-the users their names can be added to the allow statement.
-Otherwise all users are added.
-
Example:
+necessary to specify the cryptographic method. If you do not want
+all users in the password file to have access to Monit you can
+specify only those users that should have access, in the allow
+statement. Otherwise all users are added.
+
Example1:
set httpd port 2812
allow hauk:password
allow md5 /etc/httpd/htpasswd john paul ringo george
If you use this method together with a host list, then only
clients from the listed hosts will be allowed to connect to the
-monit http server and each client will be asked to provide a
+Monit http server and each client will be asked to provide a
username and a password.
-
Example:
+
Example2:
set httpd port 2812
allow localhost
allow 10.1.1.1
- allow hauk:password
+ allow hauk:"password"
If you only want to use Basic Authentication, then just provide
-allow entries with username and password, like so:
-
- set httpd port 2812
- allow hauk:password
- allow admin:password
+allow entries with username and password or password files as in
+example 1 above.
Finally it is possible to define some users as read-only. A
-read-only user can read the monit web pages but will not get
+read-only user can read the Monit web pages but will not get
access to push-buttons and cannot change a service from the web
interface.
set httpd port 2812
allow admin:password
- allow hauk:password read-only
A user is set to read-only by using the read-only keyword
after username:password. In the above example the user hauk
is defined as a read-only user, while the admin user has all
access rights.
-
NB! a monit client will use the first username:password pair
+
NB! a Monit client will use the first username:password pair
in an allow list and you should not define the first user as a
-read-only user. If you do, monit console commands will not work.
+read-only user. If you do, Monit console commands will not work.
If you use Basic Authentication it is a good idea to set the
access permission for the control file (~/.monitrc) to only
readable and writable for the user running monit, because the
password is written in clear-text. (Use this command, /bin/chmod
-600 ~/.monitrc). In fact, since monit version 3.0, monit will
+600 ~/.monitrc). In fact, since Monit version 3.0, Monit will
complain and exit if the control file is readable by others.
Clients trying to connect to the server but supply the wrong
username and/or password are logged with their ip-address.
-
If the monit command line interface is being used at least one
-cleartext password is necessary. Otherwise, the monit command
-line interface will not be able to connect to the monit daemon
+
If the Monit command line interface is being used, at least one
+cleartext password is necessary. Otherwise, the Monit command
+line interface will not be able to connect to the Monit daemon
server.
If specified in the control file, monit can do dependency
+
If specified in the control file, Monit can do dependency
checking before start, stop, monitoring or unmonitoring of
services. The dependency statement may be used within any service
-entries in the monit control file.
Here is an example where we set up an apache service entry to
depend on the underlying apache binary. If the binary should
change an alert is sent and apache is not monitored anymore. The
-rationale is security and that monit should not execute a
+rationale is security and that Monit should not execute a
possibly cracked apache binary.
(1) check process apache
@@ -2231,21 +2379,21 @@
database depends on the file-system to be mounted before it
starts. See also the example section below for examples using the
depend statement.
-
Here we describe how monit will function with the above
+
Here we describe how Monit will function with the above
dependencies:
When you run 'monit stop all' this is the stop order: a, b,
-c, d. If you run 'monit stop d' then a, b and c
+
When you run 'Monit stop all' this is the stop order: a, b,
+c, d. If you run 'Monit stop d' then a, b and c
are also stopped because they depend on d and finally d is
stopped.
When monit runs it will first stop a, b and c then start
+
When Monit runs it will first stop a, b and c then start
d and finally start c, b then a.
@@ -2283,7 +2431,7 @@
A depend loop is for example; a->b and b->a or a->b->c->a.
-
When monit starts it will check for such loops and complain and
+
When Monit starts it will check for such loops and complain and
exit if a loop was found. It will also exit with a complaint if a
depend statement was used that does not point to a service in the
control file.
The preferred way to set up monit is to write a .monitrc file
+
The preferred way to set up Monit is to write a .monitrc file
in your home directory. When there is a conflict between the
command-line arguments and the arguments in this file, the
command-line arguments take precedence. To protect the security
of your control file and passwords the control file must have
-permissions no more than 0700 (u=xrw,g=,o=); monit will
+permissions no more than 0700 (u=xrw,g=,o=); Monit will
complain and exit otherwise.
@@ -2325,8 +2473,9 @@
Each service entry consists of the keywords `check', followed by
the service type. Each entry requires a <unique> descriptive
-name. This name is used by monit to refer to the service
-internally and in all interactions with the user.
+name, which may be freely chosen. This name is used by monit
+to refer to the service internally and in all interactions
+with the user.
Currently, six types of check statements are supported:
@@ -2335,50 +2484,50 @@
<path> is the absolute path to the program's pidfile. If the
pidfile does not exist or does not contain the pid number of a
-running process, monit will call the entry's start method if
-defined, If monit runs in passive mode or the start methods is
-not defined, monit will just send alerts on errors.
+running process, Monit will call the entry's start method if
+defined, If Monit runs in passive mode or the start methods is
+not defined, Monit will just send alerts on errors.
<path> is the absolute path to the file. If the file does not
-exist or disappeared, monit will call the entry's start method if
+exist or disappeared, Monit will call the entry's start method if
defined, if <path> does not point to a regular file type (for
-instance a directory), monit will disable monitoring of this
-entry. If monit runs in passive mode or the start methods is not
-defined, monit will just send alerts on errors.
+instance a directory), Monit will disable monitoring of this
+entry. If Monit runs in passive mode or the start methods is not
+defined, Monit will just send alerts on errors.
<path> is the absolute path to the fifo. If the fifo does not
-exist or disappeared, monit will call the entry's start method if
+exist or disappeared, Monit will call the entry's start method if
defined, if <path> does not point to a fifo type (for
-instance a directory), monit will disable monitoring of this
-entry. If monit runs in passive mode or the start methods is not
-defined, monit will just send alerts on errors.
+instance a directory), Monit will disable monitoring of this
+entry. If Monit runs in passive mode or the start methods is not
+defined, Monit will just send alerts on errors.
<path> is the path to the device block special file, mount point,
+
<path> is the path to the filesystem block special device, mount point,
file or a directory which is part of a filesystem. It is
recommended to use a block special file directly (for example
/dev/hda1 on Linux or /dev/dsk/c0t0d0s1 on Solaris, etc.) If you
use a mount point (for example /data), be careful, because if the
-device is unmounted the test will still be true because the mount
+filesystem is unmounted the test will still be true because the mount
point exist.
-
If the device becomes unavailable, monit will call the entry's
-start method if defined. if <path> does not point to a device,
-monit will disable monitoring of this entry. If monit runs in
-passive mode or the start methods is not defined, monit will just
+
If the filesystem becomes unavailable, Monit will call the entry's
+start method if defined. if <path> does not point to a filesystem,
+Monit will disable monitoring of this entry. If Monit runs in
+passive mode or the start methods is not defined, Monit will just
send alerts on errors.
<path> is the absolute path to the directory. If the directory
-does not exist or disappeared, monit will call the entry's start
+does not exist or disappeared, Monit will call the entry's start
method if defined, if <path> does not point to a directory, monit
-will disable monitoring of this entry. If monit runs in passive
-mode or the start methods is not defined, monit will just send
+will disable monitoring of this entry. If Monit runs in passive
+mode or the start methods is not defined, Monit will just send
alerts on errors.
CHECK HOST <unique name> ADDRESS <host address>
@@ -2407,11 +2556,11 @@
Keyword Function
----------------------------------------------------------------
set daemon Set a background poll interval in seconds.
- set init Set monit to run from init. monit will not
+ set init Set Monit to run from init. Monit will not
transform itself into a daemon process.
set logfile Name of a file to dump error- and status-
messages to. If syslog is specified as the
- file, monit will utilize the syslog daemon
+ file, Monit will utilize the syslog daemon
to log messages. This can optionally be
followed by 'facility <facility>' where
facility is 'log_local0' - 'log_local7' or
@@ -2419,19 +2568,21 @@
LOG_USER is used.
set mailserver The mailserver used for sending alert
notifications. If the mailserver is not
- defined, monit will try to use 'localhost'
+ defined, Monit will try to use 'localhost'
as the smtp-server for sending mail. You
- can add more mail servers, if monit cannot
+ can add more mail servers, if Monit cannot
connect to the first server it will try the
next server and so on.
set mail-format Set a global mail format for all alert
messages emitted by monit.
- set pidfile Explicit set the location of the monit lock
+ set idfile Explicit set the location of the Monit id
+ file. E.g. set idfile /var/monit/id.
+ set pidfile Explicit set the location of the Monit lock
file. E.g. set pidfile /var/run/xyzmonit.pid.
- set statefile Explicit set the location of the file monit
+ set statefile Explicit set the location of the file Monit
will write state data to. If not set, the
default is $HOME/.monit.state.
- set httpd port Activates monit http server at the given
+ set httpd port Activates Monit http server at the given
port number.
ssl enable Enables ssl support for the httpd server.
Requires the use of the pemfile statement.
@@ -2452,7 +2603,7 @@
optional part of the set httpd statement.
read-only Set the user defined in username:password
to read only. A read-only user cannot change
- a service from the monit web interface.
+ a service from the Monit web interface.
include include a file or files matching the globstring
Here are the legal service entry keywords:
@@ -2460,7 +2611,7 @@
Keyword Function
----------------------------------------------------------------
check Starts an entry and must be followed by the type
- of monitored service {device|directory|file|host
+ of monitored service {filesystem|directory|file|host
process|system} and a descriptive name for the
service.
pidfile Specify the process pidfile. Every
@@ -2468,7 +2619,7 @@
current process id. This statement should only
be used in a process service entry.
path Must be followed by a path to the block
- special file for filesystem (device), regular
+ special file for filesystem, regular
file, directory or a process's pidfile.
group Specify a groupname for a service entry.
start The program used to start the specified
@@ -2498,27 +2649,24 @@
is also optional. If this statement is not
prefixed with a host-statement, localhost is
used as the hostname to test the port at.
- type Specifies the socket type monit should use when
+ type Specifies the socket type Monit should use when
testing a connection to a port. If the type
keyword is omitted, tcp is used. This keyword
must be followed by either tcp, udp or tcpssl.
- tcp Specifies that monit should use a TCP
+ tcp Specifies that Monit should use a TCP
socket type (stream) when testing a port.
- tcpssl Specifies that monit should use a TCP socket
+ tcpssl Specifies that Monit should use a TCP socket
type (stream) and the secure socket layer (ssl)
when testing a port connection.
- udp Specifies that monit should use a UDP socket
+ udp Specifies that Monit should use a UDP socket
type (datagram) when testing a port.
certmd5 The md5 sum of a certificate a ssl forged
server has to deliver.
proto(col) This keyword specifies the type of service
- found at the port. monit knows at the moment
- how to speak HTTP, SMTP, FTP, POP, IMAP, MYSQL,
- NNTP, SSH, DWP, LDAP2, LDAP3, RDATE, NTP3, DNS,
- POSTFIX-POLICY, APACHE-STATUS, TNS, PGSQL and
- RSYNC.
+ found at the port. See CONNECTION TESTING
+ for list of supported protocols.
You're welcome to write new protocol test
- modules. If no protocol is specified monit will
+ modules. If no protocol is specified Monit will
use a default test which in most cases are good
enough.
request Specifies a server request and must come
@@ -2535,10 +2683,10 @@
unix(socket) Specifies a Unix socket file and used like
the port statement above to test a Unix
domain network socket connection.
- URL Specify an URL string which monit will use for
+ URL Specify an URL string which Monit will use for
connection testing.
content Optional sub-statement for the URL statement.
- Specifies that monit should test the content
+ Specifies that Monit should test the content
returned by the server against a regular
expression.
timeout x sec. Define a network port connection timeout. Must
@@ -2555,6 +2703,9 @@
certain events. See the examples above. More
than one alert statement is allowed in an
entry. This statement is also optional.
+ noalert Specifies an email address which don't want
+ to receive alerts. This statement is also
+ optional.
restart, stop These keywords may be used as actions for
unmonitor, various test statements. The exec statement is
start and special in that it requires a following string
@@ -2565,10 +2716,10 @@
mail-format Specifies a mail format for an alert message
This statement is an optional part of the
alert statement.
- checksum Specify that monit should compute and monitor a
+ checksum Specify that Monit should compute and monitor a
file's md5/sha1 checksum. May only be used in a
check file entry.
- expect Specifies a md5/sha1 checksum string monit
+ expect Specifies a md5/sha1 checksum string Monit
should expect when testing the checksum. This
statement is an optional part of the checksum
statement.
@@ -2582,13 +2733,13 @@
Useful in daemon mode when the cycle is short
and a service takes some time to start.
mode Must be followed either by the keyword active,
- passive or manual. If active, monit will restart
+ passive or manual. If active, Monit will restart
the service if it is not running (this is the
- default behavior). If passive, monit will not
+ default behavior). If passive, Monit will not
(re)start the service if it is not running - it
will only monitor and send alerts (resource
related restart and stop options are ignored
- in this mode also). If manual, monit will enter
+ in this mode also). If manual, Monit will enter
active mode only if a service was started under
monit's control otherwise the service isn't
monitored.
@@ -2634,24 +2785,24 @@
pemfile, allow, read-only, check, init, count,
pidfile, statefile, group, start, stop, uid,
gid, connection, port(number), unix(socket), type,
-proto(col), tcp, tcpssl, udp, alert, icmp,
+proto(col), tcp, tcpssl, udp, alert, noalert,
mail-format, restart, timeout, checksum, resource,
expect, send, mailserver, every, mode, active,
passive, manual, depends, host, default, http,
-ftp, smtp, pop, ntp3, nntp, imap, ssh,
-dwp, ldap2, ldap3, tns, request, cpu, mem,
-totalmem, children, loadavg, timestamp, changed,
-second(s), minute(s), hour(s), day(s), space,
-inode, pid, ppid, perm(ission), process, file,
-directory, device, size, unmonitor, rdate,
-rsync, data, invalid, exec, nonexist, policy,
-reminder, instance, eventqueue, basedir, slot(s),
-system and failed
+ftp, smtp, pop, ntp3, nntp, imap, clamav,
+ssh, dwp, ldap2, ldap3, tns, request, cpu,
+mem, totalmem, children, loadavg, timestamp,
+changed, second(s), minute(s), hour(s), day(s),
+space, inode, pid, ppid, perm(ission), icmp,
+process, file, directory, filesystem, size, action,
+unmonitor, rdate, rsync, data, invalid, exec,
+nonexist, policy, reminder, instance, eventqueue,
+basedir, slot(s), system, idfile and failed
And here is a complete list of noise keywords ignored by
monit:
is, as, are, on(ly), with(in), and, has,
using, use, the, sum, program(s), than, for,
-usage, was.
+usage, was, but, of.
Note: If the start or stop programs are shell scripts,
then the script must begin with #! and the remainder of the
first line must specify an interpreter for the program. E.g.
@@ -2668,23 +2819,24 @@
check to see if the server is running and log a message if not:
check process resin with pidfile /usr/local/resin/srun.pid
-
To have monit start the server if it's not running, add a start
+
To have Monit start the server if it's not running, add a start
statement:
check process resin with pidfile /usr/local/resin/srun.pid
start program = "/usr/local/resin/bin/srun.sh start"
Here's a more advanced example for monitoring an apache
web-server listening on the default port number for HTTP and
-HTTPS. In this example monit will restart apache if it's not
-accepting connections at the port numbers. The method monit use
+HTTPS. In this example Monit will restart apache if it's not
+accepting connections at the port numbers. The method Monit use
for a process restart is to first execute the stop-program, wait
-for the process to stop and then execute the start-program. (If
-monit was unable to stop or start the service a failed alert
-message will be sent if you have requested alert messages to be
-sent).
+up to 30s for the process to stop and then execute the start-program
+and wait up to 30s for it to start. The length of start or stop
+timeout can be overriden using the 'timeout' option. If Monit was
+unable to stop or start the service a failed alert message will
+be sent if you have requested alert messages to be sent.
check process apache with pidfile /var/run/httpd.pid
- start program = "/etc/init.d/httpd start"
+ start program = "/etc/init.d/httpd start" with timeout 60 seconds
stop program = "/etc/init.d/httpd stop"
if failed port 80 then restart
if failed port 443 with timeout 15 seconds then restart
@@ -2694,9 +2846,9 @@
programs that does not (e.g. Java programs), monit's ability to
start a program as a certain user can be very useful. In this
example we start the Tomcat Java Servlet Engine as the standard
-nobody user and group. Please note that monit will only switch
+nobody user and group. Please note that Monit will only switch
uid and gid for a program if the super-user is running monit,
-otherwise monit will simply ignore the request to change uid and
+otherwise Monit will simply ignore the request to change uid and
gid.
check process tomcat with pidfile /var/run/tomcat.pid
@@ -2714,7 +2866,7 @@
stop program = "/etc/init.d/named stop"
if failed port 53 use type udp protocol dns then restart
if 3 restarts within 5 cycles then timeout
-
The following example illustrate how to check if the service
+
The following example illustrates how to check if the service
'sophie' is answering connections on its Unix domain socket:
check process sophie with pidfile /var/run/sophie.pid
@@ -2732,7 +2884,7 @@
if failed host shop.sol.no port 443 then alert
if failed host chat.sol.no port 80 then alert
if failed host www.tildeslash.com port 80 then alert
-
To make sure that monit is communicating with a http server a
+
To make sure that Monit is communicating with a http server a
protocol test can be added:
check process apache with pidfile /var/run/httpd.pid
@@ -2774,7 +2926,7 @@
check host www.tildeslash.com with address www.tildeslash.com
if failed icmp type echo count 5 with timeout 15 seconds
then alert
-
In the following example we ask monit to compute and verify the
+
In the following example we ask Monit to compute and verify the
checksum for the underlying apache binary used by the start and
stop programs. If the the checksum test should fail, monitoring
will be disabled to prevent possibly starting a compromised
@@ -2788,16 +2940,43 @@
check file apache_bin with path /usr/local/apache/bin/httpd
if failed checksum then unmonitor
-
In this example we ask monit to test the checksum for a document
+
In this example we ask Monit to test the checksum for a document
on a remote server. If the checksum was changed we send an alert:
check host tildeslash with address www.tildeslash.com
if failed port 80 protocol http
and request "/monit/dist/monit-4.0.tar.gz"
with checksum f9d26b8393736b5dfad837bb13780786
- then alert
- alert hauk@tildeslash.com with mail-format {subject:
- Aaaalarm! }
+ then alert
+
Here are a couple of tests for some popular communication
+servers, using the SIP protocol. First we test a FreeSWITCH
+server and then an Asterisk server
+
+ check process freeswitch
+ with pidfile /usr/local/freeswitch/log/freeswitch.pid
+ start program = “/usr/local/freeswitch/bin/freeswitch -nc -hp”
+ stop program = “/usr/local/freeswitch/bin/freeswitch -stop”
+ if totalmem > 1000.0 MB for 5 cycles then alert
+ if totalmem > 1500.0 MB for 5 cycles then alert
+ if totalmem > 2000.0 MB for 5 cycles then restart
+ if cpu > 60% for 5 cycles then alert
+ if failed port 5060 type udp protocol SIP
+ target me@foo.bar and maxforward 10
+ then restart
+ if 5 restarts within 5 cycles then timeout
+
+ check process asterisk
+ with pidfile /var/run/asterisk/asterisk.pid
+ start program = “/usr/sbin/asterisk”
+ stop program = “/usr/sbin/asterisk -r -x ’shutdown now’”
+ if totalmem > 1000.0 MB for 5 cycles then alert
+ if totalmem > 1500.0 MB for 5 cycles then alert
+ if totalmem > 2000.0 MB for 5 cycles then restart
+ if cpu > 60% for 5 cycles then alert
+ if failed port 5060 type udp protocol SIP
+ and target me@foo.bar maxforward 10
+ then restart
+ if 5 restarts within 5 cycles then timeout
Some servers are slow starters, like for example Java based
Application Servers. So if we want to keep the poll-cycle low
(i.e. < 60 seconds) but allow some services to take its time to
@@ -2809,9 +2988,9 @@
if failed port 8840 then alert
every 2 cycles
Here is an example where we group together two database entries
-so you can manage them together, e.g.; 'monit -g database start
+so you can manage them together, e.g.; 'Monit -g database start
all'. The mode statement is also illustrated in the first entry
-and have the effect that monit will not try to (re)start this
+and have the effect that Monit will not try to (re)start this
service if it is not running:
check process sybase with pidfile /var/run/sybase.pid
@@ -2836,8 +3015,9 @@
check process apache with pidfile /var/run/httpd.pid
start program = "/etc/init.d/httpd start"
stop program = "/etc/init.d/httpd stop"
- if cpu > 60% for 2 cycles then alert
- if cpu > 80% for 5 cycles then restart
+ if cpu > 40% for 2 cycles then alert
+ if totalcpu > 60% for 2 cycles then alert
+ if totalcpu > 80% for 5 cycles then restart
if mem > 100 MB for 5 cycles then stop
if loadavg(5min) greater than 10.0 for 8 cycles then stop
This examples demonstrate the timestamp statement with exec and
@@ -2853,7 +3033,6 @@
check process apache with pidfile /var/run/httpd.pid
start = "/etc/init.d/httpd start"
stop = "/etc/init.d/httpd stop"
- if failed host www.tildeslash.com port 80 then restart
alert admin@bar on {nonexist, timeout}
with mail-format {
from: bofh@$HOST
@@ -2862,11 +3041,15 @@
Your faithful employee,
monit
}
+ if failed host www.tildeslash.com port 80 then restart
if 3 restarts within 5 cycles then timeout
depend httpd_bin
group apache
check file httpd_bin with path /usr/local/apache/bin/httpd
+ alert security@bar on {checksum, timestamp,
+ permission, uid, gid}
+ with mail-format {subject: Alaaarrm! on $HOST}
if failed checksum
and expect 8f7f419955cefa0b33a2ba316cba3659
then unmonitor
@@ -2874,9 +3057,6 @@
if failed uid root then unmonitor
if failed gid root then unmonitor
if changed timestamp then alert
- alert security@bar on {checksum, timestamp,
- permission, uid, gid}
- with mail-format {subject: Alaaarrm! on $HOST}
group apache
In this example, we demonstrate usage of the depend statement. In
this case, we want to start oracle and apache. However, we've set
@@ -2967,7 +3147,7 @@
alert foo@bar on { checksum, size, timestamp, uid, gid }
depends on datafs
- check device datafs with path /dev/sdb1
+ check filesystem datafs with path /dev/sdb1
group server
start program = "/bin/mount /data"
stop program = "/bin/umount /data"
@@ -2995,163 +3175,9 @@
then alert
alert rms@gnu.org with mail-format {
subject: The gnu server may be hacked again! }
-
Note; only the check type, pidfile/path/address statements
-are mandatory, the other statements are optional and the order of
-the optional statements is not important.
This is the normal start sequence for a cluster-node. With this
-sequence, there should be no error-case, which is not handled
-either by heartbeat or by monit. For example, if monit dies,
-initd restarts it. If heartbeat dies, monit restarts it. If the
-node dies, the heartbeat instance on the other node detects it
-and restart the services there.
This example describes a cluster with 2 nodes. Services running
-on Node 1 are in the group node1 and Node 2 services are in
-the node2 group.
-
The local group entries are mode active, the node group
-entries are mode manual and controlled by heartbeat.
-
- #
- # local services on both hosts
- #
-
- check process heartbeat with pidfile /var/run/heartbeat.pid
- start program = "/etc/init.d/heartbeat start"
- stop program = "/etc/init.d/heartbeat start"
- mode active
- alert foo@bar
- group local
-
- check process postfix with pidfile /var/run/postfix/master.pid
- start program = "/etc/init.d/postfix start"
- stop program = "/etc/init.d/postfix stop"
- mode active
- alert foo@bar
- group local
-
- #
- # node1 services
- #
-
- check process apache with pidfile /var/apache/logs/httpd.pid
- start program = "/etc/init.d/apache start"
- stop program = "/etc/init.d/apache stop"
- depends named
- alert foo@bar
- mode manual
- group node1
-
- check process named with pidfile /var/tmp/named.pid
- start program = "/etc/init.d/named start"
- stop program = "/etc/init.d/named stop"
- alert foo@bar
- mode manual
- group node1
-
- #
- # node2 services
- #
-
- check process named-slave with pidfile /var/tmp/named-slave.pid
- start program = "/etc/init.d/named-slave start"
- stop program = "/etc/init.d/named-slave stop"
- mode manual
- alert foo@bar
- group node2
-
- check process squid with pidfile /var/squid/logs/squid.pid
- start program = "/etc/init.d/squid start"
- stop program = "/etc/init.d/squid stop"
- depends named-slave
- alert foo@bar
- mode manual
- group node2
-
initd: /etc/inittab
-
Monit is started on both nodes with initd. You will need to add
-an entry in /etc/inittab to start monit with the same local
-group heartbeat is member of.
-
- #/etc/inittab
- mo:2345:respawn:/usr/local/bin/monit -d 10 -c /etc/monitrc -g local
-
heartbeat: /etc/ha.d/haresources
-
When heartbeat starts, heartbeat looks up the node entry and
-start the script /etc/init.d/monit-node1 or
-/etc/init.d/monit-node2. The script calls monit to start the
-specific group per node.
As mentioned elsewhere, monit save its state to a state file. If
-the monit process should die, upon restart monit will read its
-last known state from this file. This can be a problem if monit
-is used in a cluster, as illustrate in this scenario:
-
-
-
The active node fails, the second takes over
-
-
-
After a reboot, the failed node comes back, monit read its state
-file and start all the services (even manual ones) as they were
-running before the failure. This is a problem because services
-will now run on both nodes.
-
-
-
The solution to this problem is to remove the monit.state file in
-a rc-script called at boot time and before monit is started.
+
Note; only the check statement is mandatory, the other
+statements are optional and the order of the optional statements
+is not important.
@@ -3167,7 +3193,7 @@
previous two locations, and the current working
directory contains a monitrc file, this file is
used instead.
-
~/.monitrc.pid
+
~/.monit.pid
Lock file to help prevent concurrent runs (non-root
mode).
/var/run/monit.pid
@@ -3177,18 +3203,20 @@
Lock file to help prevent concurrent runs (root mode,
systems without /var/run).
~/.monit.state
- monit save its state to this file and utilize
+ Monit save its state to this file and utilize
information found in this file to recover from
a crash. This is a binary file and its content is
only of interest to monit. You may set the location
- of this file in the monit control file or by using
- the -s switch when monit is started.
+ of this file in the Monit control file or by using
+ the -s switch when Monit is started.
+
~/.monit.id
+ Monit save its unique id to this file.
No environment variables are used by monit. However, when monit
-execute a script or a program monit will set several environment
+
No environment variables are used by Monit. However, when Monit
+execute a script or a program Monit will set several environment
variables which can be utilized by the executable. The following
and only the following environment variables are available:
If a monit daemon is running, SIGUSR1 wakes it up from its sleep
+
If a Monit daemon is running, SIGUSR1 wakes it up from its sleep
phase and forces a poll of all services. SIGTERM and SIGINT will
-gracefully terminate a monit daemon. The SIGTERM signal is sent
-to a monit daemon if monit is started with the quit action
+gracefully terminate a Monit daemon. The SIGTERM signal is sent
+to a Monit daemon if Monit is started with the quit action
argument.
-
Sending a SIGHUP signal to a running monit daemon will force
+
Sending a SIGHUP signal to a running Monit daemon will force
the daemon to reinitialize itself, specifically it will reread
configuration, close and reopen log files.
-
Running monit in foreground while a background monit daemon is
+
Running Monit in foreground while a background Monit daemon is
running will wake up the daemon.
This is a very silent program. Use the -v switch if you want to
-see what monit is doing, and tail -f the logfile. Optionally for
-testing purposes; you can start monit with the -Iv switch. Monit
+see what Monit is doing, and tail -f the logfile. Optionally for
+testing purposes; you can start Monit with the -Iv switch. Monit
will then print debug information to the console, to stop monit
in this mode, simply press CTRL^C (i.e. SIGINT) in the same
console.
-
The syntax (and parser) of the control file is inspired by Eric
+
The syntax (and parser) of the control file was inspired by Eric
S. Raymond et al. excellent fetchmail program. Some portions of
this man page does also receive inspiration from the same
authors.
Copyright (C) 2000-2006 by the monit project group. All Rights
-Reserved. This product is distributed in the hope that it will be
-useful, but WITHOUT any warranty; without even the implied
-warranty of MERCHANTABILITY or FITNESS for a particular purpose.
+
Copyright (C) 2009 by Tildeslash Ltd. All Rights Reserved. This
+product is distributed in the hope that it will be useful, but
+WITHOUT any warranty; without even the implied warranty of
+MERCHANTABILITY or FITNESS for a particular purpose.
GNU text utilities; md5sum(1); sha1sum(1); openssl(1); glob(7);
-regex(7)
+regex(7); http://mmonit.com/
Binary files /tmp/mTIqZj4ofw/monit-4.8.1/doc/presentation.odp and /tmp/QeMlhPoI46/monit-5.0.3/doc/presentation.odp differ
Binary files /tmp/mTIqZj4ofw/monit-4.8.1/doc/presentation.sxi and /tmp/QeMlhPoI46/monit-5.0.3/doc/presentation.sxi differ
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/env.c /tmp/QeMlhPoI46/monit-5.0.3/env.c
--- monit-4.8.1/env.c 2006-04-27 21:16:03.000000000 +0100
+++ monit-5.0.3/env.c 2009-02-13 13:06:31.000000000 +0000
@@ -1,20 +1,30 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
#include
@@ -59,12 +69,20 @@
#include
#endif
+#ifdef HAVE_CRT_EXTERNS_H
+#include
+#endif
+
#include "monitor.h"
#ifndef MAXPATHLEN
#define MAXPATHLEN STRLEN
#endif
+#ifdef DARWIN
+#define environ (*_NSGetEnviron())
+#endif
+
/* Private prototypes */
static void set_sandbox(void);
static void set_environment(void);
@@ -75,7 +93,7 @@
*
* @author Jan-Henrik Haukeland,
*
- * @version \$Id: env.c,v 1.32 2006/04/27 20:16:03 martinp Exp $
+ * @version \$Id: env.c,v 1.42 2009/02/13 09:18:06 hauk Exp $
*
* @file
*/
@@ -178,37 +196,27 @@
*/
static void set_environment(void) {
- char cwd[MAXPATHLEN];
struct passwd *pw;
/* Get password struct */
if ( ! (pw= getpwuid(geteuid())) ) {
-
LogError("%s: You don't exist. Go away.\n", prog);
exit(1);
-
}
+ Run.Env.home= xstrdup(pw->pw_dir);
+ Run.Env.user= xstrdup(pw->pw_name);
/* Get CWD */
- if ( ! (getcwd(cwd, sizeof(cwd))) ) {
-
- LogError("%s: Cannot read current directory -- %s\n",
- prog, STRERROR);
+ Run.Env.cwd= xcalloc(sizeof(char), MAXPATHLEN+1);
+ if ( ! (getcwd(Run.Env.cwd, MAXPATHLEN)) ) {
+ LogError("%s: Cannot read current directory -- %s\n", prog, STRERROR);
exit(1);
-
}
/*
* Save and clear the file creation mask
*/
Run.umask= umask(0);
-
- /*
- * Initialize the runtime environment object
- */
- Run.Env.cwd= xstrdup(cwd);
- Run.Env.home= xstrdup(pw->pw_dir);
- Run.Env.user= xstrdup(pw->pw_name);
-
+
}
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/event.c /tmp/QeMlhPoI46/monit-5.0.3/event.c
--- monit-4.8.1/event.c 2006-04-27 21:16:03.000000000 +0100
+++ monit-5.0.3/event.c 2009-05-28 22:35:29.000000000 +0100
@@ -1,20 +1,30 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
#include "config.h"
@@ -31,6 +41,15 @@
#include
#endif
+#ifdef HAVE_SYS_TIME_H
+#include
+#endif
+
+#ifdef HAVE_TIME_H
+#include
+#endif
+
+
#ifdef HAVE_SYS_STAT_H
#include
#endif
@@ -54,7 +73,7 @@
*
* @author Jan-Henrik Haukeland,
* @author Martin Pala
- * @version \$Id: event.c,v 1.61 2006/04/27 20:16:03 martinp Exp $
+ * @version \$Id: event.c,v 1.99 2009/05/28 21:35:29 martinp Exp $
* @file
*/
@@ -62,25 +81,29 @@
/* ------------------------------------------------------------- Definitions */
EventTable_T Event_Table[]= {
- {EVENT_CHANGED, "Changed", "Changed not"},
- {EVENT_CHECKSUM, "Checksum failed", "Checksum passed"},
- {EVENT_CONNECTION, "Connection failed", "Connection passed"},
- {EVENT_DATA, "Data access error", "Data access succeeded"},
- {EVENT_EXEC, "Execution failed", "Execution succeeded"},
- {EVENT_GID, "GID failed", "GID passed"},
- {EVENT_ICMP, "ICMP failed", "ICMP passed"},
- {EVENT_INSTANCE, "Monit instance changed", "Monit instance changed not"},
- {EVENT_INVALID, "Invalid type", "Type passed"},
- {EVENT_MATCH, "Regex match", "No regex match"},
- {EVENT_NONEXIST, "Does not exist", "Exists"},
- {EVENT_PERMISSION, "Permission failed", "Permission passed"},
- {EVENT_RESOURCE, "Resource limit matched", "Resource limit passed"},
- {EVENT_SIZE, "Size failed", "Size passed"},
- {EVENT_TIMEOUT, "Timeout", "Timeout recovery"},
- {EVENT_TIMESTAMP, "Timestamp failed", "Timestamp passed"},
- {EVENT_UID, "UID failed", "UID passed"},
+ {EVENT_ACTION, "Action done", "Action done", "Action done", "Action done"},
+ {EVENT_CHECKSUM, "Checksum failed", "Checksum succeeded", "Checksum changed", "Checksum not changed"},
+ {EVENT_CONNECTION, "Connection failed", "Connection succeeded", "Connection changed", "Connection not changed"},
+ {EVENT_CONTENT, "Content failed", "Content succeeded", "Content match", "Content doesn't match"},
+ {EVENT_DATA, "Data access error", "Data access succeeded", "Data access changed", "Data access not changed"},
+ {EVENT_EXEC, "Execution failed", "Execution succeeded", "Execution changed", "Execution not changed"},
+ {EVENT_FSFLAG, "Filesystem flags failed", "Filesystem flags succeeded", "Filesystem flags changed", "Filesystem flags not changed"},
+ {EVENT_GID, "GID failed", "GID succeeded", "GID changed", "GID not changed"},
+ {EVENT_HEARTBEAT, "Heartbeat failed", "Heartbeat succeeded", "Heartbeat changed", "Heartbeat not changed"},
+ {EVENT_ICMP, "ICMP failed", "ICMP succeeded", "ICMP changed", "ICMP not changed"},
+ {EVENT_INSTANCE, "Monit instance failed", "Monit instance succeeded", "Monit instance changed", "Monit instance not changed"},
+ {EVENT_INVALID, "Invalid type", "Type succeeded", "Type changed", "Type not changed"},
+ {EVENT_NONEXIST, "Does not exist", "Exists", "Existence changed", "Existence not changed"},
+ {EVENT_PERMISSION, "Permission failed", "Permission succeeded", "Permission changed", "Permission not changed"},
+ {EVENT_PID, "PID failed", "PID succeeded", "PID changed", "PID not changed"},
+ {EVENT_PPID, "PPID failed", "PPID succeeded", "PPID changed", "PPID not changed"},
+ {EVENT_RESOURCE, "Resource limit matched", "Resource limit succeeded", "Resource limit changed", "Resource limit not changed"},
+ {EVENT_SIZE, "Size failed", "Size succeeded", "Size changed", "Size not changed"},
+ {EVENT_TIMEOUT, "Timeout", "Timeout recovery", "Timeout changed", "Timeout not changed"},
+ {EVENT_TIMESTAMP, "Timestamp failed", "Timestamp succeeded", "Timestamp changed", "Timestamp not changed"},
+ {EVENT_UID, "UID failed", "UID succeeded", "UID changed", "UID not changed"},
/* Virtual events */
- {EVENT_NULL, "No Event", "No Event"},
+ {EVENT_NULL, "No Event", "No Event", "No Event", "No Event"}
};
@@ -88,8 +111,9 @@
static void handle_event(Event_T);
-static int handle_action(Event_T, Action_T);
+static void handle_action(Event_T, Action_T);
static void Event_queue_add(Event_T);
+static void Event_queue_update(Event_T, const char *);
/* ------------------------------------------------------------------ Public */
@@ -103,23 +127,17 @@
* @param action Description of the event action
* @param s Optional message describing the event
*/
-void Event_post(Service_T service, long id, short state, EventAction_T action,
- char *s, ...) {
-
- Event_T e = service->eventlist;
+void Event_post(Service_T service, long id, short state, EventAction_T action, char *s, ...) {
+ Event_T e;
ASSERT(service);
ASSERT(action);
- ASSERT(state == STATE_FAILED || state == STATE_PASSED);
+ ASSERT(state == STATE_FAILED || state == STATE_SUCCEEDED || state == STATE_CHANGED || state == STATE_CHANGEDNOT);
- if(e == NULL)
- {
- /* Only first failed event can initialize the queue for given event type,
- * thus passed events are ignored until first error. However, in the case
- * that the error flag is set for the passed event, we will allow it (i.e.
- * event queue was flushed during monit reload and the service was in
- * failed state before reload) */
- if(state != STATE_FAILED && !(service->error & id))
+ if ((e = service->eventlist) == NULL) {
+ /* Only first failed/changed event can initialize the queue for given event type,
+ * thus succeeded events are ignored until first error. */
+ if (state == STATE_SUCCEEDED || state == STATE_CHANGEDNOT)
return;
/* Initialize event list and add first event. The manadatory informations
@@ -128,16 +146,15 @@
* persistent and managable across monit restarts */
NEW(e);
e->id = id;
- e->collected = time(NULL);
+ gettimeofday(&e->collected, NULL);
e->source = xstrdup(service->name);
- e->group = service->group?xstrdup(service->group):xstrdup("");
+ e->group = service->group ? xstrdup(service->group) : xstrdup("");
e->mode = service->mode;
e->type = service->type;
e->state = STATE_INIT;
- e->state_map = state;
+ e->state_map = 1;
e->action = action;
- if(s)
- {
+ if (s) {
long l;
va_list ap;
@@ -145,50 +162,39 @@
e->message = Util_formatString(s, ap, &l);
va_end(ap);
}
- pthread_mutex_init(&e->mutex, NULL);
service->eventlist = e;
- }
- else
- {
+ } else {
/* Try to find the event with the same origin and type identification.
* Each service and each test have its own custom actions object, so
* we share actions object address to identify event source. */
- do
- {
- if(e->action == action && e->id == id)
- {
- LOCK(e->mutex)
- e->collected = time(NULL);
-
- /* Shift the existing event flags to the left
- * and set the first bit based on actual state */
- e->state_map <<= 1;
- e->state_map |= state;
-
- /* Update the message */
- if(s)
- {
- long l;
- va_list ap;
-
- FREE(e->message);
- va_start(ap, s);
- e->message = Util_formatString(s, ap, &l);
- va_end(ap);
- }
-
- END_LOCK;
+ do {
+ if (e->action == action && e->id == id) {
+ gettimeofday(&e->collected, NULL);
+
+ /* Shift the existing event flags to the left
+ * and set the first bit based on actual state */
+ e->state_map <<= 1;
+ e->state_map |= ((state == STATE_SUCCEEDED || state == STATE_CHANGEDNOT) ? 0 : 1);
+
+ /* Update the message */
+ if (s) {
+ long l;
+ va_list ap;
+
+ FREE(e->message);
+ va_start(ap, s);
+ e->message = Util_formatString(s, ap, &l);
+ va_end(ap);
+ }
break;
}
e = e->next;
- }
- while(e);
+ } while (e);
- if(!e)
- {
- /* Only first failed event can initialize the queue for given event type,
- * thus passed events are ignored until first error */
- if(state != STATE_FAILED)
+ if (!e) {
+ /* Only first failed/changed event can initialize the queue for given event type,
+ * thus succeeded events are ignored until first error. */
+ if (state == STATE_SUCCEEDED || state == STATE_CHANGEDNOT)
return;
/* Event was not found in the pending events list, we will add it.
@@ -198,16 +204,15 @@
* restarts */
NEW(e);
e->id = id;
- e->collected = time(NULL);
+ gettimeofday(&e->collected, NULL);
e->source = xstrdup(service->name);
- e->group = service->group?xstrdup(service->group):xstrdup("");
+ e->group = service->group ? xstrdup(service->group) : xstrdup("");
e->mode = service->mode;
e->type = service->type;
e->state = STATE_INIT;
- e->state_map = state;
+ e->state_map = 1;
e->action = action;
- if(s)
- {
+ if (s) {
long l;
va_list ap;
@@ -215,7 +220,6 @@
e->message = Util_formatString(s, ap, &l);
va_end(ap);
}
- pthread_mutex_init(&e->mutex, NULL);
e->next = service->eventlist;
service->eventlist = e;
}
@@ -224,20 +228,13 @@
e->state_changed = Event_check_state(e, state);
/* In the case that the state changed, update it and reset the counter */
- if(e->state_changed)
- {
+ if (e->state_changed) {
e->state = state;
e->count = 1;
- }
- else
- {
+ } else
e->count++;
- }
-
- LOCK(e->mutex)
- handle_event(e);
- END_LOCK;
+ handle_event(e);
}
@@ -250,18 +247,14 @@
* @return The Service where the event orginated
*/
Service_T Event_get_source(Event_T E) {
-
Service_T s = NULL;
ASSERT(E);
- if(!(s = Util_getService(E->source)))
- {
+ if (!(s = Util_getService(E->source)))
LogError("Service %s not found in monit configuration\n", E->source);
- }
return s;
-
}
@@ -271,11 +264,8 @@
* @return The Service name where the event orginated
*/
char *Event_get_source_name(Event_T E) {
-
ASSERT(E);
-
return (E->source);
-
}
@@ -285,11 +275,8 @@
* @return The group name of the service where the event orginated
*/
char *Event_get_source_group(Event_T E) {
-
ASSERT(E);
-
return (E->group);
-
}
@@ -299,11 +286,8 @@
* @return The service type of the service where the event orginated
*/
int Event_get_source_type(Event_T E) {
-
ASSERT(E);
-
return (E->type);
-
}
@@ -312,12 +296,9 @@
* @param E An event object
* @return The Event timestamp
*/
-time_t Event_get_collected(Event_T E) {
-
+struct timeval *Event_get_collected(Event_T E) {
ASSERT(E);
-
- return E->collected;
-
+ return &E->collected;
}
@@ -327,11 +308,8 @@
* @return The Event raw state
*/
short Event_get_state(Event_T E) {
-
ASSERT(E);
-
return E->state;
-
}
@@ -343,42 +321,39 @@
* @return The Event raw state
*/
short Event_check_state(Event_T E, short S) {
-
int i;
int count = 0;
+ short state = (S == STATE_SUCCEEDED || S == STATE_CHANGEDNOT) ? 0 : 1; /* translate to 0/1 class */
Action_T action;
+ Service_T service;
long long flag;
ASSERT(E);
- /* Only the true failed state condition can change the initial state */
- if(S == STATE_PASSED && E->state == STATE_INIT)
- {
+ if (!(service = Event_get_source(E)))
+ return TRUE;
+
+ /* Only true failed/changed state condition can change the initial state */
+ if (!state && E->state == STATE_INIT && !(service->error & E->id))
return FALSE;
- }
- action = (S == STATE_PASSED)?E->action->passed:E->action->failed;
+ action = !state ? E->action->succeeded : E->action->failed;
/* Compare as many bits as cycles able to trigger the action */
- for(i = 0; i < action->cycles; i++)
- {
+ for (i = 0; i < action->cycles; i++) {
/* Check the state of the particular cycle given by the bit position */
flag = (E->state_map >> i) & 0x1;
/* Count occurences of the posted state */
- if(flag == S)
- {
+ if (flag == state)
count++;
- }
}
- if(count >= action->count && S != E->state)
- {
+ /* the internal instance and action events are handled as changed any time since we need to deliver alert whenever it occurs */
+ if (E->id == EVENT_INSTANCE || E->id == EVENT_ACTION || (count >= action->count && S != E->state))
return TRUE;
- }
return FALSE;
-
}
@@ -388,11 +363,8 @@
* @return The Event type
*/
int Event_get_id(Event_T E) {
-
ASSERT(E);
-
return E->id;
-
}
@@ -403,40 +375,43 @@
* @return The Event message. May be NULL
*/
const char *Event_get_message(Event_T E) {
-
ASSERT(E);
-
return E->message;
-
}
/**
- * Get a textual description of actual event type. For instance if the
- * event type is possitive EVENT_TIMESTAMP, the textual description is
- * "Timestamp error". Likewise if the event type is negative EVENT_CHECKSUM
- * the textual description is "Checksum recovery" and so on.
+ * Get a textual description of actual event type.
* @param E An event object
* @return A string describing the event type in clear text. If the
* event type is not found NULL is returned.
*/
const char *Event_get_description(Event_T E) {
-
EventTable_T *et= Event_Table;
ASSERT(E);
- while((*et).id)
- {
- if(E->id == (*et).id)
- {
- return E->state?(*et).description_failed:(*et).description_passed;
+ while ((*et).id) {
+ if (E->id == (*et).id) {
+ switch (E->state) {
+ case STATE_SUCCEEDED:
+ return (*et).description_succeeded;
+ case STATE_FAILED:
+ return (*et).description_failed;
+ case STATE_INIT:
+ return (*et).description_failed;
+ case STATE_CHANGED:
+ return (*et).description_changed;
+ case STATE_CHANGEDNOT:
+ return (*et).description_changednot;
+ default:
+ break;
+ }
}
et++;
}
return NULL;
-
}
@@ -446,25 +421,32 @@
* @return An action id
*/
short Event_get_action(Event_T E) {
-
- short id;
Action_T A;
ASSERT(E);
- A = E->state?E->action->failed:E->action->passed;
+ A = E->state ? E->action->failed : E->action->succeeded;
+ switch (E->state) {
+ case STATE_SUCCEEDED:
+ case STATE_CHANGEDNOT:
+ A = E->action->succeeded;
+ break;
+ case STATE_FAILED:
+ case STATE_CHANGED:
+ case STATE_INIT:
+ A = E->action->failed;
+ break;
+ default:
+ break;
+ }
+
+ if (! A)
+ return ACTION_IGNORE;
/* In the case of passive mode we replace the description of start, stop
* or restart action for alert action, because these actions are passive in
* this mode */
- id= (E->mode == MODE_PASSIVE &&
- ((A->id == ACTION_START)||
- (A->id == ACTION_STOP) ||
- (A->id == ACTION_RESTART))
- )?ACTION_ALERT:A->id;
-
- return id;
-
+ return (E->mode == MODE_PASSIVE && ((A->id == ACTION_START) || (A->id == ACTION_STOP) || (A->id == ACTION_RESTART))) ? ACTION_ALERT : A->id;
}
@@ -479,19 +461,15 @@
* event type is not found NULL is returned.
*/
const char *Event_get_action_description(Event_T E) {
-
ASSERT(E);
-
return actionnames[Event_get_action(E)];
-
}
/**
- * Reprocess the partialy handled event queue
+ * Reprocess the partially handled event queue
*/
void Event_queue_process() {
-
DIR *dir = NULL;
FILE *file = NULL;
struct dirent *de = NULL;
@@ -499,37 +477,24 @@
Action_T a = NULL;
/* return in the case that the eventqueue is not enabled or empty */
- if( !Run.eventlist_dir ||
- (
- !Run.handler_init &&
- !Run.handler_queue[HANDLER_ALERT] &&
- !Run.handler_queue[HANDLER_COLLECTOR]
- )
- )
- {
+ if (! Run.eventlist_dir || (! Run.handler_init && ! Run.handler_queue[HANDLER_ALERT] && ! Run.handler_queue[HANDLER_MMONIT]))
return;
- }
- if(! (dir = opendir(Run.eventlist_dir)) )
- {
- if(errno != ENOENT) {
- LogError("%s: cannot open the directory %s -- %s\n",
- prog, Run.eventlist_dir, STRERROR);
- }
+ if (! (dir = opendir(Run.eventlist_dir)) ) {
+ if (errno != ENOENT)
+ LogError("%s: cannot open the directory %s -- %s\n", prog, Run.eventlist_dir, STRERROR);
return;
}
- if((de = readdir(dir)))
- {
+ if ((de = readdir(dir)))
DEBUG("Processing postponed events queue\n");
- }
NEW(ea);
NEW(a);
- while(de)
- {
+ while (de) {
int size;
+ int handlers_passed = 0;
int *version = NULL;
short *action = NULL;
Event_T e = NULL;
@@ -539,138 +504,123 @@
/* In the case that all handlers failed, skip the further processing in
* this cycle. Alert handler is currently defined anytime (either
* explicitly or localhost by default) */
- if( (Run.collectors
- &&
- FLAG(Run.handler_flag, HANDLER_COLLECTOR)
- &&
- FLAG(Run.handler_flag, HANDLER_ALERT)
- )
- ||
- FLAG(Run.handler_flag, HANDLER_ALERT))
- {
+ if ( (Run.mmonits && FLAG(Run.handler_flag, HANDLER_MMONIT) && FLAG(Run.handler_flag, HANDLER_ALERT)) || FLAG(Run.handler_flag, HANDLER_ALERT))
break;
- }
-
- snprintf(file_name, STRLEN,
- "%s/%s",
- Run.eventlist_dir, de->d_name);
- if(!stat(file_name, &st) && S_ISREG(st.st_mode))
- {
+ snprintf(file_name, STRLEN, "%s/%s", Run.eventlist_dir, de->d_name);
+ if (!stat(file_name, &st) && S_ISREG(st.st_mode)) {
DEBUG("%s: processing queued event %s\n", prog, file_name);
- if(! (file = fopen(file_name, "r")) )
- {
- LogError("%s: Processing failed - cannot open the event file %s -- %s\n",
- prog, file_name, STRERROR);
- goto error;
+ if (! (file = fopen(file_name, "r")) ) {
+ LogError("%s: Processing failed - cannot open the event file %s -- %s\n", prog, file_name, STRERROR);
+ goto error1;
}
/* read event structure version */
- if(!(version = File_readQueue(file, &size)) || size != sizeof(int))
- goto error;
- if(*version != EVENT_VERSION)
- {
- LogError("Aborting event %s - incompatible data format version %d\n",
- file_name, *version);
- unlink(file_name);
- goto error;
+ if (!(version = File_readQueue(file, &size))) {
+ LogError("skipping %s - unknown data format\n", file_name);
+ goto error2;
+ }
+ if (size != sizeof(int)) {
+ LogError("Aborting event %s - invalid size %d\n", file_name, size);
+ goto error3;
+ }
+ if (*version != EVENT_VERSION) {
+ LogError("Aborting event %s - incompatible data format version %d\n", file_name, *version);
+ goto error3;
}
/* read event structure */
- if(!(e = File_readQueue(file, &size)) || size != sizeof(*e))
- goto error;
+ if (!(e = File_readQueue(file, &size)))
+ goto error3;
+ if (size != sizeof(*e))
+ goto error4;
/* read source */
- if(!(e->source = File_readQueue(file, &size)))
- goto error;
+ if (!(e->source = File_readQueue(file, &size)))
+ goto error4;
/* read group */
- if(!(e->group = File_readQueue(file, &size)))
- goto error;
+ if (!(e->group = File_readQueue(file, &size)))
+ goto error5;
/* read message */
- if(!(e->message = File_readQueue(file, &size)))
- goto error;
+ if (!(e->message = File_readQueue(file, &size)))
+ goto error6;
/* read event action */
- if(!(action = File_readQueue(file, &size)) || size != sizeof(short))
- goto error;
+ if (!(action = File_readQueue(file, &size)))
+ goto error7;
+ if (size != sizeof(short))
+ goto error8;
a->id = *action;
- if(e->state == STATE_FAILED)
- {
+ if (e->state == STATE_FAILED)
ea->failed = a;
- }
else
- {
- ea->passed = a;
- }
+ ea->succeeded = a;
e->action = ea;
/* Retry all remaining handlers */
/* alert */
- if(e->flag & HANDLER_ALERT)
- {
- if(Run.handler_init)
- {
+ if (e->flag & HANDLER_ALERT) {
+ if (Run.handler_init)
Run.handler_queue[HANDLER_ALERT]++;
- }
- if((Run.handler_flag & HANDLER_ALERT) != HANDLER_ALERT)
- {
- if( handle_alert(e) != HANDLER_ALERT )
- {
+ if ((Run.handler_flag & HANDLER_ALERT) != HANDLER_ALERT) {
+ if ( handle_alert(e) != HANDLER_ALERT ) {
e->flag &= ~HANDLER_ALERT;
Run.handler_queue[HANDLER_ALERT]--;
- }
- else
- {
+ handlers_passed++;
+ } else {
LogError("Alert handler failed, retry scheduled for next cycle\n");
Run.handler_flag |= HANDLER_ALERT;
}
}
}
- /* collector */
- if(e->flag & HANDLER_COLLECTOR)
- {
- if(Run.handler_init)
- {
- Run.handler_queue[HANDLER_COLLECTOR]++;
- }
- if((Run.handler_flag & HANDLER_COLLECTOR) != HANDLER_COLLECTOR)
- {
- if( handle_collector(e) != HANDLER_COLLECTOR )
- {
- e->flag &= ~HANDLER_COLLECTOR;
- Run.handler_queue[HANDLER_COLLECTOR]--;
- }
- else
- {
- LogError("Collector handler failed, retry scheduled for next cycle\n");
- Run.handler_flag |= HANDLER_COLLECTOR;
+ /* mmonit */
+ if (e->flag & HANDLER_MMONIT) {
+ if (Run.handler_init)
+ Run.handler_queue[HANDLER_MMONIT]++;
+ if ((Run.handler_flag & HANDLER_MMONIT) != HANDLER_MMONIT) {
+ if ( handle_mmonit(e) != HANDLER_MMONIT ) {
+ e->flag &= ~HANDLER_MMONIT;
+ Run.handler_queue[HANDLER_MMONIT]--;
+ handlers_passed++;
+ } else {
+ LogError("M/Monit handler failed, retry scheduled for next cycle\n");
+ Run.handler_flag |= HANDLER_MMONIT;
}
}
}
/* If no error persists, remove it from the queue */
- if(e->flag == HANDLER_PASSED)
- {
- DEBUG("Removing event %s from the queue for later external delivery\n",
- file_name);
- unlink(file_name);
+ if (e->flag == HANDLER_SUCCEEDED) {
+ DEBUG("Removing event %s from the queue for later external delivery\n", file_name);
+ if (unlink(file_name) < 0)
+ LogError("Failed to remove queued event file '%s' -- %s\n", file_name, STRERROR);
+ } else if (handlers_passed > 0) {
+ DEBUG("Updating queued event %s (some handlers passed)\n", file_name);
+ Event_queue_update(e, file_name);
}
- error:
- FREE(version);
+error8:
FREE(action);
- FREE(e->source);
- FREE(e->group);
+error7:
FREE(e->message);
+error6:
+ FREE(e->group);
+error5:
+ FREE(e->source);
+error4:
FREE(e);
+error3:
+ FREE(version);
+error2:
fclose(file);
}
+error1:
de = readdir(dir);
}
Run.handler_init = FALSE;
@@ -689,151 +639,107 @@
* @param E An event
*/
static void handle_event(Event_T E) {
-
Service_T S;
ASSERT(E);
ASSERT(E->action);
ASSERT(E->action->failed);
- ASSERT(E->action->passed);
+ ASSERT(E->action->succeeded);
- /* We will handle only first passed event, recurrent passed events
- * or insufficient passed events during failed service state are
+ /* We will handle only first succeeded event, recurrent succeeded events
+ * or insufficient succeeded events during failed service state are
* ignored. Failed events are handled each time. */
- if(!E->state_changed && (E->state == STATE_PASSED || ((E->state_map & 0x1) ^ 0x1)))
- {
+ if (!E->state_changed && (E->state == STATE_SUCCEEDED || E->state == STATE_CHANGEDNOT || ((E->state_map & 0x1) ^ 0x1)))
return;
- }
-
- if(E->message)
- {
- /* In the case that the service state is yet initializing and error
- * occured, log it and exit. Passed events in init state are not
- * logged. */
- if(E->state != STATE_INIT || E->state_map & 0x1)
- {
- if(E->id == EVENT_INSTANCE || E->state == STATE_PASSED) {
- LogInfo("%s\n", E->message);
- } else {
- LogError("%s\n", E->message);
- }
- }
- if(E->state == STATE_INIT)
- {
- return;
- }
- }
S = Event_get_source(E);
- if(!S)
- {
+ if (!S) {
LogError("Event handling aborted\n");
return;
}
- if(E->state == STATE_FAILED)
- {
- S->error |= E->id;
- handle_action(E, E->action->failed);
+ if (E->message) {
+ /* In the case that the service state is initializing yet and error
+ * occured, log it and exit. Succeeded events in init state are not
+ * logged. Instance and action events are logged always with priority
+ * info. */
+ if (E->state != STATE_INIT || E->state_map & 0x1) {
+ if (E->state == STATE_SUCCEEDED || E->state == STATE_CHANGEDNOT || E->id == EVENT_INSTANCE || E->id == EVENT_ACTION)
+ LogInfo("'%s' %s\n", S->name, E->message);
+ else
+ LogError("'%s' %s\n", S->name, E->message);
+ }
+ if (E->state == STATE_INIT)
+ return;
}
- else
- {
+
+ if (E->state == STATE_FAILED || E->state == STATE_CHANGED) {
+ if (E->id != EVENT_INSTANCE && E->id != EVENT_ACTION) { // We are not interested in setting error flag for instance and action events
+ S->error |= E->id;
+ /* The error hint provides second dimension for error bitmap and differentiates between failed/changed event states (failed=0, chaged=1) */
+ if (E->state == STATE_CHANGED)
+ S->error_hint |= E->id;
+ else
+ S->error_hint &= ~E->id;
+ }
+ handle_action(E, E->action->failed);
+ } else {
S->error &= ~E->id;
- handle_action(E, E->action->passed);
+ handle_action(E, E->action->succeeded);
}
/* Possible event state change was handled so we will reset the flag. */
E->state_changed = FALSE;
-
}
-static int handle_action(Event_T E, Action_T A) {
-
+static void handle_action(Event_T E, Action_T A) {
Service_T s;
ASSERT(E);
ASSERT(A);
- E->flag = HANDLER_PASSED;
+ E->flag = HANDLER_SUCCEEDED;
- if(A->id == ACTION_IGNORE)
- {
- return TRUE;
- }
+ if (A->id == ACTION_IGNORE)
+ return;
- /* Alert and collector event notification are common actions */
+ /* Alert and mmonit event notification are common actions */
+ E->flag |= handle_mmonit(E);
E->flag |= handle_alert(E);
- E->flag |= handle_collector(E);
/* In the case that some subhandler failed, enqueue the event for
* partial reprocessing */
- if(E->flag != HANDLER_PASSED)
- {
- if(Run.eventlist_dir)
- {
+ if (E->flag != HANDLER_SUCCEEDED) {
+ if (Run.eventlist_dir)
Event_queue_add(E);
- }
else
- {
LogError("Aborting event\n");
- }
}
- s = Event_get_source(E);
- if(!s)
- {
+ if (!(s = Event_get_source(E))) {
LogError("Event action handling aborted\n");
- return FALSE;
+ return;
}
- switch(A->id)
- {
- case ACTION_ALERT:
- /* Already handled. */
- break;
-
- case ACTION_EXEC:
- spawn(s, A->exec, Event_get_description(E));
- break;
-
- case ACTION_RESTART:
- if(s->def_timeout)
- s->nstart++;
- if((s->mode != MODE_PASSIVE))
- {
- control_service(s->name, "restart");
- }
- return FALSE;
+ /* Action event is handled already. For Instance events
+ * we don't wan't actions like stop to be executed
+ * to prevent the disabling of system service monitoring */
+ if (A->id == ACTION_ALERT || E->id == EVENT_INSTANCE) {
+ return;
+ } else if (A->id == ACTION_EXEC) {
+ LogInfo("'%s' exec: %s\n", s->name, A->exec->arg[0]);
+ spawn(s, A->exec, Event_get_description(E));
+ return;
+ } else {
+ if (s->def_timeout && (A->id == ACTION_START || A->id == ACTION_RESTART))
+ s->nstart++;
- case ACTION_START:
- if(s->def_timeout)
- s->nstart++;
- if((s->mode != MODE_PASSIVE))
- {
- control_service(s->name, "start");
- }
- return FALSE;
-
- case ACTION_STOP:
- if((s->mode != MODE_PASSIVE))
- {
- control_service(s->name, "stop");
- }
- return FALSE;
-
- case ACTION_UNMONITOR:
- control_service(s->name, "unmonitor");
- return FALSE;
-
- default:
- LogError("'%s' error -- unknown failure action: [%d]\n", s->name,
- A->id);
- break;
+ if (s->mode == MODE_PASSIVE && (A->id == ACTION_START || A->id == ACTION_STOP || A->id == ACTION_RESTART))
+ return;
+ control_service(s->name, A->id);
}
-
- return TRUE;
}
@@ -842,97 +748,143 @@
* @param E An event object
*/
static void Event_queue_add(Event_T E) {
-
FILE *file = NULL;
char file_name[STRLEN];
int version = EVENT_VERSION;
short action = Event_get_action(E);
int rv = FALSE;
mode_t mask;
- sigset_t ns;
- sigset_t os;
ASSERT(E);
- ASSERT(E->flag != HANDLER_PASSED);
+ ASSERT(E->flag != HANDLER_SUCCEEDED);
- if(!File_checkQueueDirectory(Run.eventlist_dir, 0700))
- {
- LogError("%s: Aborting event - cannot access the directory %s\n",
- prog, Run.eventlist_dir);
+ if (!File_checkQueueDirectory(Run.eventlist_dir, 0700)) {
+ LogError("%s: Aborting event - cannot access the directory %s\n", prog, Run.eventlist_dir);
return;
}
- if(!File_checkQueueLimit(Run.eventlist_dir, Run.eventlist_slots))
- {
+ if (!File_checkQueueLimit(Run.eventlist_dir, Run.eventlist_slots)) {
LogError("%s: Aborting event - queue over quota\n", prog);
return;
}
- set_signal_block(&ns, &os);
-
/* compose the file name of actual timestamp and service name */
- snprintf(file_name, STRLEN,
- "%s/%ld_%s",
- Run.eventlist_dir, (long int)time(NULL), E->source);
+ snprintf(file_name, STRLEN, "%s/%ld_%s", Run.eventlist_dir, (long int)time(NULL), E->source);
- DEBUG("%s: Adding event to the queue file %s for later delivery\n",
- prog, file_name);
+ DEBUG("%s: Adding event to the queue file %s for later delivery\n", prog, file_name);
mask = umask(QUEUEMASK);
file = fopen(file_name, "w");
umask(mask);
- if(! file)
- {
- LogError("%s: Aborting event - cannot open the event file %s -- %s\n",
- prog, file_name, STRERROR);
+ if (! file) {
+ LogError("%s: Aborting event - cannot open the event file %s -- %s\n", prog, file_name, STRERROR);
return;
}
/* write event structure version */
- if(!(rv = File_writeQueue(file, &version, sizeof(int))))
+ if (!(rv = File_writeQueue(file, &version, sizeof(int))))
goto error;
/* write event structure */
- if(!(rv = File_writeQueue(file, E, sizeof(*E))))
+ if (!(rv = File_writeQueue(file, E, sizeof(*E))))
goto error;
/* write source */
- if(!(rv = File_writeQueue(file, E->source, E->source?strlen(E->source)+1:0)))
+ if (!(rv = File_writeQueue(file, E->source, E->source ? strlen(E->source)+1 : 0)))
goto error;
/* write group */
- if(!(rv = File_writeQueue(file, E->group, E->group?strlen(E->group)+1:0)))
+ if (!(rv = File_writeQueue(file, E->group, E->group ? strlen(E->group)+1 : 0)))
goto error;
/* write message */
- if(!(rv = File_writeQueue(file, E->message, E->message?strlen(E->message)+1:0)))
+ if (!(rv = File_writeQueue(file, E->message, E->message ? strlen(E->message)+1 : 0)))
goto error;
/* write event action */
- if(!(rv = File_writeQueue(file, &action, sizeof(short))))
+ if (!(rv = File_writeQueue(file, &action, sizeof(short))))
goto error;
error:
- if(!rv)
- {
- LogError("%s: Aborting event - unable to save event information to %s\n",
- prog, file_name);
- unlink(file_name);
+ fclose(file);
+ if (!rv) {
+ LogError("%s: Aborting event - unable to save event information to %s\n", prog, file_name);
+ if (unlink(file_name) < 0)
+ LogError("Failed to remove event file '%s' -- %s\n", file_name, STRERROR);
+ } else {
+ if (!Run.handler_init && E->flag & HANDLER_ALERT)
+ Run.handler_queue[HANDLER_ALERT]++;
+ if (!Run.handler_init && E->flag & HANDLER_MMONIT)
+ Run.handler_queue[HANDLER_MMONIT]++;
}
- else
+
+ return;
+}
+
+
+/**
+ * Update the partialy handled event in the global queue
+ * @param E An event object
+ * @param file_name File name
+ */
+static void Event_queue_update(Event_T E, const char *file_name) {
+ FILE *file = NULL;
+ int version = EVENT_VERSION;
+ short action = Event_get_action(E);
+ int rv = FALSE;
+ mode_t mask;
+
+ ASSERT(E);
+ ASSERT(E->flag != HANDLER_SUCCEEDED);
+
+ if (!File_checkQueueDirectory(Run.eventlist_dir, 0700)) {
+ LogError("%s: Aborting event - cannot access the directory %s\n", prog, Run.eventlist_dir);
+ return;
+ }
+
+ DEBUG("%s: Updating event in the queue file %s for later delivery\n", prog, file_name);
+
+ mask = umask(QUEUEMASK);
+ file = fopen(file_name, "w");
+ umask(mask);
+ if (! file)
{
- if(!Run.handler_init && E->flag & HANDLER_ALERT)
- {
- Run.handler_queue[HANDLER_ALERT]++;
- }
- if(!Run.handler_init && E->flag & HANDLER_COLLECTOR)
- {
- Run.handler_queue[HANDLER_COLLECTOR]++;
- }
- fclose(file);
+ LogError("%s: Aborting event - cannot open the event file %s -- %s\n", prog, file_name, STRERROR);
+ return;
+ }
+
+ /* write event structure version */
+ if (!(rv = File_writeQueue(file, &version, sizeof(int))))
+ goto error;
+
+ /* write event structure */
+ if (!(rv = File_writeQueue(file, E, sizeof(*E))))
+ goto error;
+
+ /* write source */
+ if (!(rv = File_writeQueue(file, E->source, E->source ? strlen(E->source)+1 : 0)))
+ goto error;
+
+ /* write group */
+ if (!(rv = File_writeQueue(file, E->group, E->group ? strlen(E->group)+1 : 0)))
+ goto error;
+
+ /* write message */
+ if (!(rv = File_writeQueue(file, E->message, E->message ? strlen(E->message)+1 : 0)))
+ goto error;
+
+ /* write event action */
+ if (!(rv = File_writeQueue(file, &action, sizeof(short))))
+ goto error;
+
+ error:
+ fclose(file);
+ if (!rv) {
+ LogError("%s: Aborting event - unable to update event information to %s\n", prog, file_name);
+ if (unlink(file_name) < 0)
+ LogError("Failed to remove event file '%s' -- %s\n", file_name, STRERROR);
}
- unset_signal_block(&os);
return;
}
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/event.h /tmp/QeMlhPoI46/monit-5.0.3/event.h
--- monit-4.8.1/event.h 2006-01-01 22:44:01.000000000 +0000
+++ monit-5.0.3/event.h 2009-04-19 21:13:57.000000000 +0100
@@ -1,20 +1,30 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
#ifndef MONIT_EVENT_H
@@ -36,17 +46,24 @@
#define EVENT_INVALID 0x400
#define EVENT_DATA 0x800
#define EVENT_EXEC 0x1000
-#define EVENT_CHANGED 0x2000
+#define EVENT_FSFLAG 0x2000
#define EVENT_ICMP 0x4000
-#define EVENT_MATCH 0x8000
+#define EVENT_CONTENT 0x8000
#define EVENT_INSTANCE 0x10000
+#define EVENT_ACTION 0x20000
+#define EVENT_PID 0x40000
+#define EVENT_PPID 0x80000
+#define EVENT_HEARTBEAT 0x100000
+#define EVENT_ALL 0xFFFFFFFF
#define IS_EVENT_SET(value, mask) ((value & mask) != 0)
typedef struct myeventtable {
int id;
char *description_failed;
- char *description_passed;
+ char *description_succeeded;
+ char *description_changed;
+ char *description_changednot;
} EventTable_T;
extern EventTable_T Event_Table[];
@@ -64,7 +81,7 @@
*
* @author Jan-Henrik Haukeland,
* @author Martin Pala,
- * @version \$Id: event.h,v 1.25 2006/01/01 22:44:01 martinp Exp $
+ * @version \$Id: event.h,v 1.37 2009/04/19 20:13:57 martinp Exp $
* @file
*/
@@ -76,8 +93,7 @@
* @param action Description of the event action
* @param s Optional message describing the event
*/
-void Event_post(Service_T service, long id, short state, EventAction_T action,
- char *s, ...);
+void Event_post(Service_T service, long id, short state, EventAction_T action, char *s, ...);
/**
@@ -117,7 +133,7 @@
* @param E An event object
* @return The Event timestamp
*/
-time_t Event_get_collected(Event_T E);
+struct timeval *Event_get_collected(Event_T E);
/**
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/external/strftime.c /tmp/QeMlhPoI46/monit-5.0.3/external/strftime.c
--- monit-4.8.1/external/strftime.c 2006-01-01 22:01:06.000000000 +0000
+++ monit-5.0.3/external/strftime.c 2008-03-31 22:13:31.000000000 +0100
@@ -5,7 +5,7 @@
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option) any
+ Free Software Foundation; either version 3, or (at your option) any
later version.
This program is distributed in the hope that it will be useful,
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/FAQ.txt /tmp/QeMlhPoI46/monit-5.0.3/FAQ.txt
--- monit-4.8.1/FAQ.txt 2006-01-01 22:01:02.000000000 +0000
+++ monit-5.0.3/FAQ.txt 2008-11-19 18:30:20.000000000 +0000
@@ -1,7 +1,7 @@
Short FAQ:
----------
- @version \$Id: FAQ.txt,v 1.21 2005/02/02 18:10:28 martinp Exp $
+ @version \$Id: FAQ.txt,v 1.31 2008/11/18 22:00:11 martinp Exp $
1. Q: Monit watches processes by a pid file, so if a program crashes
@@ -162,27 +162,37 @@
mv /etc/rc2.d/S99myprocess /etc/rc2.d/s99myprocess
- If monit is started from a rc script, then to stop the service
- at systems shutdown, you should add the following line to
- monit's rc script:
+ If monit is started from a rc script, then to start and stop
+ the service at systems shutdown, you should add the following
+ lines to monit's rc script:
+ on start:
+ /usr/local/bin/monit -c /etc/monitrc start myprocess
+
+ on stop:
/usr/local/bin/monit -c /etc/monitrc stop myprocess
- or if monit handles more than one service, simply stop all
+ or if monit handles more than one service, simply start/stop all
services by using:
+ on start:
+ /usr/local/bin/monit -c /etc/monitrc start all
+
+ on stop:
/usr/local/bin/monit -c /etc/monitrc stop all
If monit instead is started from init then, add a second line
to inittab to stop the service:
mo:2345:respawn:/usr/local/bin/monit -Ic /etc/monitrc
- m0:06:wait:/usr/local/bin/monit -Ic /etc/monitrc stop myprocess
+ mon:2345:wait:/usr/local/bin/monit -Ic /etc/monitrc start myprocess
+ moff:06:wait:/usr/local/bin/monit -Ic /etc/monitrc stop myprocess
or to stop all services handled by monit:
mo:2345:respawn:/usr/local/bin/monit -Ic /etc/monitrc
- m0:06:wait:/usr/local/bin/monit -Ic /etc/monitrc stop all
+ mon:2345:wait:/usr/local/bin/monit -Ic /etc/monitrc start all
+ moff:06:wait:/usr/local/bin/monit -Ic /etc/monitrc stop all
Services handled by monit I have start and stop methods
defined so monit can start and stop a service. For instance:
@@ -235,28 +245,13 @@
8. Q: Why is monit not able to gather process data from a 64bit
- applications on Solaris?
+ applications?
A: Most probably monit was compiled as a 32bit application and
32bit applications cannot read /proc data for a 64bit
- applications. Furthermore, access to procfs is not supported in
- large file environments. Thus, you must compile monit with 64bit
- support. You will need a gcc version at least greater or equal
- to 3.0. We have successfully tested monit with gcc version 3.1.
- Do the following,
+ applications. Thus, you must compile monit with 64bit
+ support. Seel PLATFORMS file for platform specifics.
- * "configure" monit with 64-bit support:
- ./configure LDFLAGS='-m64 -mcpu=v9' CFLAGS='-m64 -mcpu=v9'
- * "make" as usual:
- make
-
- Note, in order to successfully link a 64bit application you will
- also need all libraries (e.g. libflex, libssl and libcrypto) as
- 64bit versions. Thus, it might be necessary to set the library
- path pointing to your 64 libraries by adding their location to
- make, e.g. "LDFLAGS='-L/usr/local/lib/sparcv9'". This might
- apply to other unices, too.
-
9. Q: How to set Monit to run from daemontools?
@@ -332,7 +327,7 @@
e) Compile without SSL support. Start the configuration process
with the "--without-ssl" option.
- Points a)-d) do not reduce the functionality of monit. By
+ Points a)-d) does not reduce the functionality of monit. By
applying point e) you loose of course any SSL functionality.
On Linux it is possible to get some additional reduction by using
@@ -342,9 +337,9 @@
binaries are required these libraries reduce the binary size
dramatically.
- It is possible to reduce the monit binary to a size of <220kB
- dynamically liked with SSL, <850kB statically linked with
- SSL and <270kB statically linked without SSL using the plan above.
+ It is possible to reduce the monit binary to a size of <320kB
+ dynamically linked with SSL, <850kB statically linked with
+ SSL and <300kB statically linked without SSL using the plan above.
[A] http://www.fefe.de/dietlibc/
[B] http://www.uclibc.org/
@@ -360,13 +355,108 @@
system statistic error -- cannot find process id 1
--8<--
- A: You are most probably running monit on system with security restrictions
- which hides process with PID 1. For example LIDS and Linux-VServer
- are optionaly able to do so. Monit can run and work in this environment,
- but some system or process resource statistics may be not available
- (will show zero as value). You can also unhide PID 1 for monit's context
- and use for example unkillable protection for PID 1 instead to provide
- access to monit to these statistics.
+ A: You are most probably running monit on system with security
+ restrictions which hides process with PID 1. For example LIDS
+ and Linux-VServer are optionaly able to do so. Monit can run and
+ work in this environment, but some system or process resource
+ statistics may be not available (will show zero as value). You can
+ also unhide PID 1 for monit's context and use for example unkillable
+ protection for PID 1 instead to provide access to monit to these
+ statistics.
+
+
+13. Q: Is here any support for external testing scripts available?
+
+ A: We plan to add the support for external scripts in the future (see our
+ TODO list - http://www.tildeslash.com/monit/doc/next.php#33). Until
+ native support will be available, here are some workarounds:
+
+ 1.) nice workaround contributed by Pavel Urban is based on timestamp
+ monitoring of file, which is updated by external script, running from
+ cron. When everything is OK, the script will update (touch) the file.
+ When the state is false, the script won't update the timestamp and
+ monit will perform the related action.
+
+ For example script for monitoring the count of files inside /tmp
+ directory:
+ --8<--
+ #!/bin/bash
+ if [ `ls -1 /tmp |wc -l` -lt 100 ]
+ then
+ touch /var/tmp/monit_flag_tmp
+ fi
+ --8<--
+
+ run this script via cron (for example, every 20 minutes):
+ --8<--
+ 20 * * * * /root/test_tmp_files > /dev/null 2>&1
+ --8<--
+
+ and do timestamp check on /var/tmp/monit_flag_tmp (or any file you decide)
+ in monit control file:
+ --8<--
+ check file monit_flag_tmp with path /var/tmp/monit_flag_tmp
+ if timestamp > 25 minutes then alert
+ --8<--
+
+ Done :)
+
+ Another Example script: for monitoring the Solaris Volume Manager
+ metadevices:
+ --8<--
+ #!/usr/bin/bash
+ /usr/sbin/metastat | /usr/xpg4/bin/grep -q maintenance
+ if [ $? -ne 0 ]; then
+ touch /var/tmp/monit_flag_svm
+ fi
+ --8<--
+
+ 2.) alternatively you can use the monit's file content testing to watch
+ logfiles or status files created similar way as described above.
+
+ Example script:
+ --8<--
+ #!/usr/bin/bash
+ /usr/sbin/metastat > /var/tmp/monit_svm
+ --8<--
+
+ and example monit syntax:
+ --8<--
+ check file svm with path /var/tmp/monit_svm
+ if match "maintenance" then alert
+ --8<--
+
+
+14. Q: How to set Monit to run from upstart?
+
+ A: Use following script (thanks to Michael Hale):
+ --8<--
+ # This is an event.d (upstart) script to keep monit running
+ # To install disable the old way of doing things:
+ #
+ # /etc/init.d/monit stop && update-rc.d -f monit remove
+ #
+ # then put this script here: /etc/event.d/monit
+ #
+ # You can manually start and stop monit like this:
+ #
+ # start monit
+ # stop monit
+ #
+ # Michael Hale (http://halethegeek.com)
+
+ start on runlevel 2
+ start on runlevel 3
+ start on runlevel 4
+ start on runlevel 5
+
+ stop on runlevel 0
+ stop on runlevel 6
+
+ exec /usr/sbin/monit -Ic /etc/monit/monitrc
+ respawn
+ --8<--
+
-------------------------------------------------------------------------------
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/file.c /tmp/QeMlhPoI46/monit-5.0.3/file.c
--- monit-4.8.1/file.c 2006-04-27 21:16:03.000000000 +0100
+++ monit-5.0.3/file.c 2009-05-02 21:16:06.000000000 +0100
@@ -1,20 +1,30 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
#include
@@ -62,13 +72,13 @@
#include "monitor.h"
/**
- * Utilities used for managing files used by monit.
+ * Utilities for managing files used by monit.
*
* @author Jan-Henrik Haukeland,
* @author Christian Hopp,
* @author Martin Pala,
*
- * @version \$Id: file.c,v 1.10 2006/04/27 20:16:03 martinp Exp $
+ * @version \$Id: file.c,v 1.26 2009/05/02 20:16:06 martinp Exp $
*
* @file
*/
@@ -83,7 +93,7 @@
void File_init() {
char pidfile[STRLEN];
- char statefile[STRLEN];
+ char buf[STRLEN];
/* Check if the pidfile was already set during configfile parsing */
if(Run.pidfile == NULL) {
@@ -95,21 +105,38 @@
}
Run.pidfile= xstrdup(pidfile);
}
- /* Set the location of the programs state file */
+
+ /* Set the location of monit's id file */
+ if(Run.idfile == NULL) {
+ snprintf(buf, STRLEN, "%s/.%s", Run.Env.home, MYIDFILE);
+ Run.idfile= xstrdup(buf);
+ }
+ Util_monitId(Run.idfile);
+
+ /* Set the location of monit's state file */
if(Run.statefile == NULL) {
- snprintf(statefile, STRLEN, "%s/.%s", Run.Env.home, MYSTATEFILE);
- Run.statefile= xstrdup(statefile);
+ snprintf(buf, STRLEN, "%s/.%s", Run.Env.home, MYSTATEFILE);
+ Run.statefile= xstrdup(buf);
}
}
/**
- * Finalize and remove temporary files
+ * Finalize and remove temporary files and make sure Monit id file exist
*/
void File_finalize() {
unlink(Run.pidfile);
- unlink(Run.statefile);
+ // Make sure that Monit id file exist
+ if (! File_exist(Run.idfile)) {
+ FILE *f = fopen(Run.idfile,"w");
+ if (! f) {
+ LogError("%s: Error opening Monit id file '%s' for writing -- %s\n", prog, Run.idfile, STRERROR);
+ } else {
+ fprintf(f, "%s\n", Run.id);
+ fclose(f);
+ }
+ }
}
@@ -145,9 +172,9 @@
/**
* Search the system for the monit control file. Try first ~/.monitrc,
- * if that fails try /etc/monitrc, then /usr/local/etc/monitrc and
- * finally ./monitrc. Exit the application if the control file was
- * not found.
+ * if that fails try /etc/monitrc, then SYSCONFDIR/monitrc (default:
+ * /usr/local/etc/monitrc) and finally ./monitrc.
+ * Exit the application if the control file was not found.
* @return The location of monits control file (monitrc)
*/
char *File_findControlFile() {
@@ -164,6 +191,11 @@
return (rcfile);
}
memset(rcfile, 0, STRLEN);
+ snprintf(rcfile, STRLEN, "%s/%s", SYSCONFDIR, MONITRC);
+ if(File_exist(rcfile)) {
+ return (rcfile);
+ }
+ memset(rcfile, 0, STRLEN);
snprintf(rcfile, STRLEN, "/usr/local/etc/%s", MONITRC);
if(File_exist(rcfile)) {
return (rcfile);
@@ -174,8 +206,8 @@
return (rcfile);
}
LogError("%s: Cannot find the control file at "
- "~/.%s, /etc/%s, /usr/local/etc/%s or at ./%s \n",
- prog, MONITRC, MONITRC, MONITRC, MONITRC);
+ "~/.%s, /etc/%s, %s/%s, /usr/local/etc/%s or at ./%s \n",
+ prog, MONITRC, MONITRC, SYSCONFDIR, MONITRC, MONITRC, MONITRC);
exit(1);
}
@@ -196,8 +228,7 @@
umask(MYPIDMASK);
unlink(pidfile);
if ((F= fopen(pidfile,"w")) == (FILE *)NULL) {
- LogError("%s: Error opening pidfile '%s' for writing -- %s\n",
- prog, pidfile, STRERROR);
+ LogError("%s: Error opening pidfile '%s' for writing -- %s\n", prog, pidfile, STRERROR);
return(FALSE);
}
fprintf(F, "%d\n", (int)getpid());
@@ -281,7 +312,7 @@
* @param filename The filename of the checked file
* @param description The description of the checked file
* @param permmask The permission mask for the file
- * @return TRUE if the test passed otherwise FALSE
+ * @return TRUE if the test succeeded otherwise FALSE
*/
int File_checkStat(char *filename, char *description, int permmask) {
@@ -358,7 +389,7 @@
* specified mode.
* @param path The fully qualified path to the directory
* @param mode The permission for the directory
- * @return TRUE if the passed otherwise FALSE
+ * @return TRUE if the succeeded otherwise FALSE
*/
int File_checkQueueDirectory(char *path, mode_t mode) {
@@ -392,7 +423,7 @@
* Check the queue size limit.
* @param path The fully qualified path to the directory
* @param limit The queue limit
- * @return TRUE if the passed otherwise FALSE
+ * @return TRUE if the succeeded otherwise FALSE
*/
int File_checkQueueLimit(char *path, int limit) {
@@ -400,10 +431,8 @@
DIR *dir = NULL;
struct dirent *de = NULL;
- if(limit <= 0) {
- LogError("%s: event queue full\n", prog);
- return FALSE;
- }
+ if(limit < 0)
+ return TRUE;
if(! (dir = opendir(path)) ) {
LogError("%s: cannot open the directory %s -- %s\n", prog, path, STRERROR);
@@ -428,7 +457,7 @@
* @param file Filedescriptor to write to
* @param data Data to be written
* @param size Size of the data to be written
- * @return TRUE if the passed otherwise FALSE
+ * @return TRUE if the succeeded otherwise FALSE
*/
int File_writeQueue(FILE *file, void *data, int size) {
@@ -468,10 +497,11 @@
if(fread(size, 1, sizeof(int), file) != sizeof(int) || ferror(file))
goto error;
- /* read data if any */
- if(*size > 0) {
+ /* read data if any (allow 1MB at maximum to prevent enormous memory allocation) */
+ if(*size > 0 && *size < 1048576) {
data = xcalloc(1, *size);
if(fread(data, 1, *size, file) != *size || ferror(file)) {
+ FREE(data);
goto error;
}
}
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/file.h /tmp/QeMlhPoI46/monit-5.0.3/file.h
--- monit-4.8.1/file.h 2006-01-01 22:44:01.000000000 +0000
+++ monit-5.0.3/file.h 2009-02-13 13:06:32.000000000 +0000
@@ -1,20 +1,30 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
@@ -29,7 +39,7 @@
* @author Christian Hopp,
* @author Martin Pala,
*
- * @version \$Id: file.h,v 1.7 2006/01/01 22:44:01 martinp Exp $
+ * @version \$Id: file.h,v 1.14 2009/02/13 09:18:06 hauk Exp $
*
* @file
*/
@@ -117,7 +127,7 @@
* @param filename The filename of the checked file
* @param description The description of the checked file
* @param permmask The permission mask for the file
- * @return TRUE if the test passed otherwise FALSE
+ * @return TRUE if the test succeeded otherwise FALSE
*/
int File_checkStat(char *filename, char *description, int permmask);
@@ -127,7 +137,7 @@
* specified mode.
* @param path The fully qualified path to the directory
* @param mode The permission for the directory
- * @return TRUE if the passed otherwise FALSE
+ * @return TRUE if the succeeded otherwise FALSE
*/
int File_checkQueueDirectory(char *path, mode_t mode);
@@ -136,7 +146,7 @@
* Check the queue size limit.
* @param path The fully qualified path to the directory
* @param mode The queue limit
- * @return TRUE if the passed otherwise FALSE
+ * @return TRUE if the succeeded otherwise FALSE
*/
int File_checkQueueLimit(char *path, int limit);
@@ -146,7 +156,7 @@
* @param file Filedescriptor to write to
* @param data Data to be written
* @param size Size of the data to be written
- * @return TRUE if the passed otherwise FALSE
+ * @return TRUE if the succeeded otherwise FALSE
*/
int File_writeQueue(FILE *file, void *data, int size);
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/gc.c /tmp/QeMlhPoI46/monit-5.0.3/gc.c
--- monit-4.8.1/gc.c 2006-01-01 22:44:01.000000000 +0000
+++ monit-5.0.3/gc.c 2009-05-28 22:35:29.000000000 +0100
@@ -1,20 +1,30 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
#include
@@ -39,14 +49,12 @@
static void _gc_service(Service_T *);
static void _gc_mail_server(MailServer_T *);
static void _gcppl(Port_T *);
-static void _gcdevice(Device_T *);
+static void _gcfilesystem(Filesystem_T *);
static void _gcicmp(Icmp_T *);
static void _gcpql(Resource_T *);
static void _gcptl(Timestamp_T *);
-static void _gccmd(Command_T *);
static void _gc_action(Action_T *);
static void _gc_eventaction(EventAction_T *);
-static void _gc_event(Event_T *);
static void _gc_inf(Info_T *);
static void _gcpdl(Dependant_T *);
static void _gcso(Size_T *);
@@ -57,7 +65,7 @@
static void _gcgid(Gid_T *);
static void _gcgrc(Generic_T *);
static void _gcath(Auth_T *);
-static void _gc_collector(Collector_T *);
+static void _gc_mmonit(Mmonit_T *);
static void _gc_url(URL_T *);
static void _gc_request(Request_T *);
@@ -68,7 +76,7 @@
* @author Jan-Henrik Haukeland,
* @author Martin Pala,
*
- * @version \$Id: gc.c,v 1.66 2006/01/01 22:44:01 martinp Exp $
+ * @version \$Id: gc.c,v 1.93 2009/05/28 21:35:29 martinp Exp $
*
* @file
*/
@@ -100,11 +108,11 @@
if(Run.mailservers)
_gc_mail_server(&Run.mailservers);
- if(Run.collectors)
- _gc_collector(&Run.collectors);
+ if(Run.mmonits)
+ _gc_mmonit(&Run.mmonits);
if(Run.eventlist)
- _gc_event(&Run.eventlist);
+ gc_event(&Run.eventlist);
FREE(Run.eventlist_dir);
FREE(Run.mygroup);
@@ -115,6 +123,7 @@
FREE(Run.MailFormat.from);
FREE(Run.MailFormat.subject);
FREE(Run.MailFormat.message);
+ FREE(Run.mail_hostname);
}
@@ -135,6 +144,35 @@
}
+void gccmd(Command_T *c) {
+
+ int i;
+
+ ASSERT(c&&*c);
+
+ for(i= 0; (*c)->arg[i]; i++)
+ FREE((*c)->arg[i]);
+ FREE(*c);
+
+}
+
+
+void gc_event(Event_T *e) {
+
+ ASSERT(e&&*e);
+
+ if((*e)->next)
+ gc_event(&(*e)->next);
+
+ (*e)->action= NULL;
+ FREE((*e)->source);
+ FREE((*e)->group);
+ FREE((*e)->message);
+ FREE(*e);
+
+}
+
+
/* ----------------------------------------------------------------- Private */
@@ -157,8 +195,8 @@
if((*s)->portlist)
_gcppl(&(*s)->portlist);
- if((*s)->devicelist)
- _gcdevice(&(*s)->devicelist);
+ if((*s)->filesystemlist)
+ _gcfilesystem(&(*s)->filesystemlist);
if((*s)->icmplist)
_gcicmp(&(*s)->icmplist);
@@ -178,7 +216,7 @@
if((*s)->sizelist)
_gcso(&(*s)->sizelist);
- if((*s)->matchlist)
+ if((*s)->matchlist)
_gcmatch(&(*s)->matchlist);
if((*s)->checksum)
@@ -197,10 +235,10 @@
_gcpdl(&(*s)->dependantlist);
if((*s)->start)
- _gccmd(&(*s)->start);
+ gccmd(&(*s)->start);
if((*s)->stop)
- _gccmd(&(*s)->stop);
+ gccmd(&(*s)->stop);
if((*s)->action_DATA)
_gc_eventaction(&(*s)->action_DATA);
@@ -223,6 +261,9 @@
if((*s)->action_PPID)
_gc_eventaction(&(*s)->action_PPID);
+ if((*s)->action_FSFLAG)
+ _gc_eventaction(&(*s)->action_FSFLAG);
+
if((*s)->action_MONIT_START)
_gc_eventaction(&(*s)->action_MONIT_START);
@@ -232,16 +273,20 @@
if((*s)->action_MONIT_RELOAD)
_gc_eventaction(&(*s)->action_MONIT_RELOAD);
+ if((*s)->action_ACTION)
+ _gc_eventaction(&(*s)->action_ACTION);
+
if((*s)->eventlist)
- _gc_event(&(*s)->eventlist);
+ gc_event(&(*s)->eventlist);
+ FREE((*s)->token);
FREE((*s)->name);
FREE((*s)->group);
FREE((*s)->path);
(*s)->next= NULL;
- pthread_mutex_destroy(&(*s)->mutex);
+ assert(pthread_mutex_destroy(&(*s)->mutex) == 0);
FREE(*s);
@@ -281,36 +326,27 @@
static void _gc_mail_server(MailServer_T *s) {
- if(!s&&!*s) return;
+ if (! s || ! *s)
+ return;
- if((*s)->next)
+ if ((*s)->next)
_gc_mail_server(&(*s)->next);
FREE((*s)->host);
+ FREE((*s)->username);
+ FREE((*s)->password);
+ FREE((*s)->ssl.certmd5);
FREE(*s);
}
-static void _gccmd(Command_T *c) {
-
- int i;
-
- ASSERT(c&&*c);
-
- for(i= 0; (*c)->arg[i]; i++)
- FREE((*c)->arg[i]);
- FREE(*c);
-
-}
-
-
static void _gc_action(Action_T *a) {
ASSERT(a&&*a);
if((*a)->exec)
- _gccmd(&(*a)->exec);
+ gccmd(&(*a)->exec);
FREE(*a);
}
@@ -321,25 +357,7 @@
ASSERT(e&&*e);
_gc_action(&(*e)->failed);
- _gc_action(&(*e)->passed);
- FREE(*e);
-
-}
-
-
-static void _gc_event(Event_T *e) {
-
- ASSERT(e&&*e);
-
- if((*e)->next)
- _gc_event(&(*e)->next);
-
- pthread_mutex_destroy(&(*e)->mutex);
-
- (*e)->action= NULL;
- FREE((*e)->source);
- FREE((*e)->group);
- FREE((*e)->message);
+ _gc_action(&(*e)->succeeded);
FREE(*e);
}
@@ -369,12 +387,12 @@
}
-static void _gcdevice(Device_T *d) {
+static void _gcfilesystem(Filesystem_T *d) {
ASSERT(d&&*d);
if((*d)->next)
- _gcdevice(&(*d)->next);
+ _gcfilesystem(&(*d)->next);
if((*d)->action)
_gc_eventaction(&(*d)->action);
@@ -418,9 +436,7 @@
ASSERT(i);
- if((*i)->cs_sum)
- FREE((*i)->cs_sum);
-
+ FREE((*i)->cs_sum);
FREE(*i);
}
@@ -465,13 +481,14 @@
if((*s)->action)
_gc_eventaction(&(*s)->action);
- if((*s)->match_path)
- FREE((*s)->match_path);
- if((*s)->match_string)
- FREE((*s)->match_string);
+ FREE((*s)->match_path);
+ FREE((*s)->match_string);
+
#ifdef HAVE_REGEX_H
- if((*s)->regex_comp)
+ if((*s)->regex_comp) {
+ regfree((*s)->regex_comp);
FREE((*s)->regex_comp);
+ }
#endif
FREE(*s);
@@ -568,17 +585,18 @@
FREE((*c)->uname);
FREE((*c)->passwd);
+ FREE((*c)->groupname);
FREE(*c);
}
-static void _gc_collector(Collector_T *recv) {
+static void _gc_mmonit(Mmonit_T *recv) {
ASSERT(recv);
if((*recv)->next)
- _gc_collector(&(*recv)->next);
+ _gc_mmonit(&(*recv)->next);
_gc_url(&(*recv)->url);
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/getloadavg.c /tmp/QeMlhPoI46/monit-5.0.3/getloadavg.c
--- monit-4.8.1/getloadavg.c 2006-01-01 22:01:03.000000000 +0000
+++ monit-5.0.3/getloadavg.c 2008-03-31 22:13:31.000000000 +0100
@@ -4,7 +4,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
+ the Free Software Foundation; either version 3, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/http/base64.c /tmp/QeMlhPoI46/monit-5.0.3/http/base64.c
--- monit-4.8.1/http/base64.c 2006-01-01 22:44:02.000000000 +0000
+++ monit-5.0.3/http/base64.c 2009-02-13 13:06:35.000000000 +0000
@@ -1,20 +1,30 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
#include
@@ -45,7 +55,7 @@
*
* @author Jan-Henrik Haukeland,
*
- * @version \$Id: base64.c,v 1.17 2006/01/01 22:44:02 martinp Exp $
+ * @version \$Id: base64.c,v 1.23 2009/02/13 09:18:14 hauk Exp $
*
* @file
*/
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/http/base64.h /tmp/QeMlhPoI46/monit-5.0.3/http/base64.h
--- monit-4.8.1/http/base64.h 2006-01-01 22:01:06.000000000 +0000
+++ monit-5.0.3/http/base64.h 2009-02-13 13:06:35.000000000 +0000
@@ -1,20 +1,30 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/http/cervlet.c /tmp/QeMlhPoI46/monit-5.0.3/http/cervlet.c
--- monit-4.8.1/http/cervlet.c 2006-01-08 21:36:42.000000000 +0000
+++ monit-5.0.3/http/cervlet.c 2009-05-28 20:11:58.000000000 +0100
@@ -1,20 +1,30 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
#include
@@ -73,15 +83,15 @@
/* URL Commands supported */
#define HOME "/"
-#define STOP "/_stop"
-#define VALIDATE "/_validate"
#define TEST "/_monit"
#define ABOUT "/_about"
#define PING "/_ping"
+#define GETID "/_getid"
#define PIXEL "/_pixel"
#define STATUS "/_status"
#define RUN "/_runtime"
#define VIEWLOG "/_viewlog"
+#define DOACTION "/_doaction"
/* Private prototypes */
static int is_readonly(HttpRequest);
@@ -90,7 +100,7 @@
static void doPost(HttpRequest, HttpResponse);
static void do_home(HttpRequest, HttpResponse);
static void do_home_system(HttpRequest, HttpResponse);
-static void do_home_device(HttpRequest, HttpResponse);
+static void do_home_filesystem(HttpRequest, HttpResponse);
static void do_home_directory(HttpRequest, HttpResponse);
static void do_home_file(HttpRequest, HttpResponse);
static void do_home_fifo(HttpRequest, HttpResponse);
@@ -98,10 +108,12 @@
static void do_home_host(HttpRequest, HttpResponse);
static void do_about(HttpRequest, HttpResponse);
static void do_ping(HttpRequest, HttpResponse);
-static void not_found(HttpRequest, HttpResponse);
+static void do_getid(HttpRequest, HttpResponse);
static void do_runtime(HttpRequest, HttpResponse);
static void do_viewlog(HttpRequest, HttpResponse);
static void handle_action(HttpRequest, HttpResponse);
+static void handle_do_action(HttpRequest, HttpResponse);
+static void handle_run(HttpRequest, HttpResponse);
static void is_monit_running(HttpRequest, HttpResponse);
static void do_service(HttpRequest, HttpResponse, Service_T);
static void print_alerts(HttpResponse, Mail_T);
@@ -112,7 +124,7 @@
static void print_service_rules_uid(HttpResponse, Service_T);
static void print_service_rules_gid(HttpResponse, Service_T);
static void print_service_rules_timestamp(HttpResponse, Service_T);
-static void print_service_rules_device(HttpResponse, Service_T);
+static void print_service_rules_filesystem(HttpResponse, Service_T);
static void print_service_rules_size(HttpResponse, Service_T);
static void print_service_rules_match(HttpResponse, Service_T);
static void print_service_rules_checksum(HttpResponse, Service_T);
@@ -124,7 +136,7 @@
static void print_service_params_uid(HttpResponse, Service_T);
static void print_service_params_gid(HttpResponse, Service_T);
static void print_service_params_timestamp(HttpResponse, Service_T);
-static void print_service_params_device(HttpResponse, Service_T);
+static void print_service_params_filesystem(HttpResponse, Service_T);
static void print_service_params_size(HttpResponse, Service_T);
static void print_service_params_match(HttpResponse, Service_T);
static void print_service_params_checksum(HttpResponse, Service_T);
@@ -146,7 +158,7 @@
* @author Martin Pala
* @author Christian Hopp
*
- * @version \$Id: cervlet.c,v 1.202 2006/01/08 21:36:42 martinp Exp $
+ * @version \$Id: cervlet.c,v 1.260 2009/05/28 07:13:12 hauk Exp $
*
* @file
*/
@@ -161,7 +173,7 @@
*/
void init_service() {
- add_Impl((void *) doGet, (void *) doPost);
+ add_Impl(doGet, doPost);
}
@@ -175,7 +187,15 @@
*/
static void doPost(HttpRequest req, HttpResponse res) {
- doGet(req, res);
+ set_content_type(res, "text/html");
+
+ if(ACTION(RUN)) {
+ handle_run(req, res);
+ } else if(ACTION(DOACTION)) {
+ handle_do_action(req, res);
+ } else {
+ handle_action(req, res);
+ }
}
@@ -193,9 +213,7 @@
do_home(req, res);
END_LOCK;
} else if(ACTION(RUN)) {
- LOCK(Run.mutex)
- do_runtime(req, res);
- END_LOCK;
+ handle_run(req, res);
} else if(ACTION(TEST)) {
is_monit_running(req, res);
} else if(ACTION(VIEWLOG)) {
@@ -204,27 +222,14 @@
do_about(req, res);
} else if(ACTION(PING)) {
do_ping(req, res);
- } else if(ACTION(STOP)) {
- if(is_readonly(req)) {
- send_error(res, SC_FORBIDDEN,
- "You do not have sufficent privilegs to access this page");
- } else {
- send_error(res, SC_SERVICE_UNAVAILABLE,
- "The monit http server is stopped");
- stop_httpd();
- }
- } else if(ACTION(VALIDATE)) {
- if(is_readonly(req)) {
- send_error(res, SC_FORBIDDEN,
- "You do not have sufficent privilegs to access this page");
- } else {
- do_wakeupcall();
- send_redirect(res, HOME);
- }
+ } else if(ACTION(GETID)) {
+ do_getid(req, res);
} else if(ACTION(PIXEL)) {
printPixel(res);
} else if(ACTION(STATUS)) {
print_status(req, res);
+ } else if(ACTION(DOACTION)) {
+ handle_do_action(req, res);
} else {
handle_action(req, res);
}
@@ -261,14 +266,14 @@
"
This program is free software; you can redistribute it and/or "
- "modify it under the terms of the GNU General Public License "
- "as published by the Free Software Foundation; either version 2 of "
- "the License, or (at your option) any later version.
"
- "This program is distributed in the hope that it will be useful, but "
+ "modify it under the terms of the GNU General Public License version 3
"
+ "
This program is distributed in the hope that it will be useful, but "
"WITHOUT ANY WARRANTY; without even the implied warranty of "
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "
"GNU "
- "General Public License for more details."
- "
Please consider making a "
- ""
- "donation and support our continued work with monit.
");
+ "General Public License for more details."
+ "
"
+ "Running Monit on more than one server? Use "
+ "M/Monit to manage all your Monit instances.
"
+ "
Please consider making a "
+ "donation to support our work with Monit.
"
- "If failed %s [%s] with timeout %ds %s then %s else if passed %s then %s"
+ "If failed %s [%s] with timeout %ds %s then %s else if succeeded %s then %s"
"
"
- "If failed %s count %d with timeout %d seconds %s then %s else if passed %s then %s"
+ "If failed %s count %d with timeout %d seconds %s then %s else if succeeded %s then %s"
"
",
- (s->error & EVENT_MATCH)?" color='#ff0000'":"",
- (s->error & EVENT_MATCH)?"yes":"no");
+ (s->error & EVENT_CONTENT)?" color='#ff0000'":"",
+ (s->error & EVENT_CONTENT)?"yes":"no");
}
}
}
@@ -2427,7 +2475,7 @@
else
{
char *uptime = Util_getUptime(Util_getProcessUptime(Run.pidfile), " ");
- out_print(res, "The monit daemon %s uptime: %s\n\n", VERSION, uptime);
+ out_print(res, "The Monit daemon %s uptime: %s\n\n", VERSION, uptime);
FREE(uptime);
for(s= servicelist_conf; s; s= s->next_conf)
@@ -2465,7 +2513,7 @@
if(s->type == TYPE_FILE ||
s->type == TYPE_FIFO ||
s->type == TYPE_DIRECTORY ||
- s->type == TYPE_DEVICE) {
+ s->type == TYPE_FILESYSTEM) {
out_print(res,
" %-33s %o\n"
" %-33s %d\n"
@@ -2477,15 +2525,15 @@
if(s->type == TYPE_FILE ||
s->type == TYPE_FIFO ||
s->type == TYPE_DIRECTORY) {
- ctime_r(&s->inf->timestamp, time);
+ ctime_r((const time_t *)&s->inf->timestamp, time);
out_print(res,
" %-33s %s",
"timestamp", time);
}
if(s->type == TYPE_FILE) {
out_print(res,
- " %-33s %lu B\n",
- "size", (unsigned long) s->inf->st_size);
+ " %-33s %llu B\n",
+ "size", (unsigned long long) s->inf->st_size);
if(s->checksum) {
out_print(res,
" %-33s %s(%s)\n",
@@ -2493,12 +2541,15 @@
checksumnames[s->checksum->type]);
}
}
- if(s->type == TYPE_DEVICE) {
+ if(s->type == TYPE_FILESYSTEM) {
out_print(res,
+ " %-33s %#lx\n"
" %-33s %ld B\n"
" %-33s %ld [%.1f MB]\n"
" %-33s %ld [%.1f MB] [%.1f%%]\n"
" %-33s %ld [%.1f MB] [%.1f%%]\n",
+ "filesystem flags",
+ s->inf->flags,
"block size",
s->inf->f_bsize,
"blocks total",
@@ -2548,7 +2599,7 @@
" %-33s %.1f%%\n"
" %-33s %.1f%%\n"
" %-33s %.1f%%\n",
- "childrens", s->inf->children,
+ "children", s->inf->children,
"memory kilobytes", s->inf->mem_kbyte,
"memory kilobytes total", s->inf->total_mem_kbyte,
"memory percent", s->inf->mem_percent/10.0,
@@ -2608,7 +2659,7 @@
systeminfo.total_mem_percent/10.);
}
}
- ctime_r(&s->collected, time);
+ ctime_r((const time_t *)&s->collected.tv_sec, time);
out_print(res, " %-33s %s\n", "data collected", time);
}
FREE(status);
@@ -2617,23 +2668,36 @@
static char *get_service_status_html(Service_T s) {
- char state[STRLEN];
+ char *status= NULL;
+ char doaction[STRLEN];
EventTable_T *et= Event_Table;
ASSERT(s);
+ memset(doaction, 0, STRLEN);
+ if(s->doaction) {
+ snprintf(doaction, STRLEN-1, " - %s pending", actionnames[s->doaction]);
+ }
+
+ status= xcalloc(sizeof(char), STRLEN);
+
/* In the case that the service is not monitored, we will return immediately,
* because we are not able to describe actual service state */
- if(s->monitor == MONITOR_NOT)
- return xstrdup("not monitored");
- else if(s->monitor == MONITOR_INIT)
- return xstrdup("initializing");
+ if(s->monitor == MONITOR_NOT) {
+ snprintf(status, STRLEN, "not monitored%s",
+ doaction);
+ return status;
+ } else if(s->monitor == MONITOR_INIT) {
+ snprintf(status, STRLEN, "initializing%s",
+ doaction);
+ return status;
+ }
/* In the case that error is zero, service is up without errors */
if(!s->error) {
- snprintf(state, STRLEN-1, "%s",
- statusnames[s->type]);
- return xstrdup(state);
+ snprintf(status, STRLEN, "%s%s",
+ statusnames[s->type], doaction);
+ return status;
}
/* In the case that the service has actualy some failure, error
@@ -2641,35 +2705,52 @@
* of the first error found */
while((*et).id) {
if(s->error & (*et).id) {
- snprintf(state, STRLEN-1, "%s",
- (*et).description_failed);
- return xstrdup(state);
+ if (s->error_hint & (*et).id)
+ snprintf(status, STRLEN, "%s%s", (*et).description_changed, doaction);
+ else
+ snprintf(status, STRLEN, "%s%s", (*et).description_failed, doaction);
+ return status;
}
et++;
}
/* We should not pass through here */
- return xstrdup("unknown");
+ snprintf(status, STRLEN, "unknown%s",
+ doaction);
+ return status;
}
static char *get_service_status_text(Service_T s) {
+ char *status= NULL;
+ char doaction[STRLEN];
EventTable_T *et= Event_Table;
ASSERT(s);
+ memset(doaction, 0, STRLEN);
+ if(s->doaction) {
+ snprintf(doaction, STRLEN, " - %s pending", actionnames[s->doaction]);
+ }
+
+ status= xcalloc(sizeof(char), STRLEN);
+
/* In the case that the service is not monitored, we will return immediately,
* because we are not able to describe actual service state */
- if(s->monitor == MONITOR_NOT)
- return xstrdup("not monitored");
- else if(s->monitor == MONITOR_INIT)
- return xstrdup("initializing");
+ if(s->monitor == MONITOR_NOT) {
+ snprintf(status, STRLEN, "not monitored%s", doaction);
+ return status;
+ } else if(s->monitor == MONITOR_INIT) {
+ snprintf(status, STRLEN, "initializing%s", doaction);
+ return status;
+ }
/* In the case that error is zero, service is up without errors */
if(!s->error) {
- return xstrdup(statusnames[s->type]);
+ snprintf(status, STRLEN, "%s%s", statusnames[s->type], doaction);
+ return status;
}
/* In the case that the service has actualy some failure, error
@@ -2677,13 +2758,18 @@
* of the first error found */
while((*et).id) {
if(s->error & (*et).id) {
- return xstrdup((*et).description_failed);
+ if (s->error_hint & (*et).id)
+ snprintf(status, STRLEN, "%s%s", (*et).description_changed, doaction);
+ else
+ snprintf(status, STRLEN, "%s%s", (*et).description_failed, doaction);
+ return status;
}
et++;
}
/* We should not pass through here */
- return xstrdup("unknown");
+ snprintf(status, STRLEN, "unknown%s", doaction);
+ return status;
}
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/http/cervlet.h /tmp/QeMlhPoI46/monit-5.0.3/http/cervlet.h
--- monit-4.8.1/http/cervlet.h 2006-01-01 22:01:06.000000000 +0000
+++ monit-5.0.3/http/cervlet.h 2009-05-25 20:02:57.000000000 +0100
@@ -1,20 +1,30 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
@@ -31,24 +41,28 @@
""\
" monit: service manager"\
" "\
""\
""\
@@ -58,39 +72,36 @@
" alink=\"#000000\" text=\"#000000\">"\
"
"
#define HEAD(location, refresh) \
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/http/engine.c /tmp/QeMlhPoI46/monit-5.0.3/http/engine.c
--- monit-4.8.1/http/engine.c 2006-04-27 21:16:03.000000000 +0100
+++ monit-5.0.3/http/engine.c 2009-02-13 13:06:35.000000000 +0000
@@ -1,20 +1,30 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
#include
@@ -107,7 +117,7 @@
* @author Christian Hopp,
* @author Martin Pala
*
- * @version \$Id: engine.c,v 1.72 2006/04/27 20:16:03 martinp Exp $
+ * @version \$Id: engine.c,v 1.83 2009/02/13 09:18:15 hauk Exp $
*
* @file
*/
@@ -229,72 +239,50 @@
*/
int add_host_allow(char *name) {
- struct hostent *hp;
- struct in_addr *inp;
+ struct addrinfo hints;
+ struct addrinfo *res;
+ struct addrinfo *_res;
ASSERT(name);
- if(! (hp= gethostbyname(name))) {
-
- LogError("%s: Error: hostname did not resolve '%s'.\n",
- prog, name);
- return FALSE;
-
- } else {
-
- while(*hp->h_addr_list) {
-
- HostsAllow h;
-
- NEW(h);
-
- inp = (struct in_addr *) *hp->h_addr_list++;
-
- h->network= inp->s_addr;
- h->mask= 0xffffffff;
-
- LOCK(hostlist_mutex)
-
- if(hostlist) {
-
- HostsAllow p, n;
-
- for(n= p= hostlist; p; n= p, p= p->next) {
-
- if((p->network == h->network) && ((p->mask == h->mask))) {
- DEBUG("%s: Debug: Skipping redundant host '%s' (%s).\n",
- prog, name, inet_ntoa(*(struct in_addr *) &h->network));
+ memset(&hints, 0, sizeof(struct addrinfo));
+ hints.ai_family = PF_INET; /* we support just IPv4 currently */
- destroy_host_allow(h);
- goto done;
-
- }
-
- }
+ if(getaddrinfo(name, NULL, &hints, &res) != 0)
+ return FALSE;
- DEBUG("%s: Debug: Adding host allow '%s' (%s).\n",
- prog, name, inet_ntoa(*(struct in_addr *) &h->network));
-
- n->next= h;
-
- } else {
-
- DEBUG("%s: Debug: Adding host allow '%s' (%s).\n",
- prog, name, inet_ntoa(*(struct in_addr *) &h->network));
+ for(_res = res; _res; _res = _res->ai_next) {
+ if(_res->ai_family == AF_INET) {
+ HostsAllow h;
+ struct sockaddr_in *sin = (struct sockaddr_in *)_res->ai_addr;
+
+ NEW(h);
+ memcpy(&h->network, &sin->sin_addr, 4);
+ h->mask= 0xffffffff;
+ LOCK(hostlist_mutex)
+ if(hostlist) {
+ HostsAllow p, n;
+ for(n= p= hostlist; p; n= p, p= p->next) {
+ if((p->network == h->network) && ((p->mask == h->mask))) {
+ DEBUG("%s: Debug: Skipping redundant host '%s'\n", prog, name);
+ destroy_host_allow(h);
+ goto done;
+ }
+ }
+ DEBUG("%s: Debug: Adding host allow '%s'\n", prog, name);
+ n->next= h;
+ } else {
+ DEBUG("%s: Debug: Adding host allow '%s'\n", prog, name);
- hostlist= h;
-
- }
-
- done:
- END_LOCK;
-
+ hostlist= h;
+ }
+ done:
+ END_LOCK;
}
-
}
+ freeaddrinfo(res);
return TRUE;
-
}
/**
@@ -642,7 +630,7 @@
int client;
struct sockaddr_in in;
- unsigned int len= sizeof(struct sockaddr_in);
+ socklen_t len= sizeof(struct sockaddr_in);
if(can_read(server, 1)) {
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/http/engine.h /tmp/QeMlhPoI46/monit-5.0.3/http/engine.h
--- monit-4.8.1/http/engine.h 2006-01-01 22:01:06.000000000 +0000
+++ monit-5.0.3/http/engine.h 2009-02-13 13:06:36.000000000 +0000
@@ -1,20 +1,30 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/http/httpstatus.h /tmp/QeMlhPoI46/monit-5.0.3/http/httpstatus.h
--- monit-4.8.1/http/httpstatus.h 2006-01-01 22:01:06.000000000 +0000
+++ monit-5.0.3/http/httpstatus.h 2009-02-13 13:06:36.000000000 +0000
@@ -1,20 +1,30 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
diff -Nru /tmp/mTIqZj4ofw/monit-4.8.1/http/processor.c /tmp/QeMlhPoI46/monit-5.0.3/http/processor.c
--- monit-4.8.1/http/processor.c 2006-04-27 21:16:03.000000000 +0100
+++ monit-5.0.3/http/processor.c 2009-05-25 20:02:57.000000000 +0100
@@ -1,20 +1,30 @@
/*
- * Copyright (C), 2000-2006 by the monit project group.
- * All Rights Reserved.
+ * Copyright (C) 2009 Tildeslash Ltd. All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see .
+ *
+ * In addition, as a special exception, the copyright holders give
+ * permission to link the code of portions of this program with the
+ * OpenSSL library under certain conditions as described in each
+ * individual source file, and distribute linked combinations
+ * including the two.
+ *
+ * You must obey the GNU General Public License in all respects
+ * for all of the code used other than OpenSSL. If you modify
+ * file(s) with this exception, you may extend this exception to your
+ * version of the file(s), but you are not obligated to do so. If you
+ * do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source
+ * files in the program, then also delete it here.
*/
#include
@@ -101,7 +111,7 @@
* @author Jan-Henrik Haukeland,
* @author Christian Hopp,
*
- * @version \$Id: processor.c,v 1.55 2006/04/27 20:16:03 martinp Exp $
+ * @version \$Id: processor.c,v 1.73 2009/05/09 15:11:39 martinp Exp $
*
* @file
*/
@@ -157,9 +167,9 @@
* @param doGetFunc doGet function
* @param doPostFunc doPost function
*/
-void add_Impl(void *doGetFunc, void *doPostFunc) {
- Impl.doGet= doGetFunc;
- Impl.doPost= doPostFunc;
+void add_Impl(void(*doGet)(HttpRequest, HttpResponse), void(*doPost)(HttpRequest, HttpResponse)) {
+ Impl.doGet= doGet;
+ Impl.doPost= doPost;
}
@@ -182,19 +192,7 @@
"%s"\
"