[-]
[+]
|
Changed |
icinga-mod_gearman.changes
|
|
[-]
[+]
|
Changed |
icinga-mod_gearman.spec
^
|
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/Changes
^
|
@@ -1,5 +1,18 @@
This file documents the revision history for mod_gearman.
+1.3.4 Tue Jun 19 14:58:14 CEST 2012
+ - worker: added 'timeout_result' config option to
+ set return code for checks running into timeout
+ - send_gearman: make timeout configurable
+ - send_gearman: added new mode which sends one result per line
+ - gearman_top: allow floating number for interval
+ - fixed killing worker on reload, worker now finishes current job
+ - fixed executing jobs while restarting worker
+ - fixed potential problem on deinitializing epn
+
+1.3.2 Sun May 27 11:39:55 CEST 2012
+ - fixed problem with commands containing ENV definitions
+
1.3.0 Fri Apr 27 16:45:02 CEST 2012
- fixed setting queues by custom variables
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/Makefile.am
^
|
@@ -106,8 +106,7 @@
EXTRA_DIST = COPYING etc/*.in extras include \
THANKS README docs/README.html Changes worker/initscript.in \
docs/QUICKSTART docs/QUICKSTART.html support/mod_gearman.spec \
- t/data/test1.key t/data/test2.key t/data/test3.key t/data/send_multi.txt \
- t/rc t/both t/killer t/sleep t/*.pl t/*.t \
+ t/data/* t/rc t/both t/killer t/sleep t/*.pl t/*.t \
worker/mod_gearman_p1.pl t/test_all.pl t/valgrind_suppress.cfg contrib
# other targets
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/Makefile.in
^
|
@@ -372,8 +372,7 @@
EXTRA_DIST = COPYING etc/*.in extras include \
THANKS README docs/README.html Changes worker/initscript.in \
docs/QUICKSTART docs/QUICKSTART.html support/mod_gearman.spec \
- t/data/test1.key t/data/test2.key t/data/test3.key t/data/send_multi.txt \
- t/rc t/both t/killer t/sleep t/*.pl t/*.t \
+ t/data/* t/rc t/both t/killer t/sleep t/*.pl t/*.t \
worker/mod_gearman_p1.pl t/test_all.pl t/valgrind_suppress.cfg contrib
all: config.h
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/README
^
|
@@ -38,14 +38,13 @@
Download
--------
- * Latest stable
- http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.3.0.tar.gz[version 1.3.0], released April 27 2012
+ * Latest stable http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.3.4.tar.gz[version 1.3.4], released June 19 2012
* Mod Gearman is available for download at: http://labs.consol.de/nagios/mod-gearman
* Source is available on GitHub: http://github.com/sni/mod_gearman
* Older versions are available in the <<_archive,download archive>>.
* Mod-Gearman is also included in http://omdistro.org[OMD].
* Debian users should use the http://packages.debian.org/source/wheezy/mod-gearman[official packages]
- * SLES/RHEL users should use the http://mod-gearman.org/download/[prebuild packages]
+ * SLES/RHEL/Centos users should use the http://mod-gearman.org/download/[prebuild packages]
@@ -54,7 +53,7 @@
* Professional support and consulting is available via http://www.consol.de/open-source-monitoring/support/[www.consol.de]
* http://labs.consol.de/lang/de/forum/#/categories/mod-gearman[support forum]
* https://groups.google.com/group/mod_gearman[google groups mailinglist]
- * http://www.nagios-portal.org[german nagios portal]
+ * http://www.monitoring-portal.org[german monitoring portal]
* Debian users may be interested in the http://labs.consol.de/nagios/mod-gearman/mod-gearman-quickstart-guide/[quickstart guide].
* Mod-Gearman has been succesfully tested with latest Nagios/Icinga.
See <<_supported_dependencies,Supported Dependencies>> for details.
@@ -168,6 +167,15 @@
load on the Nagios box. Therefor we just enable hosts, services and
eventhandler on the server and the worker.
+Pro:
+
+ * reduced load on your monitoring box
+
+Contra:
+
+ * no failover
+
+
Distributed Monitoring
~~~~~~~~~~~~~~~~~~~~~~
@@ -182,6 +190,16 @@
for this worker and just the hosts and services from the given
hostgroup will be processed.
+Pro:
+
+ * reduced load on your monitoring box
+ * ability to access remote networks
+
+Contra:
+
+ * no failover
+
+
Distributed Monitoring with Load Balancing
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -193,6 +211,17 @@
Your distributed setup could easily be extended to a load balanced
setup with just adding more worker of the same config.
+Pro:
+
+ * reduced load on your monitoring box
+ * ability to access remote networks
+ * automatic failover and load balancing for worker
+
+Contra:
+
+ * no failover for the master
+
+
NSCA Replacement
~~~~~~~~~~~~~~~~
@@ -208,12 +237,44 @@
settings like the neb module or your core won't be able to process the
results or use the 'accept_clear_results' option.
+Pro:
+
+ * easy to setup in existing environments
+
+
+
+Distributed Setup With Remote Scheduler
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+++++
+<a title="Distributed Setup With Remote Scheduler" rel="lightbox[mod_gm]" href="http://labs.consol.de/wp-content/uploads/2010/09/advanced_distributed.png"><img src="http://labs.consol.de/wp-content/uploads/2010/09/advanced_distributed.png" alt="Distributed Setup With Remote Scheduler" width="360" height="270" style="float:none" /></a>
+++++
+
+In case your network is unstable or you need a gui view from the
+remote location or any other reason which makes a remote core
+unavoidable you may want this setup. Thist setup consists of 2
+independent Mod-Gearman setups and the slave worker just send their
+results to the master via the 'dup_server' option. The master
+objects configuration must contain all slave services and hosts.
+The configuration sync is not part of Mod-Gearman.
+
+Pro:
+
+ * independent from network outtakes
+ * local view
+
+Contra:
+
+ * more complex setup
+ * requires configuration sync
+
+
Gearman Proxy
~~~~~~~~~~~~~
++++
-<a title="Gearman Proxy" rel="lightbox[mod_gm]" href="http://labs.consol.de/wp-content/uploads/2010/09/gearman_proxy.png"><img src="http://labs.consol.de/wp-content/uploads/2010/09/gearman_proxy.png" alt="Gearman Proxy" width="300" height="220" style="float:none" /></a>
+<a title="Gearman Proxy" rel="lightbox[mod_gm]" href="http://labs.consol.de/wp-content/uploads/2010/09/gearman_proxy.png"><img src="http://labs.consol.de/wp-content/uploads/2010/09/gearman_proxy.png" alt="Gearman Proxy" width="360" height="270" style="float:none" /></a>
++++
Sometimes you may need to reverse the direction of the initial
@@ -226,6 +287,15 @@
Just copy the gearman_proxy.pl from the contrib or share directory and
adjust the first few lines to match you needs.
+Pro:
+
+ * changes direction of initial connection setup
+ * buffers network outages
+
+Contra:
+
+ * two more daemon to monitor and maintain
+
@@ -263,6 +333,9 @@
assume a Centos 5.7. Other releases may have different versions but
should behave similar.
+NOTE: use the http://mod-gearman.org/download/[prebuild packages] if
+available.
+
Build/install Gearmand rpms
--------------------------------------
#> yum install autoconf automake libtool boost141-devel boost141-program-options
@@ -565,7 +638,7 @@
do_hostchecks::
-Set this to 'no' if you want Mod-Gearman to only take care about
+Set this to 'no' if you want Mod-Gearman to only take care of
servicechecks. No hostchecks will be processed by Mod-Gearman. Use
this option to disable hostchecks and still have the possibility to
use hostgroups for easy configuration of your services.
@@ -789,6 +862,16 @@
====
+timeout_result::
+Defines the return code for timed out checks. Accepted return codes
+are 0 (Ok), 1 (Warning), 2 (Critical) and 3 (Unknown)
+Default: 2
++
+====
+ timeout_result=2
+====
+
+
dup_results_are_passive::
Use this option to set if the duplicate result send to the 'dupserver'
will be passive or active.
@@ -1155,6 +1238,8 @@
Archive
-------
+* http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.3.4.tar.gz[version 1.3.4 - June 19 2012]
+* http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.3.2.tar.gz[version 1.3.2 - May 27 2012]
* http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.3.0.tar.gz[version 1.3.0 - April 27 2012]
* http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.2.8.tar.gz[version 1.2.8 - April 12 2012]
* http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.2.6.tar.gz[version 1.2.6 - March 15 2012]
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/THANKS
^
|
@@ -23,3 +23,7 @@
Thanks to
http://polarssl.org
for the MD5 implementation
+
+Thanks to
+Tone Darrud
+for the nice logo
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/aclocal.m4
^
|
@@ -13,8 +13,8 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
-[m4_warning([this file was generated for autoconf 2.65.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
+[m4_warning([this file was generated for autoconf 2.67.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/common/check_utils.c
^
|
@@ -101,6 +101,7 @@
pid_t pid;
int pipe_stdout[2], pipe_stderr[2], pipe_rwe[3];
int retval;
+ sigset_t mask;
#ifdef EMBEDDEDPERL
retval = run_epn_check(processed_command, ret, err);
@@ -109,8 +110,12 @@
}
#endif
- /* check for check execution method (shell or execvp) */
- if(!strpbrk(processed_command,"!$^&*()~[]|{};<>?`\"'")) {
+ /* check for check execution method (shell or execvp)
+ * command line does not have to contain shell meta characters
+ * and cmd must begin with a /. Otherwise "BLAH=BLUB cmd" would lead
+ * to file not found errors
+ */
+ if((*processed_command == '/' || *processed_command == '.') && !strpbrk(processed_command,"!$^&*()~[]\\|{};<>?`\"'")) {
/* use the fast execvp when there are no shell characters */
gm_log( GM_LOG_TRACE, "using execvp, no shell characters found\n" );
@@ -131,6 +136,10 @@
_exit(STATE_UNKNOWN);
}
else if(!pid){
+ /* remove all customn signal handler */
+ sigfillset(&mask);
+ sigprocmask(SIG_UNBLOCK, &mask, NULL);
+
/* child process */
if((dup2(pipe_stdout[1],STDOUT_FILENO)<0)){
gm_log( GM_LOG_ERROR, "dup2 error\n");
@@ -217,7 +226,6 @@
char *plugin_output, *plugin_error;
char *bufdup;
char buffer[GM_BUFFERSIZE], buf_error[GM_BUFFERSIZE];
- sigset_t mask;
struct timeval start_time,end_time;
pid_t pid = 0;
buffer[0] = '\x0';
@@ -254,10 +262,6 @@
setpgid(0,0);
pid = getpid();
- /* remove all customn signal handler */
- sigfillset(&mask);
- sigprocmask(SIG_UNBLOCK, &mask, NULL);
-
if( fork_exec == GM_ENABLED ) {
close(pipe_stdout[0]);
close(pipe_stderr[0]);
@@ -328,11 +332,7 @@
else if(return_code >= 128 && return_code < 144) {
char * signame = nr2signal((int)(return_code-128));
bufdup = strdup(buffer);
- snprintf( buffer, sizeof( buffer )-1, "CRITICAL: Return code of %d is out of bounds. Plugin exited by signal %s. (worker: %s)", (int)(return_code), signame, identifier);
- if(strlen(bufdup) > 0) {
- strncat(buffer, "\\n", (sizeof(buffer)-1));
- strncat(buffer, bufdup, (sizeof(buffer)-1));
- }
+ snprintf( buffer, sizeof( buffer )-1, "CRITICAL: Return code of %d is out of bounds. Plugin exited by signal %s. (worker: %s)\\n%s", (int)(return_code), signame, identifier, bufdup);
return_code = STATE_CRITICAL;
free(bufdup);
free(signame);
@@ -383,10 +383,10 @@
/* called when check runs into timeout */
void check_alarm_handler(int sig) {
- int retval;
- pid_t pid = getpid();
+ pid_t pid;
gm_log( GM_LOG_TRACE, "check_alarm_handler(%i)\n", sig );
+ pid = getpid();
if(current_job != NULL && mod_gm_opt->fork_on_exec == GM_DISABLED) {
/* create a useful log message*/
if ( !strcmp( current_job->type, "service" ) ) {
@@ -403,16 +403,7 @@
}
if(current_child_pid > 0) {
- gm_log( GM_LOG_TRACE, "send SIGINT to %d\n", current_child_pid);
- signal(SIGINT, SIG_IGN);
- kill(-current_child_pid, SIGINT);
- sleep(1);
- if(waitpid(pid,&retval,0)!=pid)
- return;
- if(pid_alive(current_child_pid)) {
- gm_log( GM_LOG_TRACE, "send SIGKILL to %d\n", current_child_pid);
- kill(-current_child_pid, SIGKILL);
- }
+ kill_child_checks();
} else {
signal(SIGINT, SIG_IGN);
gm_log( GM_LOG_TRACE, "send SIGINT to %d\n", pid);
@@ -426,6 +417,32 @@
return;
}
+/* send kill to all forked processes */
+void kill_child_checks(void) {
+ int retval;
+ pid_t pid;
+
+ signal(SIGINT, SIG_IGN);
+ pid = getpid();
+ if(current_child_pid > 0 && current_child_pid != pid) {
+ gm_log( GM_LOG_TRACE, "kill_child_checks(): send SIGINT to %d\n", current_child_pid);
+ kill(current_child_pid, SIGINT);
+ sleep(1);
+ if(waitpid(pid,&retval,0)!=pid) {
+ signal(SIGINT, SIG_DFL);
+ return;
+ }
+ if(pid_alive(current_child_pid)) {
+ gm_log( GM_LOG_TRACE, "kill_child_checks(): send SIGKILL to %d\n", current_child_pid);
+ kill(current_child_pid, SIGKILL);
+ }
+ }
+ gm_log( GM_LOG_TRACE, "send SIGINT to %d\n", pid);
+ kill(0, SIGINT);
+ signal(SIGINT, SIG_DFL);
+ return;
+}
+
void send_timeout_result(gm_job_t * exec_job) {
struct timeval end_time;
@@ -437,7 +454,7 @@
gettimeofday(&end_time, NULL);
exec_job->finish_time = end_time;
- exec_job->return_code = 2;
+ exec_job->return_code = mod_gm_opt->timeout_return;
exec_job->early_timeout = 1;
if ( !strcmp( exec_job->type, "service" ) )
snprintf( buffer, sizeof( buffer ) -1, "(Service Check Timed Out On Worker: %s)\n", mod_gm_opt->identifier);
@@ -457,6 +474,7 @@
struct timeval end_time;
char buffer[GM_BUFFERSIZE];
char * signame;
+ char * buf_dup;
buffer[0] = '\x0';
gm_log( GM_LOG_TRACE, "send_failed_result()\n");
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/common/epn_utils.c
^
|
@@ -33,6 +33,7 @@
#include <perl.h>
#include "include/nagios/epn_nagios.h"
int use_embedded_perl = TRUE;
+int deinit_rc = 0;
static PerlInterpreter *my_perl = NULL;
extern int current_child_pid;
extern int enable_embedded_perl;
@@ -52,6 +53,8 @@
int count;
FILE *fp;
pid_t pid;
+ sigset_t mask;
+
int use_epn=FALSE;
if(my_perl == NULL) {
gm_log(GM_LOG_ERROR, "Embedded Perl has to be initialized before running the first check\n");
@@ -130,6 +133,11 @@
}
else if(!pid) {
/* child process */
+
+ /* remove all customn signal handler */
+ sigfillset(&mask);
+ sigprocmask(SIG_UNBLOCK, &mask, NULL);
+
gm_log( GM_LOG_TRACE, "Embedded Perl Child\n" );
if((dup2(pipe_stderr[1],STDERR_FILENO)<0)){
gm_log( GM_LOG_ERROR, "dup2 error\n");
@@ -171,7 +179,7 @@
/* free structures */
mod_gm_free_opt(mod_gm_opt);
- deinit_embedded_perl();
+ deinit_embedded_perl(retval);
_exit(retval);
}
@@ -309,15 +317,24 @@
return GM_OK;
}
+#ifdef EMBEDDEDPERL
+/* catch sigsegv during deinitialzing and just exit */
+void deinit_segv( int sig ) {
+ _exit(deinit_rc);
+}
+#endif
/* closes embedded perl interpreter */
-int deinit_embedded_perl(void){
+int deinit_embedded_perl(int rc) {
#ifdef EMBEDDEDPERL
+ deinit_rc = rc;
+ signal(SIGSEGV, deinit_segv);
PL_perl_destruct_level=0;
perl_destruct(my_perl);
perl_free(my_perl);
PERL_SYS_TERM();
free(p1_file);
+ signal(SIGSEGV, SIG_DFL);
#endif
return GM_OK;
}
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/common/utils.c
^
|
@@ -229,6 +229,7 @@
opt->logmode = GM_LOG_MODE_AUTO;
opt->logfile_fp = NULL;
opt->message = NULL;
+ opt->delimiter = strdup("\t");
opt->return_code = 0;
opt->timeout = 10;
opt->debug_level = GM_LOG_INFO;
@@ -251,6 +252,7 @@
opt->idle_timeout = GM_DEFAULT_IDLE_TIMEOUT;
opt->max_jobs = GM_DEFAULT_MAX_JOBS;
opt->spawn_rate = GM_DEFAULT_SPAWN_RATE;
+ opt->timeout_return = 2;
opt->identifier = NULL;
opt->queue_cust_var = NULL;
opt->show_error_output = GM_ENABLED;
@@ -258,6 +260,10 @@
opt->orphan_host_checks = GM_ENABLED;
opt->orphan_service_checks = GM_ENABLED;
opt->accept_clear_results = GM_DISABLED;
+ opt->has_starttime = FALSE;
+ opt->has_finishtime = FALSE;
+ opt->has_latency = FALSE;
+ opt->active = GM_DISABLED;
opt->workaround_rc_25 = GM_DISABLED;
@@ -356,9 +362,13 @@
while(key[0] == '-')
key++;
- /* daemon mode */
+ /* daemon mode or delimiter */
if ( !strcmp( key, "daemon" ) || !strcmp( key, "d" ) ) {
opt->daemon_mode = parse_yes_or_no(value, GM_ENABLED);
+ if(value != NULL) {
+ free(opt->delimiter);
+ opt->delimiter = strdup( value );
+ }
return(GM_OK);
}
@@ -548,6 +558,12 @@
opt->message = strdup( value );
}
+ /* delimiter */
+ else if ( !strcmp( key, "delimiter" ) ) {
+ free(opt->delimiter);
+ opt->delimiter = strdup( value );
+ }
+
/* host */
else if ( !strcmp( key, "host" ) ) {
opt->host = strdup( value );
@@ -560,16 +576,19 @@
/* latency */
else if ( !strcmp( key, "latency" ) ) {
+ opt->has_latency = TRUE;
string2timeval(value, &opt->latency);
}
/* start time */
else if ( !strcmp( key, "starttime" ) ) {
+ opt->has_starttime = TRUE;
string2timeval(value, &opt->starttime);
}
/* finish time */
else if ( !strcmp( key, "finishtime" ) ) {
+ opt->has_finishtime = TRUE;
string2timeval(value, &opt->finishtime);
}
@@ -614,7 +633,8 @@
}
/* timeout */
- else if ( !strcmp( key, "timeout" ) ) {
+ else if ( !strcmp( key, "timeout" )
+ || !strcmp( key, "t" )) {
opt->timeout = atoi( value );
if(opt->timeout < 0) { opt->timeout = 10; }
}
@@ -661,6 +681,13 @@
if(opt->spawn_rate < 0) { opt->spawn_rate = GM_DEFAULT_SPAWN_RATE; }
}
+ /* timeout_return */
+ else if ( !strcmp( key, "timeout_return" ) ) {
+ opt->timeout_return = atoi( value );
+ if(opt->timeout_return < 0) { opt->timeout_return = 2; }
+ if(opt->timeout_return > 3) { opt->timeout_return = 2; }
+ }
+
/* perfdata_mode */
else if ( !strcmp( key, "perfdata_mode" ) ) {
opt->perfdata_mode = atoi( value );
@@ -996,6 +1023,7 @@
free(opt->crypt_key);
free(opt->keyfile);
free(opt->message);
+ free(opt->delimiter);
free(opt->pidfile);
free(opt->logfile);
free(opt->host);
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/configure
^
|
@@ -1,13 +1,13 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for mod_gearman 1.3.0.
+# Generated by GNU Autoconf 2.67 for mod_gearman 1.3.4.
#
# Report bugs to <sven.nierlein@consol.de>.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -319,7 +319,7 @@
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
} # as_fn_mkdir_p
@@ -359,19 +359,19 @@
fi # as_fn_arith
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $1" >&2
+ $as_echo "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -533,7 +533,7 @@
exec 6>&1
# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
@@ -552,8 +552,8 @@
# Identity of this package.
PACKAGE_NAME='mod_gearman'
PACKAGE_TARNAME='mod_gearman'
-PACKAGE_VERSION='1.3.0'
-PACKAGE_STRING='mod_gearman 1.3.0'
+PACKAGE_VERSION='1.3.4'
+PACKAGE_STRING='mod_gearman 1.3.4'
PACKAGE_BUGREPORT='sven.nierlein@consol.de'
PACKAGE_URL=''
@@ -777,8 +777,9 @@
fi
case $ac_option in
- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *) ac_optarg=yes ;;
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
esac
# Accept the important Cygnus configure options, so we can diagnose typos.
@@ -823,7 +824,7 @@
ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -849,7 +850,7 @@
ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1053,7 +1054,7 @@
ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1069,7 +1070,7 @@
ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1099,8 +1100,8 @@
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
- -*) as_fn_error "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information."
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
;;
*=*)
@@ -1108,7 +1109,7 @@
# Reject names that are not valid shell variable names.
case $ac_envvar in #(
'' | [0-9]* | *[!_$as_cr_alnum]* )
- as_fn_error "invalid variable name: \`$ac_envvar'" ;;
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
esac
eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
@@ -1126,13 +1127,13 @@
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- as_fn_error "missing argument to $ac_option"
+ as_fn_error $? "missing argument to $ac_option"
fi
if test -n "$ac_unrecognized_opts"; then
case $enable_option_checking in
no) ;;
- fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
*) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
fi
@@ -1155,7 +1156,7 @@
[\\/$]* | ?:[\\/]* ) continue;;
NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
esac
- as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
done
# There might be people who depend on the old broken behavior: `$host'
@@ -1169,8 +1170,8 @@
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1185,9 +1186,9 @@
ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- as_fn_error "working directory cannot be determined"
+ as_fn_error $? "working directory cannot be determined"
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- as_fn_error "pwd does not report name of working directory"
+ as_fn_error $? "pwd does not report name of working directory"
# Find the source files, if location was not specified.
@@ -1226,11 +1227,11 @@
fi
if test ! -r "$srcdir/$ac_unique_file"; then
test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
pwd)`
# When building in place, set srcdir=.
if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1256,7 +1257,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 mod_gearman 1.3.0 to adapt to many kinds of systems.
+\`configure' configures mod_gearman 1.3.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1270,7 +1271,7 @@
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
+ -q, --quiet, --silent do not print \`checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for \`--cache-file=config.cache'
-n, --no-create do not create output files
@@ -1322,7 +1323,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of mod_gearman 1.3.0:";;
+ short | recursive ) echo "Configuration of mod_gearman 1.3.4:";;
esac
cat <<\_ACEOF
@@ -1421,10 +1422,10 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-mod_gearman configure 1.3.0
-generated by GNU Autoconf 2.65
+mod_gearman configure 1.3.4
+generated by GNU Autoconf 2.67
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1532,7 +1533,7 @@
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } >/dev/null && {
+ test $ac_status = 0; } > conftest.i && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then :
@@ -1598,10 +1599,10 @@
ac_fn_c_check_header_mongrel ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ if eval "test \"\${$3+set}\"" = set; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
fi
eval ac_res=\$$3
@@ -1637,7 +1638,7 @@
else
ac_header_preproc=no
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }
@@ -1660,17 +1661,15 @@
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( cat <<\_ASBOX
-## -------------------------------------- ##
+( $as_echo "## -------------------------------------- ##
## Report this to sven.nierlein@consol.de ##
-## -------------------------------------- ##
-_ASBOX
+## -------------------------------------- ##"
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
eval "$3=\$ac_header_compiler"
@@ -1692,7 +1691,7 @@
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1723,7 +1722,7 @@
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
eval "$3=no"
@@ -1822,7 +1821,7 @@
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1884,8 +1883,8 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by mod_gearman $as_me 1.3.0, which was
-generated by GNU Autoconf 2.65. Invocation command line was
+It was created by mod_gearman $as_me 1.3.4, which was
+generated by GNU Autoconf 2.67. Invocation command line was
$ $0 $@
@@ -1995,11 +1994,9 @@
{
echo
- cat <<\_ASBOX
-## ---------------- ##
+ $as_echo "## ---------------- ##
## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
echo
# The following way of writing the cache mishandles newlines in values,
(
@@ -2033,11 +2030,9 @@
)
echo
- cat <<\_ASBOX
-## ----------------- ##
+ $as_echo "## ----------------- ##
## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
echo
for ac_var in $ac_subst_vars
do
@@ -2050,11 +2045,9 @@
echo
if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------------- ##
+ $as_echo "## ------------------- ##
## File substitutions. ##
-## ------------------- ##
-_ASBOX
+## ------------------- ##"
echo
for ac_var in $ac_subst_files
do
@@ -2068,11 +2061,9 @@
fi
if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
+ $as_echo "## ----------- ##
## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
echo
cat confdefs.h
echo
@@ -2127,7 +2118,12 @@
ac_site_file1=NONE
ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
- ac_site_file1=$CONFIG_SITE
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
elif test "x$prefix" != xNONE; then
ac_site_file1=$prefix/share/config.site
ac_site_file2=$prefix/etc/config.site
@@ -2142,7 +2138,11 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
done
@@ -2218,7 +2218,7 @@
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
@@ -2235,16 +2235,22 @@
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
- for ac_t in install-sh install.sh shtool; do
- if test -f "$ac_dir/$ac_t"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/$ac_t -c"
- break 2
- fi
- done
+ 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
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ 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
- as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
fi
# These three variables are undocumented and unsupported,
@@ -2360,11 +2366,11 @@
'
case `pwd` in
*[\\\"\#\$\&\'\`$am_lf]*)
- as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;;
esac
case $srcdir in
*[\\\"\#\$\&\'\`$am_lf\ \ ]*)
- as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;;
esac
# Do `set' in a subshell so we don't clobber the current shell's
@@ -2386,7 +2392,7 @@
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
- as_fn_error "ls -t appears to fail. Make sure there is not a broken
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
alias in your environment" "$LINENO" 5
fi
@@ -2396,7 +2402,7 @@
# Ok.
:
else
- as_fn_error "newly created file is older than distributed files!
+ as_fn_error $? "newly created file is older than distributed files!
Check your system clock" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -2634,7 +2640,7 @@
$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
set x ${MAKE-make}
ac_make=`$as_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 :
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat >conftest.make <<\_ACEOF
@@ -2642,7 +2648,7 @@
all:
@echo '@@@%%%=$(MAKE)=@@@%%%'
_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
case `${MAKE-make} -f conftest.make 2>/dev/null` in
*@@@%%%=?*=@@@%%%*)
eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -2676,7 +2682,7 @@
am__isrc=' -I$(srcdir)'
# test to see if srcdir already configured
if test -f $srcdir/config.status; then
- as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
fi
fi
@@ -2692,7 +2698,7 @@
# Define the identity of the package.
PACKAGE='mod_gearman'
- VERSION='1.3.0'
+ VERSION='1.3.4'
cat >>confdefs.h <<_ACEOF
@@ -2975,9 +2981,8 @@
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "C++ compiler cannot create executables
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "C++ compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5 ; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@@ -3019,8 +3024,8 @@
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -3077,9 +3082,9 @@
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run C++ compiled programs.
+as_fn_error $? "cannot run C++ compiled programs.
If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
fi
fi
@@ -3130,8 +3135,8 @@
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
@@ -3749,8 +3754,8 @@
test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "no acceptable C compiler found in \$PATH
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5 ; }
# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -4125,7 +4130,7 @@
fi
set dummy $CC; ac_cc=`$as_echo "$2" |
sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4422,7 +4427,7 @@
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -4438,11 +4443,11 @@
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
break
fi
@@ -4481,7 +4486,7 @@
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -4497,18 +4502,18 @@
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
ac_ext=c
@@ -4569,7 +4574,7 @@
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_GREP"; then
- as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_GREP=$GREP
@@ -4635,7 +4640,7 @@
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_EGREP"; then
- as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_EGREP=$EGREP
@@ -4767,8 +4772,7 @@
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -4872,8 +4876,7 @@
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -5235,14 +5238,13 @@
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
else
- as_fn_error "Compiling Mod-Gearman requires standard unix headers files" "$LINENO" 5
+ as_fn_error $? "Compiling Mod-Gearman requires standard unix headers files" "$LINENO" 5
fi
done
@@ -5256,7 +5258,7 @@
_ACEOF
else
- as_fn_error "Compiling Mod-Gearman requires ltdl.h" "$LINENO" 5
+ as_fn_error $? "Compiling Mod-Gearman requires ltdl.h" "$LINENO" 5
fi
done
@@ -5270,7 +5272,7 @@
_ACEOF
else
- as_fn_error "Compiling Mod-Gearman requires curses.h" "$LINENO" 5
+ as_fn_error $? "Compiling Mod-Gearman requires curses.h" "$LINENO" 5
fi
done
@@ -5347,7 +5349,7 @@
LIBS="-lgearman $LIBS"
else
- as_fn_error "Compiling Mod-Gearman requires libgearman. You may specify the path by --with-gearman=path..." "$LINENO" 5
+ as_fn_error $? "Compiling Mod-Gearman requires libgearman. You may specify the path by --with-gearman=path..." "$LINENO" 5
fi
@@ -5444,7 +5446,7 @@
LIBS="-lperl $LIBS"
else
- as_fn_error "Compiling Mod-Gearman with embedded Perl requires libperl." "$LINENO" 5
+ as_fn_error $? "Compiling Mod-Gearman with embedded Perl requires libperl." "$LINENO" 5
fi
# save libs, as we do not want to add -lperl to all LIBS
@@ -5477,8 +5479,7 @@
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -5614,6 +5615,7 @@
ac_libobjs=
ac_ltlibobjs=
+U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
@@ -5637,23 +5639,23 @@
fi
if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
- as_fn_error "conditional \"AMDEP\" was never defined.
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
- as_fn_error "conditional \"am__fastdepCXX\" was never defined.
+ as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
- as_fn_error "conditional \"am__fastdepCC\" was never defined.
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${USEPERL_TRUE}" && test -z "${USEPERL_FALSE}"; then
- as_fn_error "conditional \"USEPERL\" was never defined.
+ as_fn_error $? "conditional \"USEPERL\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${USEBSD_TRUE}" && test -z "${USEBSD_FALSE}"; then
- as_fn_error "conditional \"USEBSD\" was never defined.
+ as_fn_error $? "conditional \"USEBSD\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
@@ -5803,19 +5805,19 @@
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $1" >&2
+ $as_echo "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -6011,7 +6013,7 @@
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
} # as_fn_mkdir_p
@@ -6064,8 +6066,8 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by mod_gearman $as_me 1.3.0, which was
-generated by GNU Autoconf 2.65. Invocation command line was
+This file was extended by mod_gearman $as_me 1.3.4, which was
+generated by GNU Autoconf 2.67. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -6130,11 +6132,11 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-mod_gearman config.status 1.3.0
-configured by $0, generated by GNU Autoconf 2.65,
+mod_gearman config.status 1.3.4
+configured by $0, generated by GNU Autoconf 2.67,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -6152,11 +6154,16 @@
while test $# != 0
do
case $1 in
- --*=*)
+ --*=?*)
ac_option=`expr "X$1" : 'X\([^=]*\)='`
ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ac_shift=:
;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
*)
ac_option=$1
ac_optarg=$2
@@ -6178,6 +6185,7 @@
$ac_shift
case $ac_optarg in
*\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;;
@@ -6190,7 +6198,7 @@
ac_need_defaults=false;;
--he | --h)
# Conflict between --help and --header
- as_fn_error "ambiguous option: \`$1'
+ as_fn_error $? "ambiguous option: \`$1'
Try \`$0 --help' for more information.";;
--help | --hel | -h )
$as_echo "$ac_cs_usage"; exit ;;
@@ -6199,7 +6207,7 @@
ac_cs_silent=: ;;
# This is an error.
- -*) as_fn_error "unrecognized option: \`$1'
+ -*) as_fn_error $? "unrecognized option: \`$1'
Try \`$0 --help' for more information." ;;
*) as_fn_append ac_config_targets " $1"
@@ -6257,7 +6265,7 @@
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
esac
done
@@ -6295,7 +6303,7 @@
{
tmp=./conf$$-$RANDOM
(umask 077 && mkdir "$tmp")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
@@ -6312,7 +6320,7 @@
fi
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\r'
+ ac_cs_awk_cr='\\r'
else
ac_cs_awk_cr=$ac_cr
fi
@@ -6326,18 +6334,18 @@
echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
echo "_ACEOF"
} >conf$$subs.sh ||
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
. ./conf$$subs.sh ||
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
if test $ac_delim_n = $ac_delim_num; then
break
elif $ac_last_try; then
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
@@ -6426,20 +6434,28 @@
else
cat
fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
- || as_fn_error "could not setup config files machinery" "$LINENO" 5
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[ ]*\):*/\1/
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
s/^[^=]*=[ ]*$//
}'
fi
@@ -6467,7 +6483,7 @@
if test -z "$ac_t"; then
break
elif $ac_last_try; then
- as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
@@ -6552,7 +6568,7 @@
_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
- as_fn_error "could not setup config headers machinery" "$LINENO" 5
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
fi # test -n "$CONFIG_HEADERS"
@@ -6565,7 +6581,7 @@
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
@@ -6593,7 +6609,7 @@
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
esac
case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
@@ -6620,7 +6636,7 @@
case $ac_tag in
*:-:* | *:-) cat >"$tmp/stdin" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
esac
@@ -6757,22 +6773,22 @@
$ac_datarootdir_hack
"
eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
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"; } &&
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&5
+which seems to be undefined. Please make sure it is defined" >&5
$as_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;}
+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";;
*) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
esac \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
;;
:H)
#
@@ -6783,19 +6799,19 @@
$as_echo "/* $configure_input */" \
&& eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
} >"$tmp/config.h" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
$as_echo "$as_me: $ac_file is unchanged" >&6;}
else
rm -f "$ac_file"
mv "$tmp/config.h" "$ac_file" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
fi
else
$as_echo "/* $configure_input */" \
&& eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
- || as_fn_error "could not create -" "$LINENO" 5
+ || as_fn_error $? "could not create -" "$LINENO" 5
fi
# Compute "$ac_file"'s index in $config_headers.
_am_arg="$ac_file"
@@ -6945,7 +6961,7 @@
ac_clean_files=$ac_clean_files_save
test $ac_write_fail = 0 ||
- as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
# configure is writing to config.log, and then calls config.status.
@@ -6966,7 +6982,7 @@
exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
- $ac_cs_success || as_fn_exit $?
+ $ac_cs_success || as_fn_exit 1
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/configure.ac
^
|
@@ -4,7 +4,7 @@
##############################################
# autoconf really does not work with 2.59 or older
AC_PREREQ([2.60])
-AC_INIT([mod_gearman], [1.3.0], [sven.nierlein@consol.de])
+AC_INIT([mod_gearman], [1.3.4], [sven.nierlein@consol.de])
AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
AC_CONFIG_SRCDIR([neb_module/mod_gearman.c],[worker/worker.c],[tools/send_gearman.c],[tools/check_gearman.c],[tools/gearman_top.c])
AC_CONFIG_HEADER([config.h])
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/docs/QUICKSTART
^
|
@@ -54,9 +54,9 @@
--------------------------------------
#> cd /tmp
-#> wget "http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.3.0.tar.gz"
-#> tar zxf mod_gearman-1.3.0.tar.gz
-#> cd mod_gearman-1.3.0
+#> wget "http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.3.4.tar.gz"
+#> tar zxf mod_gearman-1.3.4.tar.gz
+#> cd mod_gearman-1.3.4
#> ./configure --prefix=/opt --with-gearman=/opt --with-user=nagios --with-init-dir=/etc/init.d
#> make
#> make install
@@ -120,7 +120,7 @@
--------------------------------------
#> grep mod_gearman /var/log/nagios3/nagios.log
-[1295003042] mod_gearman: Version 1.3.0
+[1295003042] mod_gearman: Version 1.3.4
[1295003042] Event broker module '/opt/lib/mod_gearman/mod_gearman.o' initialized successfully.
--------------------------------------
@@ -154,7 +154,7 @@
--------------------------------------
#> /opt/bin/check_gearman -H localhost -q worker_`hostname` -t 10 -s check
-check_gearman OK - debian64 has 1 worker and is working on 0 jobs. Version: 1.3.0|worker=1 jobs=2c
+check_gearman OK - debian64 has 1 worker and is working on 0 jobs. Version: 1.3.4|worker=1 jobs=2c
--------------------------------------
The interesting number is the last one, '2c' in our case, which means there
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/docs/QUICKSTART.html
^
|
@@ -614,9 +614,9 @@
<div class="listingblock">
<div class="content">
<pre><tt>#> cd /tmp
-#> wget "http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.3.0.tar.gz"
-#> tar zxf mod_gearman-1.3.0.tar.gz
-#> cd mod_gearman-1.3.0
+#> wget "http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.3.4.tar.gz"
+#> tar zxf mod_gearman-1.3.4.tar.gz
+#> cd mod_gearman-1.3.4
#> ./configure --prefix=/opt --with-gearman=/opt --with-user=nagios --with-init-dir=/etc/init.d
#> make
#> make install
@@ -674,7 +674,7 @@
<div class="listingblock">
<div class="content">
<pre><tt>#> grep mod_gearman /var/log/nagios3/nagios.log
-[1295003042] mod_gearman: Version 1.3.0
+[1295003042] mod_gearman: Version 1.3.4
[1295003042] Event broker module '/opt/lib/mod_gearman/mod_gearman.o' initialized successfully.</tt></pre>
</div></div>
</div>
@@ -701,7 +701,7 @@
<div class="listingblock">
<div class="content">
<pre><tt>#> /opt/bin/check_gearman -H localhost -q worker_`hostname` -t 10 -s check
-check_gearman OK - debian64 has 1 worker and is working on 0 jobs. Version: 1.3.0|worker=1 jobs=2c</tt></pre>
+check_gearman OK - debian64 has 1 worker and is working on 0 jobs. Version: 1.3.4|worker=1 jobs=2c</tt></pre>
</div></div>
<div class="paragraph"><p>The interesting number is the last one, <em>2c</em> in our case, which means there
have been already 2 jobs executed by this worker.</p></div>
@@ -741,7 +741,7 @@
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Last updated 2012-04-27 16:47:02 CEST
+Last updated 2012-06-19 14:58:18 CEST
</div>
</div>
</body>
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/docs/README.html
^
|
@@ -640,8 +640,7 @@
<div class="ulist"><ul>
<li>
<p>
-Latest stable
- <a href="http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.3.0.tar.gz">version 1.3.0</a>, released April 27 2012
+Latest stable <a href="http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.3.4.tar.gz">version 1.3.4</a>, released June 19 2012
</p>
</li>
<li>
@@ -671,7 +670,7 @@
</li>
<li>
<p>
-SLES/RHEL users should use the <a href="http://mod-gearman.org/download/">prebuild packages</a>
+SLES/RHEL/Centos users should use the <a href="http://mod-gearman.org/download/">prebuild packages</a>
</p>
</li>
</ul></div>
@@ -696,7 +695,7 @@
</li>
<li>
<p>
-<a href="http://www.nagios-portal.org">german nagios portal</a>
+<a href="http://www.monitoring-portal.org">german monitoring portal</a>
</p>
</li>
<li>
@@ -825,6 +824,22 @@
worker in the same network (or even on the same host) to reduce your
load on the Nagios box. Therefor we just enable hosts, services and
eventhandler on the server and the worker.</p></div>
+<div class="paragraph"><p>Pro:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+reduced load on your monitoring box
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>Contra:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+no failover
+</p>
+</li>
+</ul></div>
<h3 id="_distributed_monitoring">Distributed Monitoring</h3><div style="clear:left"></div>
<a title="Distributed Monitoring" rel="lightbox[mod_gm]" href="http://labs.consol.de/wp-content/uploads/2010/09/sample_distributed.png"><img src="http://labs.consol.de/wp-content/uploads/2010/09/sample_distributed.png" alt="Distributed Monitoring" width="350" height="125" style="float:none" /></a>
<div class="paragraph"><p>If your checks have to be run from different network segments, then
@@ -832,10 +847,57 @@
for specific worker. The general hosts and services queue is disabled
for this worker and just the hosts and services from the given
hostgroup will be processed.</p></div>
+<div class="paragraph"><p>Pro:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+reduced load on your monitoring box
+</p>
+</li>
+<li>
+<p>
+ability to access remote networks
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>Contra:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+no failover
+</p>
+</li>
+</ul></div>
<h3 id="_distributed_monitoring_with_load_balancing">Distributed Monitoring with Load Balancing</h3><div style="clear:left"></div>
<a title="Distributed Monitoring with Load Balancing" rel="lightbox[mod_gm]" href="http://labs.consol.de/wp-content/uploads/2010/09/sample_distributed_load_balanced.png"><img src="http://labs.consol.de/wp-content/uploads/2010/09/sample_distributed_load_balanced.png" alt="Distributed Monitoring with Load Balancing" width="350" height="225" style="float:none" /></a>
<div class="paragraph"><p>Your distributed setup could easily be extended to a load balanced
setup with just adding more worker of the same config.</p></div>
+<div class="paragraph"><p>Pro:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+reduced load on your monitoring box
+</p>
+</li>
+<li>
+<p>
+ability to access remote networks
+</p>
+</li>
+<li>
+<p>
+automatic failover and load balancing for worker
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>Contra:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+no failover for the master
+</p>
+</li>
+</ul></div>
<h3 id="_nsca_replacement">NSCA Replacement</h3><div style="clear:left"></div>
<a title="NSCA Replacement" rel="lightbox[mod_gm]" href="http://labs.consol.de/wp-content/uploads/2010/09/nsca_replacement.png"><img src="http://labs.consol.de/wp-content/uploads/2010/09/nsca_replacement.png" alt="NSCA Replacement" width="300" height="220" style="float:none" /></a>
<div class="paragraph"><p>If you just want to replace a current NSCA solution, you could load
@@ -844,8 +906,51 @@
send_gearman / send_multi. Make sure you use the same encryption
settings like the neb module or your core won’t be able to process the
results or use the <em>accept_clear_results</em> option.</p></div>
+<div class="paragraph"><p>Pro:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+easy to setup in existing environments
+</p>
+</li>
+</ul></div>
+<h3 id="_distributed_setup_with_remote_scheduler">Distributed Setup With Remote Scheduler</h3><div style="clear:left"></div>
+<a title="Distributed Setup With Remote Scheduler" rel="lightbox[mod_gm]" href="http://labs.consol.de/wp-content/uploads/2010/09/advanced_distributed.png"><img src="http://labs.consol.de/wp-content/uploads/2010/09/advanced_distributed.png" alt="Distributed Setup With Remote Scheduler" width="360" height="270" style="float:none" /></a>
+<div class="paragraph"><p>In case your network is unstable or you need a gui view from the
+remote location or any other reason which makes a remote core
+unavoidable you may want this setup. Thist setup consists of 2
+independent Mod-Gearman setups and the slave worker just send their
+results to the master via the <em>dup_server</em> option. The master
+objects configuration must contain all slave services and hosts.
+The configuration sync is not part of Mod-Gearman.</p></div>
+<div class="paragraph"><p>Pro:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+independent from network outtakes
+</p>
+</li>
+<li>
+<p>
+local view
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>Contra:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+more complex setup
+</p>
+</li>
+<li>
+<p>
+requires configuration sync
+</p>
+</li>
+</ul></div>
<h3 id="_gearman_proxy">Gearman Proxy</h3><div style="clear:left"></div>
-<a title="Gearman Proxy" rel="lightbox[mod_gm]" href="http://labs.consol.de/wp-content/uploads/2010/09/gearman_proxy.png"><img src="http://labs.consol.de/wp-content/uploads/2010/09/gearman_proxy.png" alt="Gearman Proxy" width="300" height="220" style="float:none" /></a>
+<a title="Gearman Proxy" rel="lightbox[mod_gm]" href="http://labs.consol.de/wp-content/uploads/2010/09/gearman_proxy.png"><img src="http://labs.consol.de/wp-content/uploads/2010/09/gearman_proxy.png" alt="Gearman Proxy" width="360" height="270" style="float:none" /></a>
<div class="paragraph"><p>Sometimes you may need to reverse the direction of the initial
connection attempt. Usually the worker and the neb module open the
initial connection so they need to access the gearmand port. In cases
@@ -854,6 +959,27 @@
gearmand and vice versa.</p></div>
<div class="paragraph"><p>Just copy the gearman_proxy.pl from the contrib or share directory and
adjust the first few lines to match you needs.</p></div>
+<div class="paragraph"><p>Pro:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+changes direction of initial connection setup
+</p>
+</li>
+<li>
+<p>
+buffers network outages
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>Contra:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+two more daemon to monitor and maintain
+</p>
+</li>
+</ul></div>
</div>
<h2 id="_installation">Installation</h2>
<div class="sectionbody">
@@ -882,6 +1008,15 @@
<div class="paragraph"><p>The easy and proper way is to build RPM packages. The following steps
assume a Centos 5.7. Other releases may have different versions but
should behave similar.</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<div class="title">Note</div>
+</td>
+<td class="content">use the <a href="http://mod-gearman.org/download/">prebuild packages</a> if
+available.</td>
+</tr></table>
+</div>
<div class="paragraph"><p>Build/install Gearmand rpms</p></div>
<div class="listingblock">
<div class="content">
@@ -1339,7 +1474,7 @@
</dt>
<dd>
<p>
-Set this to <em>no</em> if you want Mod-Gearman to only take care about
+Set this to <em>no</em> if you want Mod-Gearman to only take care of
servicechecks. No hostchecks will be processed by Mod-Gearman. Use
this option to disable hostchecks and still have the possibility to
use hostgroups for easy configuration of your services.
@@ -1714,6 +1849,23 @@
</div></div>
</dd>
<dt class="hdlist1">
+timeout_result
+</dt>
+<dd>
+<p>
+Defines the return code for timed out checks. Accepted return codes
+are 0 (Ok), 1 (Warning), 2 (Critical) and 3 (Unknown)
+Default: 2
+</p>
+<div class="exampleblock">
+<div class="exampleblock-content">
+<div class="literalblock">
+<div class="content">
+<pre><tt>timeout_result=2</tt></pre>
+</div></div>
+</div></div>
+</dd>
+<dt class="hdlist1">
dup_results_are_passive
</dt>
<dd>
@@ -2202,6 +2354,16 @@
<div class="ulist"><ul>
<li>
<p>
+<a href="http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.3.4.tar.gz">version 1.3.4 - June 19 2012</a>
+</p>
+</li>
+<li>
+<p>
+<a href="http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.3.2.tar.gz">version 1.3.2 - May 27 2012</a>
+</p>
+</li>
+<li>
+<p>
<a href="http://labs.consol.de/wp-content/uploads/2010/09/mod_gearman-1.3.0.tar.gz">version 1.3.0 - April 27 2012</a>
</p>
</li>
@@ -2331,7 +2493,7 @@
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Last updated 2012-04-27 16:50:24 CEST
+Last updated 2012-06-19 16:40:11 CEST
</div>
</div>
</body>
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/etc/mod_gearman_neb.conf.in
^
|
@@ -56,7 +56,7 @@
# queues.
#servicegroups=name1,name2,name3
-# Set this to 'no' if you want Mod-Gearman to only take care about
+# Set this to 'no' if you want Mod-Gearman to only take care of
# servicechecks. No hostchecks will be processed by Mod-Gearman. Use
# this option to disable hostchecks and still have the possibility to
# use hostgroups for easy configuration of your services.
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/etc/mod_gearman_worker.conf.in
^
|
@@ -59,7 +59,7 @@
# queues.
#servicegroups=name1,name2,name3
-# Set this to 'no' if you want Mod-Gearman to only take care about
+# Set this to 'no' if you want Mod-Gearman to only take care of
# servicechecks. No hostchecks will be processed by Mod-Gearman. Use
# this option to disable hostchecks and still have the possibility to
# use hostgroups for easy configuration of your services.
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/extras/standalone_worker.conf
^
|
@@ -136,6 +136,10 @@
# Default: yes
show_error_output=yes
+# timeout_result defines the return code for timed out checks. Accepted return
+# codes are 0 (Ok), 1 (Warning), 2 (Critical) and 3 (Unknown) Default: 2
+timeout_result=2
+
# Use dup_results_are_passive to set if the duplicate result send to the dupserver
# will be passive or active.
# Default is yes (passive).
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/include/check_utils.h
^
|
@@ -94,6 +94,16 @@
/**
*
+ * kill_child_checks
+ *
+ * remove all forked check childs
+ *
+ * @return nothing
+ */
+void kill_child_checks(void);
+
+/**
+ *
* check_alarm_handler
*
* called when a check runs into the timeout
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/include/common.h
^
|
@@ -54,7 +54,7 @@
#define MOD_GM_COMMON_H
/* constants */
-#define GM_VERSION "1.3.0"
+#define GM_VERSION "1.3.4"
#define GM_ENABLED 1
#define GM_DISABLED 0
#define GM_BUFFERSIZE 98304
@@ -93,7 +93,7 @@
#define GM_DEFAULT_JOB_TIMEOUT 60
#define GM_DEFAULT_JOB_RETRIES 1
-#define GM_CHILD_SHUTDOWN_TIMEOUT 30
+#define GM_CHILD_SHUTDOWN_TIMEOUT 10
#define GM_DEFAULT_RESULT_QUEUE "check_results"
#define GM_DEFAULT_IDLE_TIMEOUT 10
#define GM_DEFAULT_MAX_JOBS 1000
@@ -222,6 +222,7 @@
int max_jobs; /**< maximum number of jobs done after a worker exits */
int spawn_rate; /**< number of spawned new worker */
int show_error_output; /**< optional display the stderr output of plugins */
+ int timeout_return; /**< timeout return code */
int dup_results_are_passive; /**< send duplicate results as passive checks */
#ifdef EMBEDDEDPERL
int enable_embedded_perl; /**< enabled embedded perl */
@@ -236,9 +237,13 @@
char * message; /**< message output */
char * host; /**< hostname for this check */
char * service; /**< service description for this check */
+ char * delimiter; /**< delimiter to cut check results */
int active; /**< flag wheter the result is a active or a passive check */
+ int has_starttime; /**< flag when starttime is set */
struct timeval starttime; /**< time when the check started */
+ int has_finishtime; /**< flag when finishtime is set */
struct timeval finishtime; /**< time when the check finished */
+ int has_latency; /**< flag when latency is set */
struct timeval latency; /**< latency for this result */
} mod_gm_opt_t;
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/include/epn_utils.h
^
|
@@ -66,14 +66,28 @@
int init_embedded_perl(char **);
/**
+ * deinit_segv
+ *
+ * sigsegv handler during deinitialzing embedded perl
+ *
+ * @param[in] sig - signal number
+ *
+ * @returns nothing, just exits
+ */
+
+void deinit_segv( int );
+
+/**
* deinit_embedded_perl
*
* deinitialize embedded perl interpreter
*
+ * @param[in] rc - exit code in case deinitializing fails
+ *
* @return true
*/
-int deinit_embedded_perl(void);
+int deinit_embedded_perl(int rc);
/**
* @}
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/include/send_gearman.h
^
|
@@ -91,13 +91,22 @@
/**
* send_result
*
- * create and send back the gearman jobs
+ * extract result
*
* @return TRUE on success or FALSE if something went wrong
*/
int send_result(void);
/**
+ * submit_result
+ *
+ * send back result as gearman job
+ *
+ * @return TRUE on success or FALSE if something went wrong
+ */
+int submit_result(void);
+
+/**
* alarm_sighandler
*
* handles sig alarms
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/neb_module/result_thread.c
^
|
@@ -137,6 +137,7 @@
* save this result to a file, so when nagios crashes,
* we have at least the crashed package
*/
+#ifdef GM_DEBUG
if(mod_gm_opt->debug_result == GM_ENABLED) {
FILE * fd;
fd = fopen( "/tmp/last_result_received.txt", "w+" );
@@ -145,6 +146,7 @@
fputs( decrypted_data, fd );
fclose( fd );
}
+#endif
/* nagios will free it after processing */
if ( ( chk_result = ( check_result * )malloc( sizeof *chk_result ) ) == 0 ) {
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/support/mod_gearman.spec
^
|
@@ -1,5 +1,5 @@
Name: mod_gearman
-Version: 1.3.0
+Version: 1.3.4
Release: 1%{?dist}
License: GNU Public License version 2
Packager: Sven Nierlein <sven.nierlein@consol.de>
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/t/02-full.c
^
|
@@ -448,7 +448,7 @@
free(error);
/*****************************************
- * send_gearman
+ * send_multi
*/
snprintf(cmd, 150, "./send_multi --server=localhost:%d --host=blah < t/data/send_multi.txt", GEARMAND_TEST_PORT);
rrc = real_exit_code(run_check(cmd, &result, &error));
@@ -488,7 +488,7 @@
endtodo;
#ifdef EMBEDDEDPERL
- deinit_embedded_perl();
+ deinit_embedded_perl(0);
#endif
free(last_result);
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/t/03-exec_checks.c
^
|
@@ -22,7 +22,7 @@
char cmd[120];
char hostname[GM_BUFFERSIZE];
- plan(56);
+ plan(60);
/* set hostname */
gethostname(hostname, GM_BUFFERSIZE-1);
@@ -58,11 +58,10 @@
like(args[3], "foo", "parsing args cmd 2");
/*****************************************
- * send_gearman
+ * send_gearman 1
*/
strcpy(cmd, "./send_gearman --server=blah --key=testtest --host=test --service=test --message=test --returncode=0");
rrc = real_exit_code(run_check(cmd, &result, &error));
- //diag(result);
cmp_ok(rrc, "==", 3, "cmd '%s' returned rc %d", cmd, rrc);
if(atof(gearman_version()) >= 0.31) {
like(result, "send_gearman UNKNOWN:", "result");
@@ -73,12 +72,24 @@
free(error);
/*****************************************
- * send_gearman
+ * send_gearman 2
+ */
+ strcpy(cmd, "./send_gearman --server=blah < t/data/send_gearman_results.txt");
+ rrc = real_exit_code(run_check(cmd, &result, &error));
+ cmp_ok(rrc, "==", 3, "cmd '%s' returned rc %d", cmd, rrc);
+ if(atof(gearman_version()) >= 0.31) {
+ like(result, "send_gearman UNKNOWN:", "result");
+ } else {
+ like(result, "sending job to gearmand failed:", "result");
+ }
+ free(result);
+ free(error);
+
+ /*****************************************
+ * send_multi
*/
- //mod_gm_opt->debug_level = 4;
strcpy(cmd, "./send_multi --server=blah --host=blah < t/data/send_multi.txt");
rrc = real_exit_code(run_check(cmd, &result, &error));
- //diag(result);
cmp_ok(rrc, "==", 3, "cmd '%s' returned rc %d", cmd, rrc);
if(atof(gearman_version()) >= 0.31) {
like(result, "send_multi UNKNOWN:", "result");
@@ -335,6 +346,17 @@
cmp_ok(exec_job->return_code, "==", 0, "cmd '%s' returns rc 0", exec_job->command_line);
like(exec_job->output, "out", "returned result string");
like(exec_job->error, "err", "returned error string");
+ free(exec_job->output);
+ free(exec_job->error);
+
+ /*****************************************
+ * cmd env
+ */
+ free(exec_job->command_line);
+ exec_job->command_line = strdup("BLAH=BLUB ./t/ok.pl");
+ execute_safe_command(exec_job, fork_on_exec, hostname);
+ cmp_ok(exec_job->return_code, "==", 0, "cmd '%s' returns rc 0", exec_job->command_line);
+ like(exec_job->output, "test plugin OK", "returned result string");
/*****************************************
* clean up
@@ -342,7 +364,7 @@
free_job(exec_job);
mod_gm_free_opt(mod_gm_opt);
#ifdef EMBEDDEDPERL
- deinit_embedded_perl();
+ deinit_embedded_perl(0);
#endif
return exit_status();
}
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/t/06-execvp_vs_popen.c
^
|
@@ -36,8 +36,14 @@
gm_job_t * exec_job;
exec_job = ( gm_job_t * )malloc( sizeof *exec_job );
set_default_job(exec_job, mod_gm_opt);
- strcpy(cmd, "/bin/hostname;");
+ strcpy(cmd, "BLAH=BLUB /bin/hostname");
+ printf("this should be popen\n");
+ run_check(cmd, &result, &error);
+ free(result);
+ free(error);
+ strcpy(cmd, "/bin/hostname");
+ printf("this should be execvp\n");
run_check(cmd, &result, &error);
free(result);
free(error);
@@ -53,7 +59,7 @@
free_job(exec_job);
mod_gm_free_opt(mod_gm_opt);
#ifdef EMBEDDEDPERL
- deinit_embedded_perl();
+ deinit_embedded_perl(0);
#endif
exit(0);
}
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/t/07-epn.c
^
|
@@ -97,7 +97,7 @@
* clean up
*/
mod_gm_free_opt(mod_gm_opt);
- deinit_embedded_perl();
+ deinit_embedded_perl(0);
return exit_status();
#endif
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/t/benchmark.t
^
|
@@ -14,62 +14,58 @@
chomp(my $gearmand = `which gearmand 2>/dev/null`);
isnt($gearmand, '', 'gearmand present: '.$gearmand) or BAIL_OUT("no gearmand");
-system("$gearmand --port $TESTPORT --pid-file=./gearman.pid -d");
+system("$gearmand --port $TESTPORT --pid-file=./gearman.pid -d --log-file=/tmp/gearmand_bench.log");
chomp(my $gearmand_pid = `cat ./gearman.pid`);
isnt($gearmand_pid, '', 'gearmand running: '.$gearmand_pid) or BAIL_OUT("no gearmand");
# fill the queue
+open(my $ph, "|./send_gearman --server=localhost:$TESTPORT --result_queue=eventhandler") or die("failed to open send_gearman: $!");
my $t0 = [gettimeofday];
for my $x (1..$NR_TST_JOBS) {
- `./send_gearman --server=localhost:$TESTPORT --host=test --message="test" --result_queue=eventhandler`;
+ print $ph "hostname\t1\ttest\n";
}
+close($ph);
my $elapsed = tv_interval ( $t0 );
my $rate = int($NR_TST_JOBS / $elapsed);
ok($elapsed, 'filling gearman queue with '.$NR_TST_JOBS.' jobs took: '.$elapsed.' seconds');
-ok($rate > 100, 'fill rate '.$rate.'/s');
-
-#diag(`./gearman_top -b -H localhost:$TESTPORT`);
+ok($rate > 500, 'fill rate '.$rate.'/s');
# now clear the queue
`>worker.log`;
$t0 = [gettimeofday];
-system("./mod_gearman_worker --server=localhost:$TESTPORT --debug=0 --max-worker=1 --encryption=off --p1_file=./worker/mod_gearman_p1.pl --daemon --pidfile=./worker.pid --logfile=./worker.log");
-chomp(my $worker_pid = `cat ./worker.pid`);
+my $cmd = "./mod_gearman_worker --server=localhost:$TESTPORT --debug=0 --max-worker=1 --encryption=off --p1_file=./worker/mod_gearman_p1.pl --daemon --pidfile=./worker.pid --logfile=./worker.log";
+system($cmd);
+chomp(my $worker_pid = `cat ./worker.pid 2>/dev/null`);
isnt($worker_pid, '', 'worker running: '.$worker_pid);
-while(get_queue("eventhandler")->{'waiting'} != 0) {
- sleep(0.1);
-}
+wait_for_empty_queue("eventhandler");
$elapsed = tv_interval ( $t0 );
$rate = int($NR_TST_JOBS / $elapsed);
ok($elapsed, 'cleared gearman queue in '.$elapsed.' seconds');
-ok($rate > 500, 'clear rate '.$rate.'/s');
-
-#diag(`./gearman_top -b -H localhost:$TESTPORT`);
+ok($rate > 300, 'clear rate '.$rate.'/s');
# clean up
`kill $worker_pid`;
`kill $gearmand_pid`;
+unlink("/tmp/gearmand_bench.log");
exit(0);
#################################################
-sub get_queue {
+sub wait_for_empty_queue {
my $queue = shift;
- my $out = `./gearman_top -b -H localhost:$TESTPORT`;
- if($out =~ m/^\s*$queue\s*\|\s*(\d+)\s*\|\s*(\d+)\s*\|\s*(\d+)/mx) {
- return({
- worker => $1,
- waiting => $2,
- running => $3,
- });
+ open(my $ph, "./gearman_top -b -i 0.1 -H localhost:$TESTPORT |") or die("cannot launch gearman_top: $!");
+ while(my $line = <$ph>) {
+ if($line =~ m/^\s*$queue\s*\|\s*(\d+)\s*\|\s*(\d+)\s*\|\s*(\d+)/mx) {
+ my $worker = $1;
+ my $waiting = $2;
+ my $running = $3;
+ if($running == 0 and $waiting == 0) {
+ close($ph);
+ return;
+ }
+ };
}
- return({
- worker => -1,
- waiting => -1,
- running => -1,
- });
}
-
|
[-]
[+]
|
Added |
mod_gearman-1.3.4.tar.bz2/t/data/send_gearman_results.txt
^
|
@@ -0,0 +1,4 @@
+host_name svc_description 0 plugin_output
+host_name svc_description 0 plugin_output
+host_name 1 plugin_output
+host_name 1 plugin_output
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/tools/gearman_top.c
^
|
@@ -26,10 +26,10 @@
#include "utils.h"
#include "gearman_utils.h"
-int opt_verbose = GM_DISABLED;
-int opt_quiet = GM_DISABLED;
-int opt_batch = GM_DISABLED;
-int opt_interval = 1;
+int opt_verbose = GM_DISABLED;
+int opt_quiet = GM_DISABLED;
+int opt_batch = GM_DISABLED;
+double opt_interval = 0;
char * server_list[GM_LISTSIZE];
int server_list_num = 0;
@@ -59,7 +59,7 @@
break;
case 'q': opt_quiet = GM_ENABLED;
break;
- case 'i': opt_interval = atoi(optarg);
+ case 'i': opt_interval = atof(optarg) * 1000000;
break;
case 'b': opt_batch = GM_ENABLED;
break;
@@ -74,18 +74,25 @@
server_list[server_list_num++] = "localhost";
server_list[server_list_num] = NULL;
- if(opt_interval <= 0)
- opt_interval = 1;
-
signal(SIGINT, clean_exit);
signal(SIGTERM,clean_exit);
/* in batch mode, print stats once and exit */
if(opt_batch == GM_ENABLED) {
- print_stats(server_list[0]);
+ if(opt_interval > 0) {
+ while(1) {
+ print_stats(server_list[0]);
+ usleep(opt_interval);
+ }
+ } else {
+ print_stats(server_list[0]);
+ }
clean_exit(0);
}
+ if(opt_interval <= 0)
+ opt_interval = 1000000;
+
/* init curses */
w = initscr();
cbreak();
@@ -97,7 +104,7 @@
if(getch() == 'q')
clean_exit(0);
print_stats(server_list[0]);
- sleep(opt_interval);
+ usleep(opt_interval);
}
clean_exit(0);
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/tools/send_gearman.c
^
|
@@ -28,6 +28,7 @@
gearman_client_st client;
gearman_client_st client_dup;
+int results_sent = 0;
/* work starts here */
int main (int argc, char **argv) {
@@ -73,6 +74,7 @@
if( mod_gm_opt->dupserver_num )
gearman_client_free( &client_dup );
mod_gm_free_opt(mod_gm_opt);
+
exit( rc );
}
@@ -158,6 +160,9 @@
printf("\n");
printf(" [ --server=<server> ]\n");
printf("\n");
+ printf(" [ --timeout|-t=<timeout> ]\n");
+ printf(" [ --delimiter|-d=<delimiter> ]\n");
+ printf("\n");
printf(" [ --encryption=<yes|no> ]\n");
printf(" [ --key=<string> ]\n");
printf(" [ --keyfile=<file> ]\n");
@@ -175,58 +180,141 @@
printf(" [ --latency=<seconds> ]\n");
printf("\n");
printf("plugin output is read from stdin unless --message is used.\n");
+ printf("Use this mode when plugin has multiple lines of plugin output.\n");
+ printf("\n");
+ printf("Note: When using a delimiter (-d) you may also submit one result\n");
+ printf(" for each line.\n");
+ printf(" Service Checks:\n");
+ printf(" <host_name>[tab]<svc_description>[tab]<return_code>[tab]<plugin_output>[newline]\n");
+ printf("\n");
+ printf(" Host Checks:\n");
+ printf(" <host_name>[tab]<return_code>[tab]<plugin_output>[newline]\n");
printf("\n");
printf("see README for a detailed explaination of all options.\n");
printf("\n");
+ mod_gm_free_opt(mod_gm_opt);
exit( STATE_UNKNOWN );
}
/* send message to job server */
int send_result() {
- struct timeval now;
char buffer[GM_BUFFERSIZE] = "";
- char * buf;
- char temp_buffer1[GM_BUFFERSIZE];
- char temp_buffer2[GM_BUFFERSIZE];
int size;
+ char *ptr1, *ptr2, *ptr3, *ptr4;
gm_log( GM_LOG_TRACE, "send_result()\n" );
- gettimeofday(&now, NULL);
- if(mod_gm_opt->starttime.tv_sec == 0)
- mod_gm_opt->starttime = now;
-
- if(mod_gm_opt->finishtime.tv_sec == 0)
- mod_gm_opt->finishtime = now;
-
if(mod_gm_opt->result_queue == NULL) {
printf( "got no result queue, please use --result_queue=...\n" );
return( STATE_UNKNOWN );
}
+
+ /* multiple results */
if(mod_gm_opt->host == NULL) {
- printf("got no hostname, please use --host=...\n" );
- return( STATE_UNKNOWN );
+ while(fgets(buffer,sizeof(buffer)-1,stdin)) {
+ if(feof(stdin))
+ break;
+
+ /* disable alarm */
+ alarm(0);
+
+ /* read host_name */
+ ptr1=strtok(buffer,mod_gm_opt->delimiter);
+ if(ptr1==NULL)
+ continue;
+
+ /* get the service description or return code */
+ ptr2=strtok(NULL,mod_gm_opt->delimiter);
+ if(ptr2==NULL)
+ continue;
+
+ /* get the return code or plugin output */
+ ptr3=strtok(NULL,mod_gm_opt->delimiter);
+ if(ptr3==NULL)
+ continue;
+
+ /* get the plugin output - if NULL, this is a host check result */
+ ptr4=strtok(NULL,"\n");
+
+ free(mod_gm_opt->host);
+ if(mod_gm_opt->service != NULL) {
+ free(mod_gm_opt->service);
+ mod_gm_opt->service = NULL;
+ }
+ free(mod_gm_opt->message);
+
+ /* host result */
+ if(ptr4 == NULL) {
+ mod_gm_opt->host = strdup(ptr1);
+ mod_gm_opt->return_code = atoi(ptr2);
+ mod_gm_opt->message = strdup(ptr3);
+ } else {
+ /* service result */
+ mod_gm_opt->host = strdup(ptr1);
+ mod_gm_opt->service = strdup(ptr2);
+ mod_gm_opt->return_code = atoi(ptr3);
+ mod_gm_opt->message = strdup(ptr4);
+ }
+ if(submit_result() == STATE_OK) {
+ results_sent++;
+ } else {
+ printf("failed to send result!\n");
+ return(STATE_UNKNOWN);
+ }
+ }
+ printf("%d data packet(s) sent to host successfully.\n",results_sent);
+ return(STATE_OK);
}
- if(mod_gm_opt->message == NULL) {
- /* get all lines from stdin, wait maximum of 5 seconds */
- alarm(5);
+ /* multi line plugin output */
+ else if(mod_gm_opt->message == NULL) {
+ /* get all lines from stdin */
+ alarm(mod_gm_opt->timeout);
mod_gm_opt->message = malloc(GM_BUFFERSIZE);
strcpy(buffer,"");
size = GM_MAX_OUTPUT;
while(size > 0 && fgets(buffer,sizeof(buffer)-1,stdin)){
+ alarm(0);
strncat(mod_gm_opt->message, buffer, size);
size -= strlen(buffer);
}
alarm(0);
}
+ return(submit_result());
+}
+
+/* submit result */
+int submit_result() {
+ char * buf;
+ char temp_buffer1[GM_BUFFERSIZE];
+ char temp_buffer2[GM_BUFFERSIZE];
+ struct timeval now;
+ struct timeval starttime;
+ struct timeval finishtime;
+
+ gettimeofday(&now, NULL);
+ if(mod_gm_opt->has_starttime == FALSE) {
+ starttime = now;
+ } else {
+ starttime = mod_gm_opt->starttime;
+ }
+
+ if(mod_gm_opt->has_finishtime == FALSE) {
+ finishtime = now;
+ } else {
+ finishtime = mod_gm_opt->finishtime;
+ }
+
+ if(mod_gm_opt->has_latency == FALSE) {
+ mod_gm_opt->latency.tv_sec = 0;
+ mod_gm_opt->latency.tv_usec = 0;
+ }
/* escape newline */
buf = gm_escape_newlines(mod_gm_opt->message, GM_DISABLED);
free(mod_gm_opt->message);
- mod_gm_opt->message = malloc(GM_BUFFERSIZE);
- snprintf(mod_gm_opt->message, GM_BUFFERSIZE, "%s", buf);
+ mod_gm_opt->message = strdup(buf);
free(buf);
gm_log( GM_LOG_TRACE, "queue: %s\n", mod_gm_opt->result_queue );
@@ -234,10 +322,10 @@
snprintf( temp_buffer1, sizeof( temp_buffer1 )-1, "type=%s\nhost_name=%s\nstart_time=%i.%i\nfinish_time=%i.%i\nlatency=%i.%i\nreturn_code=%i\n",
mod_gm_opt->active == GM_ENABLED ? "active" : "passive",
mod_gm_opt->host,
- (int)mod_gm_opt->starttime.tv_sec,
- (int)mod_gm_opt->starttime.tv_usec,
- (int)mod_gm_opt->finishtime.tv_sec,
- (int)mod_gm_opt->finishtime.tv_usec,
+ (int)starttime.tv_sec,
+ (int)starttime.tv_usec,
+ (int)finishtime.tv_sec,
+ (int)finishtime.tv_usec,
( int )mod_gm_opt->latency.tv_sec,
( int )mod_gm_opt->latency.tv_usec,
mod_gm_opt->return_code
@@ -304,7 +392,7 @@
void alarm_sighandler(int sig) {
gm_log( GM_LOG_TRACE, "alarm_sighandler(%i)\n", sig );
- printf("got no input! Either send plugin output to stdin or use --message=...\n");
+ printf("got no input after %i seconds! Either send plugin output to stdin or use --message=...\n", mod_gm_opt->timeout);
exit( STATE_UNKNOWN );
}
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/tools/send_multi.c
^
|
@@ -182,7 +182,7 @@
printf("\n");
printf(" [ --host=<hostname> ]\n");
printf(" [ --result_queue=<queue> ]\n");
- printf(" default:result_queue \n");
+ printf(" default:check_results \n");
printf(" [ --timeout=<seconds> ]\n");
printf("\n");
printf("For details see\n");
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/worker/worker.c
^
|
@@ -631,7 +631,7 @@
for(x=3; x < mod_gm_opt->max_worker+4; x++) {
curpid = shm[x];
if(curpid < 0) { curpid = -curpid; }
- if( curpid != 0 ) {
+ if( curpid != 0 && curpid != 1 ) {
kill(curpid, SIGTERM);
}
}
@@ -659,11 +659,15 @@
for(x=3; x < mod_gm_opt->max_worker+4; x++) {
curpid = shm[x];
if(curpid < 0) { curpid = -curpid; }
- if( curpid != 0 ) {
+ if( curpid != 0 && curpid != 1 ) {
kill(curpid, SIGINT);
}
}
+ /* wait 3 more seconds*/
+ if(current_number_of_workers > 0)
+ sleep(3);
+
while((chld = waitpid(-1, &status, WNOHANG)) != -1 && chld > 0) {
gm_log( GM_LOG_TRACE, "wait() %d exited with %d\n", chld, status);
}
|
[-]
[+]
|
Changed |
mod_gearman-1.3.4.tar.bz2/worker/worker_client.c
^
|
@@ -143,7 +143,6 @@
/* get a job */
void *get_job( gearman_job_st *job, void *context, size_t *result_size, gearman_return_t *ret_ptr ) {
sigset_t block_mask;
- sigset_t old_mask;
int wsize, valid_lines;
char workload[GM_BUFFERSIZE];
char * decrypted_data;
@@ -174,7 +173,7 @@
/* ignore sigterms while running job */
sigemptyset(&block_mask);
sigaddset(&block_mask, SIGTERM);
- sigprocmask(SIG_BLOCK, &block_mask, &old_mask);
+ sigprocmask(SIG_BLOCK, &block_mask, NULL);
/* get the data */
current_gearman_job = job;
@@ -271,7 +270,7 @@
current_gearman_job = NULL;
/* start listening to SIGTERMs */
- sigprocmask(SIG_SETMASK, &old_mask, NULL);
+ sigprocmask(SIG_UNBLOCK, &block_mask, NULL);
free(decrypted_orig);
free(decrypted_data_c);
@@ -478,8 +477,14 @@
/* clear gearmans job, otherwise it would be retried and retried */
if(current_gearman_job != NULL) {
- send_failed_result(current_job, sig);
- gearman_job_send_complete(current_gearman_job, NULL, 0);
+ if(sig == 2) {
+ /* if worker stopped with sigint, let the job retry */
+ } else {
+ send_failed_result(current_job, sig);
+ gearman_job_send_complete(current_gearman_job, NULL, 0);
+ }
+ /* make sure no processes are left over */
+ kill_child_checks();
}
gm_log( GM_LOG_TRACE, "cleaning worker\n");
@@ -490,7 +495,7 @@
mod_gm_free_opt(mod_gm_opt);
#ifdef EMBEDDEDPERL
- deinit_embedded_perl();
+ deinit_embedded_perl(0);
#endif
if(worker_run_mode == GM_WORKER_STANDALONE)
|