[lug] top mystery

Steve Sullivan <Steve Sullivan sullivan at mathcom.com
Mon Apr 25 15:40:44 MDT 2005


I'm testing a multithreaded C++ app on Suse 9.2/pentium,
and when I run "top" it shows the app is doing nothing ...

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
12835 sullivan  18   0 23800 1008 2196 S  0.0  0.1   0:00.00 tcmpxchgb

Nothing else on the computer is running (both according to me and
to top), yet the top headers show:
Cpu(s): 16.8% us, 83.2% sy,  0.0% ni,  0.0% id,  0.0% wa,  0.0% hi,  0.0% si

And when I run "time tcmpxchgb" it shows:
real    1m40.290s
user    0m16.935s
sys     1m20.094s
... which indicates 16.9 % user time, and 79.8 % sys time.

Running vmstat confirms this:
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so   bi    bo   in    cs   us sy id wa
11  0 124864 346744  37280 548636    0    0    0    36 1017 1094933 17 83  0  0
10  0 124864 346744  37280 548636    0    0    0     0 1002 1103676 15 85  0  0


Why is top still showing that this particular process isn't
using any resources?

Thanks,

Steve
-- 

========================================
Steve Sullivan    sullivan at mathcom.com

http://www.mathcom.com    303-494-7115
========================================



More information about the LUG mailing list