Finding out if your Linux box has one, two or more cpu's is easy. Check out the file /proc/cpuinfo:cavity wrote:if it wasnt a smp kernel, then wouldnt i see one cpu doing all the work and the other idle?
Code: Select all
davidt@lin10:~$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 7
model name : Pentium III (Katmai)
stepping : 3
cpu MHz : 547.244
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse
bogomips : 1081.34
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 7
model name : Pentium III (Katmai)
stepping : 3
cpu MHz : 547.244
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse
bogomips : 1089.53
Code: Select all
lin10:~# x86info -a
x86info v1.12b. Dave Jones 2001-2003
Feedback to <davej@redhat.com>.
Found 2 CPUs
MP Table:
# APIC ID Version State Family Model Step Flags
# 0 0x11 BSP, usable 6 7 3 0x383fbff
# 1 0x11 AP, usable 6 7 3 0x383fbff
--------------------------------------------------------------------------
CPU #1
/dev/cpu/0/cpuid: No such device or address
eax in: 0x00000000, eax = 00000002 ebx = 756e6547 ecx = 6c65746e edx = 49656e69
eax in: 0x00000001, eax = 00000673 ebx = 00000000 ecx = 00000000 edx = 0383fbff
eax in: 0x00000002, eax = 03020101 ebx = 00000000 ecx = 00000000 edx = 0c040843
Family: 6 Model: 7 Stepping: 3 Type: 0 Brand: 0
CPU Model: Pentium III (Katmai) [kC0] Original OEM
Feature flags:
Onboard FPU
Virtual Mode Extensions
Debugging Extensions
Page Size Extensions
Time Stamp Counter
Model-Specific Registers
Physical Address Extensions
Machine Check Architecture
CMPXCHG8 instruction
Onboard APIC
SYSENTER/SYSEXIT
Memory Type Range Registers
Page Global Enable
Machine Check Architecture
CMOV instruction
Page Attribute Table
36-bit PSEs
MMX support
FXSAVE and FXRESTORE instructions
SSE support
Extended feature flags:
Instruction TLB: 4KB pages, 4-way associative, 32 entries
Instruction TLB: 4MB pages, fully associative, 2 entries
Data TLB: 4KB pages, 4-way associative, 64 entries
L2 unified cache:
Size: 512KB 4-way associative.
line size=32 bytes.
L1 Instruction cache:
Size: 16KB 4-way associative.
line size=32 bytes.
Data TLB: 4MB pages, 4-way associative, 8 entries
L1 Data cache:
Size: 16KB 4-way associative.
line size=32 bytes.
Number of reporting banks : 5
Erk, MCG_CTL not present! :0000000000000005:
Bank: 0 (0x400)
MC0CTL: 00000000 00000000 00000000 00000000
11000101 00011000 00000000 00000000
MC0STATUS: 00010000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
MC0ADDR: 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
Bank: 1 (0x404)
MC1CTL: 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000001
MC1STATUS: 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
MC1ADDR: 00000000 00110100 00110000 11111111
00000000 00110100 00110000 11111111
Bank: 2 (0x408)
MC2CTL: 00000000 00110100 01000110 00000000
00000000 00110100 01000110 00000000
MC2STATUS: 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
MC2ADDR: 00000000 00110100 01000110 11111111
00000000 00110100 01000110 11111111
Bank: 3 (0x40c)
MC3CTL: 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000001
MC3STATUS: 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
MC3ADDR: Couldn't read MSR 0x40e
Bank: 4 (0x410)
MC4CTL: 00000000 00000000 00000000 00001000
00000000 00000000 00000000 00001000
MC4STATUS: 00100010 00000000 00000000 00000000
00000000 00000000 00000000 00010001
MC4ADDR: 00000000 00110101 00100000 11111111
00000000 00110101 00100000 11111111
Microcode version: 0x000000000000002a
Connector type: Slot 1 (242 Contact Cartridge)
MTRR registers:
MTRRcap (0xfe): 0x0000000000000508
MTRRphysBase0 (0x200): 0x0000000000000006
MTRRphysMask0 (0x201): 0x0000000fe0000800
MTRRphysBase1 (0x202): 0x0000000020000006
MTRRphysMask1 (0x203): 0x0000000ff0000800
MTRRphysBase2 (0x204): 0x00000000f4000001
MTRRphysMask2 (0x205): 0x0000000ffe000800
MTRRphysBase3 (0x206): 0x00000000ec000001
MTRRphysMask3 (0x207): 0x0000000ffc000800
MTRRphysBase4 (0x208): 0x0000000000000000
MTRRphysMask4 (0x209): 0x0000000000000000
MTRRphysBase5 (0x20a): 0x0000000000000000
MTRRphysMask5 (0x20b): 0x0000000000000000
MTRRphysBase6 (0x20c): 0x0000000000000000
MTRRphysMask6 (0x20d): 0x0000000000000000
MTRRphysBase7 (0x20e): 0x0000000000000000
MTRRphysMask7 (0x20f): 0x0000000000000000
MTRRfix64K_00000 (0x250): 0x0606060606060606
MTRRfix16K_80000 (0x258): 0x0606060606060606
MTRRfix16K_A0000 (0x259): 0x0000000000000000
MTRRfix4K_C8000 (0x269): 0x0505050505050505
MTRRfix4K_D0000 0x26a: 0x0505050505050505
MTRRfix4K_D8000 0x26b: 0x0000000000000000
MTRRfix4K_E0000 0x26c: 0x0000000000000000
MTRRfix4K_E8000 0x26d: 0x0000000000000000
MTRRfix4K_F0000 0x26e: 0x0505050505050505
MTRRfix4K_F8000 0x26f: 0x0505050505050505
MTRRdefType (0x2ff): 0x0000000000000c00
550MHz processor (estimate).
--------------------------------------------------------------------------
CPU #2
eax in: 0x00000000, eax = 00000002 ebx = 756e6547 ecx = 6c65746e edx = 49656e69
eax in: 0x00000001, eax = 00000673 ebx = 00000000 ecx = 00000000 edx = 0383fbff
eax in: 0x00000002, eax = 03020101 ebx = 00000000 ecx = 00000000 edx = 0c040843
Family: 6 Model: 7 Stepping: 3 Type: 0 Brand: 0
CPU Model: Pentium III (Katmai) [kC0] Original OEM
Feature flags:
Onboard FPU
Virtual Mode Extensions
Debugging Extensions
Page Size Extensions
Time Stamp Counter
Model-Specific Registers
Physical Address Extensions
Machine Check Architecture
CMPXCHG8 instruction
Onboard APIC
SYSENTER/SYSEXIT
Memory Type Range Registers
Page Global Enable
Machine Check Architecture
CMOV instruction
Page Attribute Table
36-bit PSEs
MMX support
FXSAVE and FXRESTORE instructions
SSE support
Extended feature flags:
Instruction TLB: 4KB pages, 4-way associative, 32 entries
Instruction TLB: 4MB pages, fully associative, 2 entries
Data TLB: 4KB pages, 4-way associative, 64 entries
L2 unified cache:
Size: 512KB 4-way associative.
line size=32 bytes.
L1 Instruction cache:
Size: 16KB 4-way associative.
line size=32 bytes.
Data TLB: 4MB pages, 4-way associative, 8 entries
L1 Data cache:
Size: 16KB 4-way associative.
line size=32 bytes.
Number of reporting banks : 5
Erk, MCG_CTL not present! :0000000000000005:
Bank: 0 (0x400)
MC0CTL: 00000000 00000000 00000000 00000000
11000101 00001000 00000000 00000000
MC0STATUS: 00010000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
MC0ADDR: 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
Bank: 1 (0x404)
MC1CTL: 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000001
MC1STATUS: 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
MC1ADDR: 00000000 00110100 00110000 11111111
00000000 00110100 00110000 11111111
Bank: 2 (0x408)
MC2CTL: 00000000 00110100 01000110 00000000
00000000 00110100 01000110 00000000
MC2STATUS: 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
MC2ADDR: 00000000 00110100 01000110 11111111
00000000 00110100 01000110 11111111
Bank: 3 (0x40c)
MC3CTL: 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000001
MC3STATUS: 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
MC3ADDR: Couldn't read MSR 0x40e
Bank: 4 (0x410)
MC4CTL: 00000000 00000000 00000000 00001000
00000000 00000000 00000000 00001000
MC4STATUS: 00100010 00000000 00000000 00000000
00000000 00000000 00000000 00010001
MC4ADDR: 00000000 00110101 00100000 11111111
00000000 00110101 00100000 11111111
Microcode version: 0x000000000000002a
Connector type: Slot 1 (242 Contact Cartridge)
MTRR registers:
MTRRcap (0xfe): 0x0000000000000508
MTRRphysBase0 (0x200): 0x0000000000000006
MTRRphysMask0 (0x201): 0x0000000fe0000800
MTRRphysBase1 (0x202): 0x0000000020000006
MTRRphysMask1 (0x203): 0x0000000ff0000800
MTRRphysBase2 (0x204): 0x00000000f4000001
MTRRphysMask2 (0x205): 0x0000000ffe000800
MTRRphysBase3 (0x206): 0x00000000ec000001
MTRRphysMask3 (0x207): 0x0000000ffc000800
MTRRphysBase4 (0x208): 0x0000000000000000
MTRRphysMask4 (0x209): 0x0000000000000000
MTRRphysBase5 (0x20a): 0x0000000000000000
MTRRphysMask5 (0x20b): 0x0000000000000000
MTRRphysBase6 (0x20c): 0x0000000000000000
MTRRphysMask6 (0x20d): 0x0000000000000000
MTRRphysBase7 (0x20e): 0x0000000000000000
MTRRphysMask7 (0x20f): 0x0000000000000000
MTRRfix64K_00000 (0x250): 0x0606060606060606
MTRRfix16K_80000 (0x258): 0x0606060606060606
MTRRfix16K_A0000 (0x259): 0x0000000000000000
MTRRfix4K_C8000 (0x269): 0x0505050505050505
MTRRfix4K_D0000 0x26a: 0x0505050505050505
MTRRfix4K_D8000 0x26b: 0x0000000000000000
MTRRfix4K_E0000 0x26c: 0x0000000000000000
MTRRfix4K_E8000 0x26d: 0x0000000000000000
MTRRfix4K_F0000 0x26e: 0x0505050505050505
MTRRfix4K_F8000 0x26f: 0x0505050505050505
MTRRdefType (0x2ff): 0x0000000000000c00
550MHz processor (estimate).
--------------------------------------------------------------------------
WARNING: Detected SMP, but unable to access cpuid driver.
Used Uniprocessor CPU routines. Results inaccurate.
As you can see, using the "-a" flag and running as root will give you tremendous amount of info on your cpu's