LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 02-01-2007, 08:24 PM   #1
markus79
LQ Newbie
 
Registered: Jun 2005
Location: Chicago
Distribution: Ubuntu Breezy
Posts: 9

Rep: Reputation: 0
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
 
Old 02-01-2007, 08:57 PM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
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.

Last edited by jschiwal; 02-01-2007 at 09:09 PM.
 
Old 02-02-2007, 03:25 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,271

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Get CPU Usage ramicub Programming 3 11-02-2010 04:34 AM
getting realtime info on memory usage-cpu and harddrive usage steering Linux - Newbie 5 03-03-2005 08:43 PM
Getting CPU usage Nerox Programming 5 12-16-2004 02:33 AM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 04:45 AM
Controlling CPU usage & memory usage Saravana babu Linux - Software 0 02-18-2004 05:55 AM


All times are GMT -5. The time now is 07:40 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration