From: Jeff Trawick Date: Thu, 4 Dec 2003 03:05:42 +0000 (+0000) Subject: Clean up httpd -V output: Instead of displaying the MPM source X-Git-Tag: pre_ajp_proxy~958 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e933536f5a6241fc9d914c471ff7f5896a76b507;p=apache Clean up httpd -V output: Instead of displaying the MPM source directory, display the MPM name and some MPM properties. Submitted by: Geoffrey Young Reviewed by: Jeff Trawick git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101978 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 1c405e5c2b..d1e9cf02a5 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,10 @@ Changes with Apache 2.1.0-dev [Remove entries to the current 2.0 section below, when backported] + *) Clean up httpd -V output: Instead of displaying the MPM source + directory, display the MPM name and some MPM properties. + [Geoffrey Young ] + *) Fixed cache-removal order in mod_mem_cache. [Jean-Jacques Clar, Cliff Woolley] diff --git a/server/main.c b/server/main.c index c404c06467..0731628a9d 100644 --- a/server/main.c +++ b/server/main.c @@ -85,7 +85,46 @@ * Most significant main() global data can be found in http_config.c */ -/* XXX - We should be able to grab the per-MPM settings here too */ +static void show_mpm_settings(void) +{ + int mpm_query_info; + apr_status_t retval; + + printf("Server MPM: %s\n", ap_show_mpm()); + + retval = ap_mpm_query(AP_MPMQ_IS_THREADED, &mpm_query_info); + + if (retval == APR_SUCCESS) { + printf(" threaded: "); + + if (mpm_query_info == AP_MPMQ_DYNAMIC) { + printf("yes (variable thread count)\n"); + } + else if (mpm_query_info == AP_MPMQ_STATIC) { + printf("yes (fixed thread count)\n"); + } + else { + printf("no\n"); + } + } + + retval = ap_mpm_query(AP_MPMQ_IS_FORKED, &mpm_query_info); + + if (retval == APR_SUCCESS) { + printf(" forked: "); + + if (mpm_query_info == AP_MPMQ_DYNAMIC) { + printf("yes (variable process count)\n"); + } + else if (mpm_query_info == AP_MPMQ_STATIC) { + printf("yes (fixed process count)\n"); + } + else { + printf("no\n"); + } + } +} + static void show_compile_settings(void) { printf("Server version: %s\n", ap_get_server_version()); @@ -98,6 +137,9 @@ static void show_compile_settings(void) * consistent */ printf("Architecture: %ld-bit\n", 8 * (long)sizeof(void *)); + + show_mpm_settings(); + printf("Server compiled with....\n"); #ifdef BIG_SECURITY_HOLE printf(" -D BIG_SECURITY_HOLE\n"); @@ -107,10 +149,6 @@ static void show_compile_settings(void) printf(" -D SECURITY_HOLE_PASS_AUTHORIZATION\n"); #endif -#ifdef APACHE_MPM_DIR - printf(" -D APACHE_MPM_DIR=\"%s\"\n", APACHE_MPM_DIR); -#endif - #ifdef HAVE_SHMGET printf(" -D HAVE_SHMGET\n"); #endif