`top` Irregularities - cpu count, percentage, process lists
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
This morning one of our MySQL servers was getting hammered pretty hard. I pulled up top and noticed some irregularities between the data it was showing me, and the data that the System Monitor provided. This system has four Itanium2 processors and 16 gigs of memory.
The CPU usage from top was at ~20%.
The System Monitor shows two of the processors at 100%.
top only shows one CPU, but this machine has four.
top shows ~95% memory usage, but the System Monitor only shows 2 out of 16 gigs in use.
The mysqld process didn't even show up on top, though clearly it is the cause of the high CPU usage.
I've provided a couple of linked screenshots, as image attachments or in-line images don't seem to be allowed here.
Pays to understand your tools - "man top". No point in comparing apples to oranges.
Top was showing you the average of the CPUs - hit the "1" key whilst it's active. I would suggest you set up a profile to include this - its mentioned in the man page.
As for memory, subtract the cached and buffered numbers from the (top) useage numbers and see what you get. I find "free -m" more useful for this bit - it does the math for you.
As for the last question, what shows after the (top) change ???.
I have read the man page several times, it still seems to do the same thing as most other system monitors.
The reason I'm curious about the CPU information is because I've long understood it as showing each CPU's status. Funny, I was using "l" instead of "1" ... which caused the confusion. Whoops.
Interesting bit about the memory, I didn't realize that's how it worked.
Which still says 16 of 16 GB of memory is in use. But I suppose subtracting the cached portion matches the 2GB that the System Monitor reports. I still don't like how that's labeled.
Last edited by ColinAnderson; 05-09-2007 at 12:46 PM..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.