LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Detecting CPU Usage (http://www.linuxquestions.org/questions/linux-server-73/detecting-cpu-usage-524830/)

markus79 02-01-2007 08:24 PM

Detecting CPU Usage
 
Hi,

How would I go about researching why my server became un-responsive? A tech restarted the machine. When I ran 'uptime' I could see the load was very high from before it was rebooted. Where can I go to try to figure out what process was running before that caused it to use so much cpu?

Thanks
Mark

jschiwal 02-01-2007 08:57 PM

Uptime shows the average usage in the last 1, 5, and 15 minutes.

If statistics weren't being kept in the past, I doubt you can find that the problem was before rebooting, unless some error message was logged.
You might look in /var/log/messages to see where the last messages came from.

You could run top in batch mode and redirect the output to a file. Other common tools include vmstat, procinfo, mpstat & oprofile (opcontrol/opreport).

You might want to monitor and log the performance statistics over a certain test period of time in the future. Some of the tools, like vmstat can suppress the headers so that the data can be loaded into a spreadsheet.

Good Luck.

syg00 02-02-2007 03:25 AM

Basically that's the deal.
For the future, look at sysstat - keeps a history log.


All times are GMT -5. The time now is 03:10 PM.