> I'll work on the real httpd -V
> stuff later this afternoon.

here is the latest patch.  basically, it's the same as what I submitted
before.  the differences are those suggested by stas and jeff - make the
AP_MPMQ_STATIC/DYNAMIC wording a bit better and axe the "-D APACHE_MPM_DIR="
stuff.

so, the output looks like this for worker and prefork.

Server version: Apache/2.1.0-dev
Server built:   Dec  2 2003 03:28:43
Server's Module Magic Number: 20030821:2
Architecture:   32-bit
Server MPM:     Worker
  threaded:     yes (fixed thread count)
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
[etc]

Server version: Apache/2.1.0-dev
Server built:   Dec  2 2003 02:44:12
Server's Module Magic Number: 20030821:2
Architecture:   32-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
[etc]

patch against current 2.1

--Geoff
Index: server/main.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/main.c,v
retrieving revision 1.140.2.3
diff -u -r1.140.2.3 main.c
--- server/main.c       27 Feb 2003 12:09:44 -0000      1.140.2.3
+++ server/main.c       2 Dec 2003 19:15:33 -0000
@@ -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 @@
      * 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");
@@ -105,10 +147,6 @@
 
 #ifdef SECURITY_HOLE_PASS_AUTHORIZATION
     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

Reply via email to