FreeBSD Hardware

Get CPU Information

You can use the dmesg utility to display the contents of the system message buffer when FreeBSD comes up. For accuracy I recommend querying /var/run/dmesg.boot file. Usually a snapshot of the buffer contents taken soon after file systems are mounted at startup time and dumped to /var/run/dmesg.boot file.

Check CPU Speed in FreeBSD using sysctl command

 

Type the following command at a shell prompt as root user:

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

 

Sample outputs:

 

hw.machine: amd64
hw.model: Intel(R) Xeon(R) CPU X5620 @ 3.33GHz
hw.ncpu: 4
hw.machine_arch: amd64

 

So I have an Intel Xeon quad core processor running at 3.33GHz speed.

 

FreeBSD CPUINFO using dmesg command

Type the following command:

 

# dmesg | grep -i cpu

 

Or directly query /var/run/dmesg.boot file:

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

 

Output:

[code] CPU: Dual Core AMD Opteron(tm) Processor 170 (1999.08-MHz 686-class CPU)
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
cpu0 (BSP): APIC ID: 0
cpu1 (AP): APIC ID: 1
cpu0: on acpi0
acpi_throttle0: on cpu0
cpu1: on acpi0
acpi_throttle1: on cpu1
SMP: AP CPU #1 Launched! [/code]

 

You can also dump more information using sysctl command:

# sysctl -a | grep -i cpu | less

Related Articles

  • Users Logged Into Server

    This article explains on how to identify those who you do not know that are on your server. This can definitely eliminate the curiosity that people can have when taking...
  • Using Top [ $top ]

    What is Top? Top provides a live display of information on the CPU processes. Top gets updated periodically as it provides an output CPU level percentage, Memory size, Swap Info,...
  • SSL Certificate Installation for Courier IMAP and POP

    This guide will provide you information on how to setup and configure SSL certificates for the courier IMAP mail server.   Prior to the installation you will need to purchase...
  • Setting files as immutable.

    Wouldn’t it be nice if we can set files so that even root cannot modify or delete it ? Both FreeBSD and Linux come with commands that allows us to...