how to check the CPU and mem usage of current running process?

November 19th, 2006 mysurface Posted in Common, htop, top | Hits: 51366 | 4 Comments »

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.

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.

4 Responses to “how to check the CPU and mem usage of current running process?”

  1. […] I have make the comparison between this application and a simple ncurses program, this program seems to use lesser memory. Couldn’t measure for CPU resources, as both ps and top shows 0.0 %. […]

  2. Very good site. I’m glad I found it. Thanks again, Karson

  3. Well, i still unable to get memory details, i don\’t know why buffer is too much :|

  4. Vos pass vous sauront crédité environ une semaine

Leave a Reply