Running "sudo serivce httpd status" shows only a single process id. The root process. However, if I use top or ps, I can see there are more process than that. Apache is in prefork mode.
Has anyone seen this behavior before from Apache2?
I'd like to understand why the status command can't find the other processes.
The other processess you see in your qa server are the result of the command:
If you check the code for the status function in /etc/init.d/functions, you will see how these results are generated and test why you only see the parent httpd process.
I think is has to be with sudo not working for pidof, try again with the root user.
Does it matter? You're asking if apache is running. The command is telling you that it is. If you kill that process, the others will die too.
I suspect the command could find the others. It just can't be bothered.
Apache has a single control process that is responsible for launching child processes. The processes ID you get from "service httpd status" is the PID of the control process.
I have the same result:
As the others have said, this is the main process ID; any other processes are child processes. If you need information on these, you should install mod_status which allows for ExtendedStatus and pulling all kinds of neat information from Apache.