You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Gagan Puri <ga...@infosys.com> on 2003/09/08 13:05:14 UTC
getting MPM model of apache web server
Hi All,
I have an application in which I need to check whether the apache server is prefork based or worker MPM based. How can I get the model info from web server in my application. Normal commad line way to check this is by simply giving the command apachectl -V. Is there any apache specific api which gives info regading the MPM model of apache web server server.
Regards,
Gagan
Re: getting MPM model of apache web server
Posted by Jeff Trawick <tr...@attglobal.net>.
Gagan Puri wrote:
> I have an application in which I need to check whether the apache server
>is prefork based or worker MPM based. How can I get the model info from
>web server in my application. Normal commad line way to check this is by
>simply giving the command apachectl -V. Is there any apache specific api
>which gives info regading the MPM model of apache web server server.
see ap_mpm_query() and AP_MPMQ_foo constants in ap_mpm.h
you can't find out whether it is prefork or worker specifically, but you
can find out whether the server forks (both prefork and worker) and
whether the server is threaded (worker but not prefork)...
Re: getting MPM model of apache web server
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
Gagan Puri wrote:
> Hi All,
>
> I have an application in which I need to check whether the apache server
> is prefork based or worker MPM based. How can I get the model info from
> web server in my application. Normal commad line way to check this is by
> simply giving the command apachectl -V. Is there any apache specific api
> which gives info regading the MPM model of apache web server server.
see ap_mpm_query.
for an example of its use, try
http://marc.theaimsgroup.com/?l=apache-httpd-dev&m=106086674806449&w=2
you can also read through this thread
http://marc.theaimsgroup.com/?t=105688560200001&r=1&w=2
for ideas on why it's probably better to test for the existence of threads
as a server property, versus a specific mpm model like worker.
HTH
--Geoff