Web Hosting Talk







View Full Version : getting the user from the httpd process


DuncanMcLord
07-28-2002, 04:28 PM
Hi,

if i do a ps auxw and see the following line:


PID TTY STAT TIME COMMAND
11193 ? S 0:00 /usr/local/apache/bin/httpd -DSSL


is there any way i can get the info about what page that process is currently serving? (like "www.domain.com/test.gif")
I mean, if you know WHM, there is a "showcpuusage" function, which exactly does this, but i just don't know how it gets that kind of info.

Thanks,

Duncan

Samuel
07-28-2002, 04:40 PM
The page is using the process under the user so this might be a feature request to tie in the logs to the processes, but really there is such a clear distinction in the timing of the logs and the current (Recent) processes versus a static log entry so wouldn't this be an indication of the complex nature of knowing this?

DuncanMcLord
07-28-2002, 05:08 PM
Ok,
i am sorry, but i really don't understand what you want to say with your post.
Do you mean, that i should be able to get the info from the log files?
...or in order to do so, i would have to change the way the logfiles log the processes?

I just checked again and found the /proc/NUMBER/environ file, which includes some info.
I really have no clue about this, but could this file hold the info i need?

Thanks,

Duncan

Samuel
07-28-2002, 05:14 PM
Not sure to be honest, but my post was just to comment about the nature of the difference in the timing of the actual process and what is causing it, soo... hmm, I am wondering if there can be a cross referrence between the two.

proc/NUMBER/environ file is more than likely highly dynamic and again relating the information contained in that file might preclude the information that you seek, in other words they would never cross the intersection at the same time in any usable visual sense.

DuncanMcLord
07-28-2002, 11:10 PM
ah,
ok...

now that i have just found what i was looking for, i understand ur first post :)

Thanks,

Duncan

Samuel
07-28-2002, 11:14 PM
Ok, you're welcome@! =)