Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I need this information to optimize the number of worker threads my custom application is allocating.

For example, if I just use top on a single-threaded application on a two-core machine, the 100% CPU usage does not tell me if there is still unused capacity in the form of the other core!

What kind of monitoring tools can I use to detect the difference?

share|improve this question
add comment

2 Answers

up vote 7 down vote accepted

Use htop. It has many more features than top, including showing individual threads and individual CPU usage etc.

http://manpages.ubuntu.com/manpages/oneiric/man1/htop.1.html

share|improve this answer
    
+1 wow! I love it! –  kfmfe04 Dec 23 '11 at 1:55
    
+1 ! me gusta ! –  Basit Anwer Jan 2 '13 at 17:48
add comment

When running top, press 1, this will show per-core usage. Maybe it's what you need?

share|improve this answer
    
+1 It's definitely helpful - I can see total cpu1 and cpu2 usage - lemme try it out some more... –  kfmfe04 Dec 22 '11 at 1:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.