My system is SUSE 10 and I observe that top
occupies 57% CPU usage when I use it.
I don't have too many processes:
ps -eLf | wc -l
106
Here are top
's stats:
cat /proc/2913/stat
2913 (top) R 2879 2913 2879 34819 2913 8396800 411 0 0 0 60648 199580 0 0 17 0 1 516504552 4811013274 2383872 285 4294967295 134512640 134596384 3215474448 3215470376 3085449998 0 0 0 138047495 0 0 0 17 3 0 0 0
cat /proc/2913/status
Name: top
State: R (running)
SleepAVG: 79%
Tgid: 2913
Pid: 2913
PPid: 2879
TracerPid: 0
Uid: 0 0 0 0
Gid: 0 0 0 0
FDSize: 256
Groups: 0
VmPeak: 2360 kB
VmSize: 2328 kB
VmLck: 0 kB
VmHWM: 1144 kB
VmRSS: 1140 kB
VmData: 260 kB
VmStk: 84 kB
VmExe: 84 kB
VmLib: 1788 kB
VmPTE: 16 kB
Threads: 1
SigQ: 2/16383
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000000000
SigCgt: 00000000083a7007
CapInh: 0000000000000000
CapPrm: 00000000fffffeff
CapEff: 00000000fffffeff
Cpus_allowed: 00000000,00000000,00000000,0000000f
Mems_allowed: 1
## cat /proc/2913/statm
582 285 213 21 0 86 0
What can I do next to find the reason why the top
command is using so much CPU?
Best Answer
Your server is up 556 days. Though this shouldn't be a problem it is possible the long uptime is causing some funky behaviour like you're noticing. Without any identifiable cause. In my experience in such situations a fresh reboot clears up the problem right away. I understand it's a stupid solution, but why waste more time figuring it out?
If a reboot doesn't fix it then it's worth looking into it more deeply.