Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an Amazon EC2 micro instance. I believe that this is 1 core (or 2 for periodic bursts) with 4 CPU's. I'm getting confused with the terminology (ECU vs CPU vs Core) but really I would like to see how busy each CPU is. When I look at top it seems to be showing me just the cores. I want to see if my process is be spread out across the available processors and how busy each is, what is the appropriate command to do this?

Even on my m1.medium box, I only see 1

I don't have the rep to post an image but this is what I see on the medium:

top - 23:47:01 up 13 days,  6:33,  2 users,  load average: 0.00, 0.01,
0.05 Tasks:  71 total,   1 running,  70 sleeping,   0 stopped,   0 zombie 
Cpu0  :  0.0%us,  0.1%sy,  0.0%ni, 99.9%id,  0.0%wa,  0.0%hi, 
0.0%si,  0.0%st 
Mem:   3870196k total,   610816k used,  3259380k free,   154292k buffers 
Swap:        0k total,        0k used,        0k free, 374664k cached

and this is micro:

top - 23:47:55 up 23:47,  2 users,  load average: 0.04, 0.05, 0.05
Tasks:  59 total,   1 running,  58 sleeping,   0 stopped,   0 zombie
Cpu0  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    606212k total,   430924k used,   175288k free,    59664k buffers
Swap:        0k total,        0k used,        0k free,   185824k cached
share|improve this question
2  
To see all cores/threads, press '1' in top. an 'ECU' in amazon terminology has nothing to do with cores. –  thinice Dec 13 '12 at 21:16
    
I tried that of course but it only shows me one which I think is really showing me the core. Meanwhile I have one process which is pinned at 99.9% but top - 1 is only showing 25%. It really doesn't seem like top plays nicely with the virtual machine –  sally Dec 13 '12 at 22:04
2  
I've had no issues with top, a micro is a strange beast; it's a single core, with up to 2 ECU's for very short intervals. That means if you're having a short 1-30second burst of CPU draw, it will burst that high, but afterwards the performance goes into the crapper. You can paste output or a screenshot of your top output for futher analysis, but you've only got 1 core with a performance of 2ECU's, which is akin to 1 core @ 2GHZ for a short period of time. –  thinice Dec 13 '12 at 23:00
    
Updated my question. I don't think it is even specific to micro –  sally Dec 14 '12 at 0:26
    
You're not reading this page correctly: aws.amazon.com/ec2/instance-types - a Medium, just like a micro has one core. Try it on a large and you'll see 2 CPU's. –  thinice Dec 14 '12 at 15:00
show 2 more comments

2 Answers 2

Install htop which will graphically show you individual cpu usage data.

share|improve this answer
add comment

Install the nmon utility, which can show a color-coded bar graph of cpu utilization by core, broken down by component:

enter image description here

share|improve this answer
    
Cool tool, I haven't seen this one, but even here I am only seeing 1 CPU. It must be something specific to Amazon... –  sally Dec 13 '12 at 23:51
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.