Portal Home > Knowledgebase > Articles Database > best methods to trace server load


best methods to trace server load




Posted by Calibaba, 09-15-2008, 01:30 PM
I'd like people here to please share their method of tracing server load in this following environment/setting: - shared server with 50+ domains (users) - cpanel/whm box w/ modsuphp enabled - csf/lfd firewall setup Please give as much detail as possible. Thank you.

Posted by servertechs, 09-15-2008, 02:55 PM
You can install nagios

Posted by Calibaba, 09-15-2008, 02:56 PM
I hate nagios personally. I'm referring to tracing it manually via ssh.

Posted by servertechs, 09-15-2008, 03:09 PM
the commands are w top

Posted by Skyhosters, 09-15-2008, 03:12 PM
I found for you: For this purpose Use this Command Examples* To see currently running process ps $ ps To stop any process by PID i.e. to kill process kill {PID} $ kill 1012 To stop processes by name i.e. to kill process killall {Process-name} $ killall httpd To get information about all running process ps -ag $ ps -ag To stop all process except your shell kill 0 $ kill 0 For background processing (With &, use to put certain command and program in background) linux-command & $ ls / -R | wc -l & To display the owner of the processes along with the processes ps aux $ ps aux To see if a certain process is running or not. For this purpose you have to use ps command in combination with the grep command ps ax | grep process-U-want-to see For e.g. you want to see whether Apache web server process is running or not then give command $ ps ax | grep httpd To see currently running processes and other information like memory and CPU usage with real time updates. top See the output of top command. $ top Note that to exit from top command press q. To display a tree of processes pstree $ pstree

Posted by Calibaba, 09-15-2008, 05:19 PM
Let me be a little more detailed. I'm aware of the basic ps, top, ps aux, etc related commands. I would like to know the best, step by step method to trace the server load (manually, not monitoring service) to trace the exact cause of the problem. Running top is not always going to show this indication. Running ps aux gives off a huge output, practically useless unless I'm not understand its purpose.

Posted by DigitalLinx, 09-15-2008, 05:31 PM
Well Would list only pid number and how much cpu time and memory it uses, I usually use this to see the traffic load, you can add | grep -v '0.0' to that command to skip idle processes and see only the ones that are resource hungry.

Posted by servertechs, 09-15-2008, 05:34 PM
install mytop to view mysql overall performance

Posted by WebHostingNeeds, 09-15-2008, 06:23 PM
mytop only if you use mysql 4.x Anything similar for mysql 5.x ? Most of the case mysql use too much resource casing server crash. In mysql prompt run "show processlist" will get some idea on who is causing the overload. If it is Apache, enable stats in Apache, so you will be able to see which site get too much access.

Posted by Calibaba, 09-15-2008, 07:12 PM
I use mytop already and on a version 5x server too. Works fine for me

Posted by brianoz, 09-16-2008, 07:43 AM
Mytop is a great idea. Apache status page is another big help. Checking domlogs for rapidly growing log files (just look for the biggest - "ls -lS /etc/httpd/domlogs | less") I'd also run suphp so you can easily trace which users are running long-running scripts, and then of course some of the system cpu accounting stuff becomes possible because each web user account runs under a separate unix user ID.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
XFluro down? (Views: 587)
Down again (Views: 661)
Limited WHM access? (Views: 635)
800host down (Views: 661)

Language: