Why does top report a different cpu usage than CloudWatch?

A very good observation and we have run into this as well. Here’s what I found: Be careful measuring CPU usage from within an EC2 instance. It’s possible to see CPU usage well below 100%—and yet be completely maxed out. Trust me: been there, done that. (CloudWatch CPUUtilization, by the way, is measured from outside … Read more

10 GB of RAM unaccounted for by top

Your smem -tw output shows that your kernel is consuming over 9 GB of dynamic memory: danslimmon@bad-server:~$ smem -tw Area Used Cache Noncache firmware/hardware 0 0 0 kernel image 0 0 0 kernel dynamic memory 12857576 2887440 9970136 userspace memory 17661400 1272468 16388932 free memory 351592 351592 0 ———————————————————- 30870568 4511500 26359068 So, some kernel … Read more

How to exclude some users from Linux Top screen?

The correct answer is: -U ‘!root’ (or -u ‘!root’ on some Ubuntus). This was introduced in top v3.2.9: man top for -U option: Prepending an exclamation point (‘!’) to the user id or name instructs top to display only processes with users not matching the one provided. Remember to put the exclamation mark and username … Read more

Something eats all memory (I suspect memory leak on some app). How to detect what?

Running top in batch mode to report memory sizes periodically can be used to see who is using the memory when things go south. Runing sar in batch mode should give some good diagnostics on memory use, and related I/O. Running munin to monitor the system should give you a graph with good detail on … Read more