[horde] associating PIDS to requests? (was Re: runaway httpd processes?)
nuno at co.sapo.pt
Mon Jan 29 15:19:20 PST 2007
On Jan 29, 2007, at 22:22, Liam Hoekenga wrote:
>> 20:19:59 up 29 days, 3:14, 1 user, load average: 55.16, 38.82,
>> 412 processes: 403 sleeping, 8 running, 1 zombie, 0 stopped
>> CPU states: 82.5% user, 17.5% system, 0.0% nice, 0.0% idle
>> Mem: 3883356K total, 3865044K used, 18312K free, 207128K
>> Swap: 979924K total, 61724K used, 918200K free, 2434148K
>> PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME
>> 4858 webmail 25 0 29196 28M 24876 R 71.7 0.7 17:39 httpd
>> 27948 webmail 25 0 31888 31M 27104 R 13.5 0.8 6:20 httpd
>> PID REQUEST
>> 4858 GET /kronolith/year.php?year=1104543267 HTTP/1.1
>> 27948 GET /kronolith/year.php?year=1199151268 HTTP/1.1
> Quick question... is there some top like utility that returned this
> output? Or was this generated by searching log files and comparing
> PIDs to log entries?
> I'd love an easy way to associate PIDs to requests!
I'm not sure wether the original was written by me or not, anyway.
I got the association between PIDs and Requests through Apache
"server-status" (mod_status or something).
So what I usually do is a 'top' and a "lynx -dump http://my.server/
server-status" in separate windows. Usually I run top first, then
lynx and I press 'space, q' on 'top' so I'm almost sure that the PIDs
reflect the Requests in question (remember that in most
configurations one apache process processes several requests).
If you run Linux and you want to know what user is being served by
that request, you can also do a "ls -l /proc/<pid>/fd" and edit the
Nuno Loureiro <nuno at co.sapo.pt>
PTMail - DTP/APS/UNX - PT.COM - Portugal Telecom
PGP fingerprint = 8A32 5174 E80C 2D40 9075 405E C107 6592 054A 4D05
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.horde.org/archives/horde/attachments/20070129/c25e8620/PGP.bin
More information about the horde