Retrieve CPU and Memory Information on FreeBSD

Server running slow and how to check CPU/Processor and RAM/Memory info on FreeBSD? There are couple of ways to retrieve the information, by dmesg or sysctl.

Check CPU/Processor Speed on FreeBSD

Get CPU info by sysctl;


shell> sysctl -a | egrep -i 'machine|model|ncpu'

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

Get CPU info by dmesg boot message;


shell> egrep -i cpu /var/run/dmesg.boot

CPU: Intel(R) Pentium(R) D CPU 3.00GHz (2998.50-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_perf0:  on cpu0
acpi_perf0:  on cpu0
cpu1:  on acpi0
acpi_perf1:  on cpu1
acpi_perf1:  on cpu1
SMP: AP CPU #1 Launched!

Check Total Memory/RAM on FreeBSD

Get Memory/RAM information from dmesg boot message;


shell> grep -i 'memory' /var/run/dmesg.boot
real memory  = 1072107520 (1022 MB)
avail memory = 1039966208 (991 MB)

Related posts:

  1. Memory Control? Flickr Uploader used a lot of my memory, anybody know...
  2. Bind Error: “max open files (3520) is smaller than max sockets (4096)” Just notice one of the DNS server has the error...
  3. How to Create User with useradd in FreeBSD You can invoke “adduser” command in FreeBSD in order to...
  4. How to Change User’s Shell Environment in FreeBSD In FreeBSD, user’s default shell environment is either sh or...
  5. MySQL Quick Installation on FreeBSD Quick installation of MySQL Database on FreeBSD Server. Make sure...

Leave a Reply