You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Paul Querna <ch...@force-elite.com> on 2004/06/20 03:49:52 UTC
Dumping Loaded Modules
Attached is patch add a new command line option to httpd:
'-t -D DUMP_MODULES'
This will print a list of all loaded shared modules and all statically
compiled modules.
My only question is, what should the command be called?
'-t -D DUMP_MODULES' vs '-M' vs some other argument.
I based DUMP_MODULES on the existing DUMP_VHOSTS command, but I am not
sure if the DUMP_VHOSTS is supposed to be a standard or not?
-Paul Querna
Re: Dumping Loaded Modules
Posted by Paul Querna <ch...@force-elite.com>.
On Sun, 2004-06-20 at 20:34 -0400, Geoffrey Young wrote:
> > Index: modules/mappers/mod_so.h
> > ===================================================================
> > RCS file: /home/cvspublic/httpd-2.0/modules/mappers/mod_so.h,v
> > retrieving revision 1.1
> > diff -u -r1.1 mod_so.h
> > --- modules/mappers/mod_so.h 4 Jun 2004 22:40:47 -0000 1.1
> > +++ modules/mappers/mod_so.h 20 Jun 2004 01:35:44 -0000
> > @@ -22,6 +22,8 @@
> > /* optional function declaration */
> > APR_DECLARE_OPTIONAL_FN(module *, ap_find_loaded_module_symbol,
> > (server_rec *s, const char *modname));
> > +APR_DECLARE_OPTIONAL_FN(void, ap_dump_loaded_modules,
> > + (apr_pool_t* p, server_rec *s));
>
> out of curiosity, what is the advantage to using the optional function here?
> I am only familiar with it in the mod_include sense, so perhaps I should be
> looking into something like this instead?
The reason it is an optional function is that mod_so is not always
statically compiled into apache. This is an easy way to avoid a bunch
of #defines in main.c trying to tell if mod_so is statically linked in
to httpd.
-Paul Querna
Re: Dumping Loaded Modules
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
Paul Querna wrote:
> Attached is patch add a new command line option to httpd:
> '-t -D DUMP_MODULES'
>
> This will print a list of all loaded shared modules and all statically
> compiled modules.
>
> My only question is, what should the command be called?
>
> '-t -D DUMP_MODULES' vs '-M' vs some other argument.
>
> I based DUMP_MODULES on the existing DUMP_VHOSTS command, but I am not
> sure if the DUMP_VHOSTS is supposed to be a standard or not?
yeah, I guess that's the question. I just did something somewhat similar,
but ended up using a new -option instead.
http://marc.theaimsgroup.com/?l=apache-httpd-dev&m=108693011011443&w=2
there probably ought to be one way of doing this kind of diagnostic thing
and we all should follow suit (whatever it ends up being).
> Index: modules/mappers/mod_so.h
> ===================================================================
> RCS file: /home/cvspublic/httpd-2.0/modules/mappers/mod_so.h,v
> retrieving revision 1.1
> diff -u -r1.1 mod_so.h
> --- modules/mappers/mod_so.h 4 Jun 2004 22:40:47 -0000 1.1
> +++ modules/mappers/mod_so.h 20 Jun 2004 01:35:44 -0000
> @@ -22,6 +22,8 @@
> /* optional function declaration */
> APR_DECLARE_OPTIONAL_FN(module *, ap_find_loaded_module_symbol,
> (server_rec *s, const char *modname));
> +APR_DECLARE_OPTIONAL_FN(void, ap_dump_loaded_modules,
> + (apr_pool_t* p, server_rec *s));
out of curiosity, what is the advantage to using the optional function here?
I am only familiar with it in the mod_include sense, so perhaps I should be
looking into something like this instead?
--Geoff