Linux / UNIX Tech Support Forum
This is a discussion on Query - Apache and PHP within the Web servers forums, part of the Mastering Servers category; Some time when doing Top -d1.... i generally find 2 or 3 httpd process taking a lot CPU Server is ...
Register free or login to your account to remove all advertisements.
|
|||||||
| Web servers Discussion on Apache, Nginx and Lighttpd HTTP/web server and configuration issues. |
![]() |
|
|
Thread Tools | Display Modes |
|
||||
|
Hello,
What I like to do is to use top and sort them by cpu. You can achieve this by invoking top with the -c switch. Code:
[root@radio5 ~]# top -c You will need to setup apache server-status by uncommenting the following lines in httpd.conf. As well as adding ON to a option. A graceful restart is needed on apache. Code:
# ExtendedStatus controls whether Apache will generate "full" status # information (ExtendedStatus On) or just basic information (ExtendedStatus # Off) when the "server-status" handler is called. The default is Off. # ExtendedStatus On Code:
# Allow server status reports, with the URL of http://servername/server-status
# Change the ".your-domain.com" to match your domain to enable.
#
<Location /server-status>
SetHandler server-status
Order deny,allow
Allow from all
# Deny from all
# Allow from .your-domain.com
</Location>
Code:
www.domainame.com/server-status Code:
15-0 4791 0/1967/1967 _ 22.45 7 237 0.0 14.77 14.77 67.72.16.187 www.kyw1060.com GET /pages/1137922.php HTTP/1.0 Also you can use the PID to run a strace on the process. This can help you see what is going on as well. Code:
[root@radio5 ~]# strace -d 1142 Jaysunn Last edited by jaysunn; 7th December 2009 at 08:04 PM. |
![]() |
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Hardware RAID query in rhel3 ES | kumarat9pm | CentOS / RHEL / Fedora | 3 | 24th October 2009 03:01 PM |
| how to fire query for postgre sql via shell script | sunil | Shell scripting | 3 | 15th September 2008 04:56 PM |
| Hard Link Query | sharadgana | Getting started tutorials | 2 | 25th March 2008 12:11 AM |
| a query | kavi | Linux software | 2 | 16th October 2005 06:16 AM |
| BIND 9 and Query-Source | Ashish Pathak | Linux software | 2 | 7th February 2005 12:42 PM |