Date: Fri, 14 Jan 2005 02:26:26 +0000 From: Chris <chrcoluk@gmail.com> To: freebsd-stable@freebsd.org, Chris <chrcoluk@gmail.com> Subject: Re: dual cpu and top in 5.3 Message-ID: <3aaaa3a050113182651e4795e@mail.gmail.com> In-Reply-To: <200501132343.j0DNhOuk058424@lurza.secnetix.de> References: <3aaaa3a05011315113c64ec76@mail.gmail.com> <200501132343.j0DNhOuk058424@lurza.secnetix.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Ok thanks yes I have the C column (happy) PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU COMMAN= D 466 root 8 0 229M 25168K nanslp 0 9:57 0.00% 0.00% java 797 root 8 0 229M 25168K nanslp 0 1:45 0.00% 0.00% java 800 root 8 0 229M 25168K nanslp 0 1:10 0.00% 0.00% java 657 root 8 0 2580K 1028K nanslp 1 0:57 0.00% 0.00% da-pop= b4sm 480 root 96 0 3160K 1548K select 0 0:55 0.00% 0.00% ntpd 439 root 96 0 7964K 6808K select 0 0:47 0.00% 0.00% dccifd Chris On Fri, 14 Jan 2005 00:43:24 +0100 (CET), Oliver Fromme <olli@lurza.secnetix.de> wrote: > Chris <chrcoluk@gmail.com> wrote: > > Hi, I have a dual athlon mp system running FreeBSD 5.3-RELEASE-p2, I > > have wondered if both cpu's should show in top. > > > > Here is a snapshot of my top output. > > > > last pid: 15520; load averages: 0.28, 0.09, 0.03 up 7+23:21:08 = 23:05:33 > > 153 processes: 2 running, 151 sleeping > > CPU states: 0.2% user, 0.0% nice, 3.3% system, 2.5% interrupt, 94.0= % idle > > Mem: 770M Active, 67M Inact, 115M Wired, 40M Cache, 112M Buf, 9804K Fre= e > > Swap: 2048M Total, 920K Used, 2047M Free > > > > I compiled a SMP kernel of course, but I am not confident I have this > > setup right because of lack of evidence showing I am in SMP modein > > top, here is my dmesg boot log which does say 2 cpus detected. >=20 > On SMP machines, top should show a column titled "C" which > contains the number of the processor on which the process > was scheduled last (i.e. either "0" or "1" if you have two > processors). >=20 > > [...] > > FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs > > cpu0 (BSP): APIC ID: 0 > > cpu1 (AP): APIC ID: 1 > > [...] > > SMP: AP CPU #1 Launched! >=20 > Looks OK. >=20 > You can also query "sysctl hw.ncpu" to get the number of > processors detected (and supported) by the kernel. >=20 > > Is it all looking dandy and I am ok or have I missed something, and > > should top show 2 cpu's or just 1? >=20 > The "top" command doesn't display the number of processors > directly, as far as I know. But it has the "C" column, as > explained above. >=20 > On an SMP machine of mine with two processors (it's a dual > Celeron-466), the output looks like this: >=20 > last pid: 55565; load averages: 0.01, 0.01, 0.00 up 295+04:59:09 00= :40:23 > 76 processes: 1 running, 75 sleeping > CPU states: 0.2% user, 0.0% nice, 0.2% system, 0.0% interrupt, 99.6% = idle > Mem: 72M Active, 7296K Inact, 35M Wired, 48K Cache, 25M Buf, 39M Free > Swap: 320M Total, 29M Used, 291M Free, 8% Inuse >=20 > PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU COM= MAND > 77 bind 2 0 12512K 9820K select 0 394:50 0.00% 0.00% nam= ed > 22723 root 2 0 2200K 264K poll 0 190:52 0.00% 0.00% do= vecot > 111 root 2 0 3056K 936K select 1 94:35 0.00% 0.00% sen= dmail > 79 root 2 0 1312K 364K select 1 35:56 0.00% 0.00% ntp= d > .. and so on. >=20 > Best regards > Oliver >=20 > -- > Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 M=FCnchen > Any opinions expressed in this message may be personal to the author > and may not necessarily reflect the opinions of secnetix in any way. >=20 > "A language that doesn't have everything is actually easier > to program in than some that do." > -- Dennis M. Ritchie >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3aaaa3a050113182651e4795e>