Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to trace which file or process or database query is effecting the load on a VPS?

I am using Centos with 512 MB Guarantee Memory and 1 GB burst Memory, I am running 3 wordpress sites from it, where all are having daily traffic of 30-100 visitors each,

After every 2-3 days I need to restart my VPS because the resources are taking high usage of memory,

I tried running top command and it shows Apache as high,

But is it possible to check which website is taking load?

Here is my 'top -c' command output results enter image description here

share|improve this question

You could set up each wordpress site as a virtual host, and give them each seperate logfiles.
This will make it easier to see what's happening to each wordpress site.

Perhaps you could use AWStats to analyze the Apache logs and get some meaningful data back.

share|improve this answer
Is there any way to check which website is having load? I have seen in Cpanels, though I Don't have cpanel, but is it possible? – ntechi Mar 16 '11 at 5:05
I tried installing this on my server, but it extracted somewhere and how to run it? Is their any other to check which website is having more load? – ntechi Mar 16 '11 at 5:39

Or you can set up a monitoring with Nagios with the plugins you can monitor your server. But i could be a bit to much for your vps.

share|improve this answer
Nagios only show that there is a problem, but not the reason, especially in a case like this. – Sven Mar 15 '11 at 11:16
hmm? Then you should look at Nagios ;) with the plugins you can monitor your whole server. With HDD and many more? We use it for whole Server monitoring ;) – Stony Mar 15 '11 at 11:21
Yeah, I know that. But still, Nagios only tells you that the disk is nearly full or the load is high or whatever, which is all nice and great, but the OP knows there is a problem and needs to find the cause for it. Nagios doesn't help with that. – Sven Mar 15 '11 at 11:27
He ask if its possible to find which website or process have the load there are enough plugins for Nagios to monitor this. I use it to monitor processes and Apache processes if the load is high. Nagios Apache2. So we are both right ;) so i said its a bit to much for this problem. – Stony Mar 15 '11 at 11:32
Sorry, but this is nonsense. The plugin tells Nagios that the load is high. Great, but the OP already knows that and he even suspects that some WP site is the culprit. What he needs to find out is what to change to avoid it. How would Nagios help with that? – Sven Mar 15 '11 at 11:44

If you are using mod_php, you may find Tom Boutell's post Faster, PHP! Kill! Kill! helpful. I suspect you would benefit from reducing MaxClients or switching to FastCGI.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.