Find the answer to your Linux question:
Results 1 to 8 of 8
Hi, Can anyone tell me just for curiosity sake how many daemons are running when I start apache server? Thanks, Nik...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    May 2003
    Location
    CA
    Posts
    370

    basic apache query.


    Hi,

    Can anyone tell me just for curiosity sake how many daemons are running when I start apache server?

    Thanks,
    Nik

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    In the RH9 default configuration there are 8 of them. In apache 2.0 you can set it with the StartServers directive. I don't remember how to do it an apache pre-2, though.

  3. #3
    Linux User
    Join Date
    May 2003
    Location
    CA
    Posts
    370
    and I can run an apache webserver as any user right? or does it have to be root? on solaris I was able to run it as any normal user..

  4. #4
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    I believe apache runs as either the use httpd or the user apache by default. Just check with "ps -lp $(pidof httpd)" to find out what user it runs as. The master server always runs as root in order to bind port 80 (which is privileged), but the slave servers, ie. the ones actually responding to requests, can, and by default do, run as a ordinary user.

  5. #5
    Linux Engineer
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    796
    It workes good with this command also

    Code:
    ps -aux |grep http
    
    root     23630  0.0  0.3 75884 3900 ?        S    07:59   0:00 /usr/sbin/httpd -
    apache   23633  0.0  0.4 76144 4392 ?        S    07:59   0:00 /usr/sbin/httpd -
    apache   23634  0.0  0.3 75980 4040 ?        S    07:59   0:00 /usr/sbin/httpd -
    apache   23635  0.0  0.3 75944 3944 ?        S    07:59   0:00 /usr/sbin/httpd -
    apache   23636  0.0  0.3 75944 3944 ?        S    07:59   0:00 /usr/sbin/httpd -
    apache   23637  0.0  0.3 75944 3944 ?        S    07:59   0:00 /usr/sbin/httpd -
    apache   27643  0.0  0.3 75940 3968 ?        S    08:41   0:00 /usr/sbin/httpd -
    apache   27644  0.0  0.3 75940 3968 ?        S    08:41   0:00 /usr/sbin/httpd -
    apache   27645  0.0  0.3 75940 3968 ?        S    08:41   0:00 /usr/sbin/httpd -
    Regards
    Regards

    Andutt

  6. #6
    Linux User
    Join Date
    May 2003
    Location
    CA
    Posts
    370
    Dolda,

    any reason why 8 daemons start automatically? i mean do each of those daemons perform special functions or somethg or is it by design?

  7. #7
    Linux Engineer
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    796
    Apache starts that many processes by default, but i think you can alter that in the httpd.conf how many paralell connections and forks apache should to. There are many things to tune there if you want....

    Regards
    Regards

    Andutt

  8. #8
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    All those processes are identical worker processes. It's often A Good Thing (tm) to spread out tasks over several processes, but the real advantages of doing it that way is for SMP systems, where each process will be running on a seperate CPU, and therefore simultaneously.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •