A ps result question referring to httpd

In another forum, a question about the reason several httpd processes are running came up.
After looking at the Activity Monitor, I dug deeper and got some strange (to me, anyway) results.

With File and Web Sharing off here's a typical line from ps -Alj | grep httpd
70 497 496 104 0 31 0 2702048 1904 - S 70b32e0 ?? 0:00.04 httpd --v _www 496 712c248 0 ??

My question is - what is that ' --v ' result?
I believe that the _www is the owner, but I have never seen that --v

Here is the line from the same command when the Apache server is running:
0 28 1 4004 0 31 0 2701012 3820 - Ss 70ba2b0 ?? 0:00.57 /usr/sbin/httpd root 28 7129c30 0 ??

and I understand that result but not the first.

I am going to postulate a surmise that since the corresponding column in the normal output is the path to the actual binary, that the --v has something to do with the process being virtual and not having a home, so to speak.

My curiosity is unending.

Message was edited by: nerowolfe

MacBookPro3,1-17"Core2Duo/VistaUlt64SP1; MacBookPro1,1-15"/XPProSP3; Dual G5/XPP, Mac OS X (10.5.5), Homebrew 3GHz ASUS PC, Dell Inspiron8k

Posted on Oct 17, 2008 8:56 AM

Reply
4 replies

Oct 17, 2008 4:26 PM in response to Thomas Gutzmann

Thomas Gutzmann wrote:
If you shut down web sharing, there should be no httpd process any more.

"httpd --v" looks like the beginning of "httpd --version" which is not valid for the version running on MacOSX.

I suggest that you look for any files opened by this pid with "lsof -p 497" (497 was the pid in your example). This may give you more information.


Strangely, they are not here today. Only the usual one which does go away when I turn off the server.
It's something I will follow up from time to time.

Oct 17, 2008 4:30 PM in response to BobHarris

BobHarris wrote:
Try using:

ps -axlww | grep httpd

It will give you a much longer line of output to work with.


Thanks. As noted in my other post, those strange httpds are not here today.
With the server running I get several, with the server off they all disappear.
And all the ones I see today are normal

Server on:
ps -axlww | grep httpd
0 1738 1 4004 0 31 0 2701012 3836 - Ss 77070c0 ?? 0:00.43 /usr/sbin/httpd -D FOREGROUND
70 1742 1738 104 0 31 0 2701012 1660 - S 77036f0 ?? 0:00.01 /usr/sbin/httpd -D FOREGROUND
70 1752 1738 104 0 31 0 2701012 1656 - S 7705bf0 ?? 0:00.01 /usr/sbin/httpd -D FOREGROUND
70 1754 1738 104 0 31 0 2701012 1616 - S 77044d0 ?? 0:00.01 /usr/sbin/httpd -D FOREGROUND
70 1828 1738 104 0 31 0 2701012 1608 - S 7703000 ?? 0:00.00 /usr/sbin/httpd -D FOREGROUND
70 1832 1738 104 0 31 0 2701012 1604 - S ba019d0 ?? 0:00.00 /usr/sbin/httpd -D FOREGROUND
70 1833 1738 104 0 31 0 2701012 1600 - S 70bb2e0 ?? 0:00.01 /usr/sbin/httpd -D FOREGROUND

Server off:
nothing

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

A ps result question referring to httpd

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.