Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Dec 22, 2009 11:16 am 
Offline
Senior Newbie

Joined: Tue Dec 22, 2009 11:11 am
Posts: 8
Hi,

Occasionaly i see some httpd processes running at quite a high CPU usage. What frustrates me is that i cannot see the cause.

I have tried running ps -fe to view the processes and see the cause but all it says is httpd, non the php file that it is running.

I have tried searching around but cant find a solution. I cant believe that there is no way to find out the php script running on the httpd process.

Does anyone know of a way to find this out?

Chris


Top
   
 Post subject:
PostPosted: Tue Dec 22, 2009 11:45 am 
Offline
Senior Member

Joined: Tue Apr 27, 2004 5:10 pm
Posts: 212
Have you checked your access_log? That would most likely be the easiest way to figure out what's going on.


Top
   
 Post subject:
PostPosted: Tue Dec 22, 2009 11:49 am 
Offline
Senior Newbie

Joined: Tue Dec 22, 2009 11:11 am
Posts: 8
well the thing is, i have quite a few servers with lots of different websites on. i could go trawling through all the access logs for each site but it would be a major time saver if i could simply see which script was tied to the process.

Is there anything i cna do with the process id, or in the proc directories?

Chris


Top
   
 Post subject:
PostPosted: Tue Dec 22, 2009 12:02 pm 
Offline
Senior Member

Joined: Tue Apr 27, 2004 5:10 pm
Posts: 212
I'm not sure you can see this information in process listings. However, if you turn on apache mod_status, you should be able to see, in real-time, what requests your server is working on.


Top
   
 Post subject:
PostPosted: Tue Dec 22, 2009 12:17 pm 
Offline
Senior Newbie

Joined: Tue Dec 22, 2009 11:11 am
Posts: 8
Thanx, i'll give that a go.

I dont know if this is real but here:
http://www.experts-exchange.com/OS/Linux/Q_21634652.html

At the bottom i see that someone might have what i am looking for:

They have a top or some sort of process list then they have the site and script used. Is this real?


PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
12950 apache 22 0 16992 16M 7428 D 48.6 0.4 0:07 0 httpd
12912 apache 22 0 16240 15M 7436 S 47.3 0.4 0:07 0 httpd


86-0 12950 0/4/4 _ 7.24 5 0 0.0 0.01 0.01 X.X.X.X webmail.primecare.org GET /src/left_main.php HTTP/1.1
48-0 12912 0/4/4 _ 7.32 5 0 0.0 0.01 0.01 X.X.X.X webmail.primecare.org GET /src/left_main.php HTTP/1.1


Top
   
 Post subject:
PostPosted: Tue Dec 22, 2009 12:23 pm 
Offline
Senior Member

Joined: Tue Apr 27, 2004 5:10 pm
Posts: 212
wardy277 wrote:
86-0 12950 0/4/4 _ 7.24 5 0 0.0 0.01 0.01 X.X.X.X webmail.primecare.org GET /src/left_main.php HTTP/1.1
48-0 12912 0/4/4 _ 7.32 5 0 0.0 0.01 0.01 X.X.X.X webmail.primecare.org GET /src/left_main.php HTTP/1.1

That's a snippet from some sort of access_log.


Top
   
 Post subject:
PostPosted: Wed Dec 23, 2009 5:34 am 
Offline
Senior Newbie

Joined: Tue Dec 22, 2009 11:11 am
Posts: 8
Thanx for your help, that mod_status is just what i need.

Chris


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group