httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ras...@madhaus.utcs.utoronto.ca
Subject Module Information Module
Date Tue, 30 Apr 1996 23:55:24 GMT
I have written a little module in the same style as mod_status which
gives you an idea of which modules are currently linked into the running
httpd.  It wasn't possible to do it without a slight addition to the
Apache 1.1 distribution code.  The patch is quite simple though, I and
hope it will be considered.  I think it is a useful module.  I have
uploaded it to ftp.hyperreal.com:/httpd/incoming/mod_info.tar

You can see it in action by pointing your browser to:

    http://rathaus.utcs.utoronto.ca/info

You can feed it an individual module name with something like:

    http://rathaus.utcs.utoronto.ca/info?dir_module

The patch needed is to the Configure file.  It's in the mod_info.tar
file, but I'll list it here for you guys to pick apart:

*** Configure   Sat Mar 16 16:58:01 1996
--- Configure.new       Tue Apr 30 19:39:07 1996
***************
*** 57,62 ****
--- 57,68 ----
           } \
         print "  NULL"; \
           print "};"; \
+          print "char *module_names[] = {"; \
+          for (i = n-1; i > -1; --i) { \
+              printf "  \"%s\",\n", modules[i]; \
+          } \
+        print "  NULL"; \
+          print "};"; \
     }'
  
  awk >Makefile <$tmpfile '\

It is simply to get a list of names of the modules.  I looked at various
other ways from changing the module structure, to trying to induce things
from the symbol table, but all in all I think this is the least intrusive
method, and it requires no change to the module API.

-Rasmus


Mime
View raw message