Subject: | Percent CPU incorrect |
Date: | Thu, 25 Feb 2016 14:17:36 -0600 |
To: | bug-Proc-ProcessTable [...] rt.cpan.org |
From: | Kevin Buterbaugh <kevin.buterbaugh [...] gmail.com> |
Hi,
“top” says a particular process is using 99 or 100% CPU. Proc::ProcessTable-0.53 says it’s using much less.
top - 14:13:39 up 90 days, 5:25, 3 users, load average: 1.99, 2.04, 2.05
Tasks: 791 total, 2 running, 789 sleeping, 0 stopped, 0 zombie
Cpu(s): 4.6%us, 0.5%sy, 0.0%ni, 94.9%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 65534936k total, 41368244k used, 24166692k free, 367964k buffers
Swap: 4194300k total, 0k used, 4194300k free, 845956k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
12653 root 10 -10 433m 11m 9264 R 99.6 0.0 14:13.47 smbd
uid: 0, gid: 0, pid: 12653, fname: smbd, ppid: 21434, pgrp: 21434, sess: 21434, ttynum: 0, flags: 4202816, minflt: 3711, cminflt: 0, majflt: 0, cmajflt: 0, utime: 916430000, stime: 450000, cutime: 0, cstime: 0, priority: 10, start: 1456418376, size: 454041600, rss: 12349440, wchan: 0, time: 916880000, ctime: 0, state: run, euid: 0, suid: 0, fuid: 0, egid: 0, sgid: 0, fgid: 0, pctcpu: 7.10, pctmem: 0.02, cmndline: /usr/sbin/smbd -D, exec: /usr/sbin/smbd, cwd: /,
7% seems to be on the low side … I had another smbd that top said was using 100% CPU and Proc::ProcessTable said it was using ~85% CPU.
Based on the responsiveness of the box, I believe top… ;-)
Thanks…
Kevin
[root@somehost ~]# uname -a
Linux somehost 2.6.32-504.23.4.el6.x86_64 #1 SMP Fri May 29 10:16:43 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@somehost ~]# perl -v
This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi
Copyright 1987-2009, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
[root@somehost ~]#
--
Kevin L. Buterbaugh
Kevin.Buterbaugh@gmail.com <mailto:Kevin.Buterbaugh@gmail.com>
“There’s a feeling I get when I look to the west and my spirit is crying for leaving.” - Led Zeppelin, “Stairway to Heaven"