Saturday, September 20, 2014

Unix - Details of the processor



# sysctl -a | egrep -i 'hw.machine|hw.model|hw.ncpu'

E.g.1:
hw.machine: i386
hw.model: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
hw.ncpu: 8
hw.machine_arch: i386

E.g.2:
hw.machine: amd64
hw.model: Intel(R) Pentium(R) D CPU 3.00GHz
hw.ncpu: 2
hw.machine_arch: amd64

Note: 'amd64' does not mean AMD processor, but 64 bit operating system.

# dmesg | grep -i cpu

E.g.1:
CPU: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz (3392.32-MHz 686-class CPU)
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
 cpu2 (AP): APIC ID:  2
 cpu3 (AP): APIC ID:  3
 cpu4 (AP): APIC ID:  4
 cpu5 (AP): APIC ID:  5
 cpu6 (AP): APIC ID:  6
 cpu7 (AP): APIC ID:  7
cpu0: on acpi0
cpu1: on acpi0
cpu2: on acpi0
cpu3: on acpi0
cpu4: on acpi0
cpu5: on acpi0
cpu6: on acpi0
cpu7: on acpi0
est0: on cpu0
p4tcc0: on cpu0
est1: on cpu1
p4tcc1: on cpu1
est2: on cpu2
p4tcc2: on cpu2
est3: on cpu3
p4tcc3: on cpu3
est4: on cpu4
p4tcc4: on cpu4
est5: on cpu5
p4tcc5: on cpu5
est6: on cpu6
p4tcc6: on cpu6
est7: on cpu7
p4tcc7: on cpu7
SMP: AP CPU #1 Launched!
SMP: AP CPU #6 Launched!
SMP: AP CPU #3 Launched!
SMP: AP CPU #2 Launched!
SMP: AP CPU #7 Launched!
SMP: AP CPU #4 Launched!
SMP: AP CPU #5 Launched!
 
E.g.2:
CPU: Intel(R) Pentium(R) D CPU 3.00GHz (3000.17-MHz K8-class CPU)
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
cpu0: on acpi0
cpu1: on acpi0
est0: on cpu0
est: CPU supports Enhanced Speedstep, but is not recognized.
est: cpu_vendor GenuineIntel, msr f2500000f25
p4tcc0: on cpu0
est1: on cpu1
est: CPU supports Enhanced Speedstep, but is not recognized.
est: cpu_vendor GenuineIntel, msr f2500000f25
p4tcc1: on cpu1
SMP: AP CPU #1 Launched!
 

# grep -i cpu /var/run/dmesg.boot

(Mostly the same output as above)


# sysctl -a | grep -i cpu | less

kern.ccpu: 0
  0, 1, 2, 3, 4, 5, 6, 7
    0, 1, 2, 3, 4, 5, 6, 7
      0, 1
      2, 3
      4, 5
      6, 7
kern.smp.cpus: 8
kern.smp.maxcpus: 32
debug.cpufreq.verbose: 0
debug.cpufreq.lowest: 0
debug.kdb.stop_cpus: 1
debug.PMAP1changedcpu: 1866
hw.model: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
hw.ncpu: 8
hw.acpi.cpu.cx_lowest: C1
machdep.hlt_cpus: 0
security.jail.param.cpuset.id: 0
dev.cpu.0.%desc: ACPI CPU
dev.cpu.0.%driver: cpu
dev.cpu.0.%location: handle=\_PR_.CPU0
dev.cpu.0.%pnpinfo: _HID=none _UID=0
dev.cpu.0.%parent: acpi0
dev.cpu.0.freq: 3401
dev.cpu.0.freq_levels: 3401/95000 3000/79831 2800/72677 2600/65779 2400/59147 2200/52789 2000/46677 1800/40818 1600/35981 1400/31483 1200/26985 1000/22488 800/17990 600/13492 400/8995 200/4497
dev.cpu.0.cx_supported: C1/1 C2/80 C3/104
dev.cpu.0.cx_lowest: C1
dev.cpu.0.cx_usage: 100.00% 0.00% 0.00% last 500us
dev.acpi_perf.0.%parent: cpu0
dev.est.0.%parent: cpu0
dev.cpufreq.0.%driver: cpufreq
dev.cpufreq.0.%parent: cpu0
dev.p4tcc.0.%desc: CPU Frequency Thermal Control
dev.p4tcc.0.%parent: cpu0
... (similar outputs for each processor in the system)


Note:

  • Some outputs like hw architecture are not correct, do not give actual platform details, and are operating system dependent. For example, 'FreeBSD amd64' is generally installed on Intel i386 based platforms if 64 bit operation is expected.
  • Similar is the ‘uname –p’ command. It returns the OS choice, not the actual hardware platform.

No comments:

Post a Comment