[rhelv6-list] Top Does not show all CPU cores

Tilsley, Jerry M. jmtilsley at st-claire.org
Tue Aug 7 11:54:48 UTC 2012


>>On 6 August 2012 22:28, Tilsley, Jerry M. <jmtilsley at st-claire.org<mailto:jmtilsley at st-claire.org>> wrote:
>>First of all, I wasn't paying attention when I sent this 5.7 issue to the RHEL6 group, sorry about that!  Secondly, I found the issue.  I also didn't realize I was running as a basic user when trying to do top.  When I switched to user 'root' top worked as >>expected!


>There's something else going on there.   It doesn't matter whether you're on EL5 or EL6, "1" in top should show the per-cpu stats like this:

 >top - 08:42:00 up 4 days, 20:51,  1 user,  load average: 0.00, 0.01, 0.05
>Tasks: 118 total,   1 running, 117 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
>Cpu1  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
>Cpu2  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
>Cpu3  :  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:   1880072k total,  1159908k used,   720164k free,   195840k buffers
>Swap:  1048572k total,        0k used,  1048572k free,   606672k cached

>It's not even as though the per-cpu information comes from a different place: top gets both summary and the per-cpu data from /proc/stat.   Even if you only have one CPU you'd still see a "Cpu0" line instead of "Cpu(s).

>The only way I can see to prevent top from displaying per-cpu information is to prevent it displaying any cpu information at all: try hitting "t" -- that will take away the Tasks and Cpu lines.

>It's possible that the Task area (t flag) is off by default: it can be set in either ~/.toprc or /etc/toprc.   If it's not and you still don't have per-cpu data then something is seriously amiss.   Check /proc/stat to make sure you do have per-cpu lines, check "rpm ->qf $(type -p top)" to make sure the top you're running really is the one in the procps rpm and "rpm -V procps" to make sure procps isn't damaged.
I have narrowed down the issue to only a particular user, the rest function as expected.  I cannot find a file called toprc anyway, not in any users home and not in /etc either.  Not sure what I am missing there.  All other checks came back good, the I get the information as long as I'm not running as one particular user.

And then check for rootkits :)

jch

________________________________

Disclaimer****
This email is confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of St. Claire Regional Medical Center. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing or copying of the email is strictly prohibited. If you received this email in error please notify the St. Claire Regional Helpdesk by telephone at 606-783-6565.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/rhelv6-list/attachments/20120807/9384cf95/attachment.htm>


More information about the rhelv6-list mailing list