Question

Having trouble determining which MPM my apache is using, can anyone tell based on following outputs?
My guess is that Prefork is being used?

[root@rp1a ~]# cat /etc/sysconfig/httpd

#HTTPD=/usr/sbin/httpd.worker

#OPTIONS=

#HTTPD_LANG=C
ulimit -n 65000
OPTIONS="-D SetCacheHeaders -D Gzip -D front"

[root@rp1a ~]# tail /etc/httpd/conf.d/rp-base.conf

<IfModule prefork.c>
StartServers       8
MinSpareServers    5
MaxSpareServers   20
ServerLimit      256
MaxClients       256
MaxRequestsPerChild  4000
</IfModule>

[root@rp1a ~]# apachectl -V

Server version: Apache/2.2.3
Server built:   Jun 13 2013 10:45:37
Server's Module Magic Number: 20051115:3
Server loaded:  APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture:   64-bit
Server MPM:     Prefork
threaded:     no
    forked:     yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/etc/httpd"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="run/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"

[root@rp1a ~]# /usr/sbin/httpd -V

Server version: Apache/2.2.3
Server built:   Jun 13 2013 10:45:37
Server's Module Magic Number: 20051115:3
Server loaded:  APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture:   64-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="run/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

[root@rp1a ~]# apachectl -l

Compiled in modules:
  core.c
  prefork.c
  http_core.c
  mod_so.c

[root@rp1a ~]# httpd -l

Compiled in modules:
  core.c
  prefork.c
  http_core.c
  mod_so.c

[root@rp1a ~]# httpd.worker -l

Compiled in modules:
  core.c
  worker.c
  http_core.c
  mod_so.c

[root@rp1a ~]# ps -C httpd.worker -F

UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD

[root@rp1a ~]# ps -C httpd -F | head

UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
root      3947     1  0 63439 12092   0 Jul29 ?        00:00:12 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front
apache   16411  3947  0 64231  8632   1 13:28 ?        00:00:01 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front
apache   16501  3947  0 64231  9372   1 13:32 ?        00:00:01 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front
apache   16662  3947  0 64149  8452   1 13:40 ?        00:00:01 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front
apache   16807  3947  0 64199  8688   1 13:50 ?        00:00:01 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front
apache   16814  3947  0 64147  8452   1 13:51 ?        00:00:01 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front
apache   16836  3947  0 64199  8612   1 13:51 ?        00:00:01 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front
apache   16876  3947  0 64231  9204   1 13:51 ?        00:00:01 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front
apache   16935  3947  0 64139  8452   1 13:54 ?        00:00:01 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front
Was it helpful?

Solution

Server MPM: Prefork

So, yes, prefork seems to be used used. But to be sure that you are looking at the correct binary, try /usr/sbin/httpd -V .

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top