5

How to find out what process is using CPU to what extent in Ubuntu? I'd like to have real-time data as well as recorded history. Both console and GUI apps would be great.

The situation is that my system seems to be really overloaded right now and I don't know why for sure. I've spent some time killing processes and watching if performance improves. And I suspect that JS Scripts running in Mozilla are causing problems. All in all a nice tool for taking a look at CPU usage would come in handy.

Alex
  • 2,287
  • 5
  • 32
  • 41

6 Answers6

11

Tried Htop ?

Berzemus
  • 1,162
  • 3
  • 11
  • 19
7

Learn to use "sar", you'll be glad you did.

Install the "sysstat" package. It will record tons of useful system statistics, CPU, memory usage, I/O, and more. The default retention period is 7 days I believe.

Then you can go back in time for the day you want like this (for the 2nd, for example):

sar -C -f /var/log/sysstat/sa02

DictatorBob
  • 1,614
  • 11
  • 15
2

top will give you real time data. Recorded may be more tricky.

Cian
  • 5,777
  • 1
  • 27
  • 40
2

There are many tools you may use : dstat, vmstat, htop, ps ..

Ali Mezgani
  • 3,810
  • 2
  • 23
  • 36
1

Since this is a desktop you can also use the system monitor in gnome or kde. Both will list the processes similar to the Windows Task Manager.

3dinfluence
  • 12,409
  • 2
  • 27
  • 41
0

Use SeaLion. The default command lists has top -b -n1 which will do exactly what you are looking for. It has real-time data as well as recorded history.

Vishal
  • 121
  • 4