We may curious some times why our computer running so slow, and we suspect that must be some programs (process) is running and uses a lots of CPU. We wanna know which process is it, and we have
Top is a command that neatly list all processes with valuable info sort by CPU and memory usage. What you type,
You expect to see the buzy processes appear at top of the list. Top gives you very good info of current running process, such as PID, nice value, command name and of course CPU and memory usage. It also gives you a global stat and it is running real time, which keep update the current state of processes periodically. It allows you to specified the delay time between each updates and it allows you to filter the list based on user.
top -u mysurface -d 1
But some how top is not so interactive, where there is another program call htop which gives you a very interactive top. It allows you to change the nice value of processes while viewing it, send kill signal, search processes by name, sort the list of processes based on different element and the display is colorful.
In htop, you can navigate by using arrow key, and there is a list of function binds with function key from F1 to F10, which is very easy and self explain. And htop support mouse click, :P Check out the comparison between htop and top.