LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Apache gobbling CPU

[ILUG] Apache gobbling CPU

Vincent Cunniffe vincent at cunniffe.net
Wed Aug 6 09:54:17 IST 2008


Niall O Broin wrote:
> I just encountered an odd situation on a webserver where the load had 
> become rather high, and top was showing me two apache processes each 
> consuming > 45% of CPU. Running strace on one of the processes I saw 
> that it was doing the below (and nothing else, or nothing else 
> strace-able) in a loop:

<snip>

> In all likelihood, this was caused by some piece of PHP gone mad but the 
> question is, what, and how to find out? Given such a situation, is there 
> any way of mapping a particular apache process to a request?

lsof -n|grep httpd|grep TCP|grep -v LISTEN

will tell you what IP address the apache process is connected to, 
assuming it's still connected and handling it. Then you can hunt that 
down in the request logs to find out the URL.

Vin



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell