Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 May 2009 14:45:03 +0300
From:      Stefan Lambrev <stefan.lambrev@moneybookers.com>
To:        freebsd-stable@freebsd.org
Subject:   top - proc accounting does not work on freebsd 7.2
Message-ID:  <7F3CB337-C914-43D0-9C02-34F6A3358A48@moneybookers.com>

next in thread | raw e-mail | index | archive | help
Greetings,

I'm tracking i386 releng_7 on kind of old single CPU machine and I see  
very annoying problem.
top (-S) is not reporting things properly:

last pid: 20337;  load averages:  0.43,  0.11,   
0.04 
                                                                                                                                      up 
  0+13:20:07  14:37:44
123 processes: 3 running, 102 sleeping, 18 waiting
CPU: 75.0% user,  0.0% nice, 25.0% system,  0.0% interrupt,  0.0% idle
Mem: 108M Active, 702M Inact, 232M Wired, 1212K Cache, 112M Buf, 1958M  
Free
Swap: 4096M Total, 4096M Free

   PID USERNAME       THR PRI NICE   SIZE    RES STATE    TIME   WCPU  
COMMAND
    10 root             1 171 ki31     0K     8K RUN    769:35 56.15%  
idle: cpu0
19375 root             1   8    0  3464K  1616K wait     0:00  0.20% sh
    13 root             1 -44    -     0K     8K WAIT     7:35  0.00%  
swi1: net
    33 root             1 -80    -     0K     8K WAIT     1:57  0.00%  
irq18: vgapci0
    11 root             1 -32    -     0K     8K WAIT     0:59  0.00%  
swi4: clock sio
    46 root             1  20    -     0K     8K syncer   0:46  0.00%  
syncer
  1066 user             1  44    0 32508K 26368K select   0:27  0.00%  
kdeinit
   977 root             1  44    0 71956K 50668K select   0:23  0.00%  
Xorg

As you can see the CPU is 0% idle but the idle process is accounted  
56.15%
It doesn't matter how the load is created - web browser, X,  
compilation or something else.
Top just reports that only idle process is eating CPU.

Here is part of dmesg info:

FreeBSD 7.2-STABLE #10: Sat May 16 09:05:31 EEST 2009
     root@cheffo.freebsd-bg.org:/usr/obj/usr/src/sys/CORE
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD Athlon(tm) 64 Processor 3200+ (2200.22-MHz 686-class CPU)
   Origin = "AuthenticAMD"  Id = 0x20ff0  Stepping = 0
    
Features 
= 
0x78bfbff 
< 
FPU 
,VME 
,DE 
,PSE 
,TSC 
,MSR 
,PAE 
,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2>
   Features2=0x1<SSE3>
   AMD Features=0xe2500800<SYSCALL,NX,MMX+,FFXSR,LM,3DNow!+,3DNow!>
   AMD Features2=0x1<LAHF>
real memory  = 3221159936 (3071 MB)
avail memory = 3140956160 (2995 MB)

I'm using in my kernel:
options 	SCHED_ULE		# ULE scheduler
options 	SMP # tried without it - no difference

options 	HWPMC_HOOKS
device		hwpmc

There are other changes from GENERIC, but they are removed/added  
drivers and I'm sure the problem is not there.

Any idea why top does not work properly?

--
Best Wishes,
Stefan Lambrev
ICQ# 24134177








Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7F3CB337-C914-43D0-9C02-34F6A3358A48>