up vote 2 down vote favorite
2
share [g+] share [fb]

How do I tell if apache is running (or configured to run) as prefork or worker?

link|improve this question
or more technically 'compiled to run as' – Simon Nov 24 '09 at 23:54
feedback

2 Answers

up vote 6 down vote accepted

The MPM is configured at compile time. One way to figure it out afterwards is to list compiled in modules. That list will include the chosen MPM. The listing can be accomplished running the apache binary, with the -l flag.

andreas@halleck:~$ apache2 -l
Compiled in modules:
 core.c
 mod_log_config.c
 mod_logio.c
 worker.c
 http_core.c
 mod_so.c
andreas@halleck:~$

Here we find the module worker.c, hence I'm running the worker MPM.

link|improve this answer
feedback

On RHEL/Fedora/etc, run httpd -V. You will get some output which includes the following:

Server version: Apache/2.2.21 (Unix)
     ...
Architecture:   64-bit
Server MPM:     Prefork
     ...

Here 'Server MPM' is 'Prefork', so my server is running the prefork MPM.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown