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

  • Media tools installation Error/Fix

    While installing media tools like Neroacc, we might come across the following errors   ERROR: ====== /usr/ports/audio/linux-neroaaccodec]# make install clean ===>  Staging for linux-neroaaccodec-1.5.1 ===>   linux-neroaaccodec-1.5.1 depends on file: /compat/linux/etc/redhat-release...
  • Reset MySQL Password

    Resetting a MySQL Root Password is one of the easiest things to do. However, finding documentation on how to do so can be challenging.   We as system administrators, have...
  • Identify the process that is using some specific port

    Sometimes, you may encounter a situation where you see some ports being used by some service, but you cannot exactly determine which application/service is using it. This article talks about how...
  • SSH: Whitelist IPs for Your Server

    If you wish to whitelist certain IP’s for your server for any reason, you can easily go into your Webair Ezpanel for this. When whitelisting an IP, please provide the specific...