How to identify the high consumption leak?

  • casius
  • Banned
  • Banned
  • User avatar
  • Joined: Apr 06, 2010
  • Posts: 18
  • Status: Offline

Post April 7th, 2010, 9:17 am

Ok I was just wondering maybe someone can give me an advice. For example there are x amount of users in the server. How to identify which user consumes the most CPU and TCP connections? I have tried to use suPHP wonderful stuff, but the thing is that it eats some resources which I do not want to waste. Any suggestions? Centos 64bit
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post April 7th, 2010, 9:17 am

  • kc0tma
  • o|||||||o
  • Web Master
  • User avatar
  • Joined: Jul 20, 2007
  • Posts: 3318
  • Loc: Trout Creek, MT
  • Status: Offline

Post April 7th, 2010, 10:49 am

The top command will show you resource hogs, it shows the PID and user and other relevant information.
Like Mr Spork, I also write about my interest in alcoholic beverages.
  • casius
  • Banned
  • Banned
  • User avatar
  • Joined: Apr 06, 2010
  • Posts: 18
  • Status: Offline

Post April 7th, 2010, 10:54 am

yes but without extra stuff like suPHP you will not be able to identify the problem. Cause all httpd processes will be shown as apache :)
  • this213
  • Guru
  • Guru
  • User avatar
  • Joined: Mar 01, 2004
  • Posts: 1242
  • Loc: ./
  • Status: Offline

Post April 15th, 2010, 8:13 am

maybe this?

http://crazytoon.com/2008/08/12/apacheh ... g-httptop/
http://www.disabo.com
  • casius
  • Banned
  • Banned
  • User avatar
  • Joined: Apr 06, 2010
  • Posts: 18
  • Status: Offline

Post April 15th, 2010, 8:16 am

Hey thanks this is awesome. Will have something to test in the office :) by the way this script is watching for the all traffic or for every user which uses apache?
  • this213
  • Guru
  • Guru
  • User avatar
  • Joined: Mar 01, 2004
  • Posts: 1242
  • Loc: ./
  • Status: Offline

Post April 15th, 2010, 8:23 am

it'd be by process. The only way to get an actual user attached to that would be to do something that matches user sessions with process IDs.

well... another thing you can do is script your php scripts to log your traffic instead of having your web server do it, then you'd be able to match users to operations and do something proactive.
http://www.disabo.com
  • casius
  • Banned
  • Banned
  • User avatar
  • Joined: Apr 06, 2010
  • Posts: 18
  • Status: Offline

Post April 15th, 2010, 8:31 am

Ok I will try to find some time to examinate it. We actually found the problem about our high consumptions. The problem was is that as free service is running thousands of Chinese comes to the site :) and they are using that stuff like transloaders. This is really crappy stuff which gets CPU to the top. So we have done script which constantly scans for those transloaders and if it detects any then it does suspends the user. So for now we are ok, but your tool would be good for determination other issues with web server consumption.

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 52 guests
  • 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
  • You cannot post attachments in this forum
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.