[Webinar] Learn how to a build a cloud-first strategyRegister Now


FreeBSD Hardware Specs Command

Posted on 2007-07-22
Medium Priority
Last Modified: 2013-11-22
Can someone please tell me how to find out the hardware specs for a machine running FreeBSD?
Question by:adm-computing
  • 3
  • 2

Accepted Solution

eztiger79 earned 2000 total points
ID: 19544033
There are a number of avenues to explore, as root :


Which will give you the boot log and should include a good overview of device drivers etc being loaded.

'pciconf -l' will give you a slightly more indepth look at your pci devices.

You also have :


To look at for memory statistics.

You also have 'sysctl -a | grep dev' which will respond with much the same information as dmesg but in a different layout.

'kldstat' will list loaded modules which may or may not help you identify hardware.

If you're used to Linux more you can replicate limited linux /proc functionality using :

'mount_linprocfs proc /proc'

and then browse this folder as you would Linux for more information.

Some interesting files :


If there is something specific you're looking for that isn't covered by the above please post with details.

Author Comment

ID: 19545704
Thanks for the reply. 'dmesg' doesnt do anything for me, but the others are helpful, in particular 'sysctl -a | grep dev'. However, where can I find something as simple as the processor speed? I couldnt see that being returned using any of the commands you recommended.

Assisted Solution

eztiger79 earned 2000 total points
ID: 19545738
Did you mean dmesg didn't work or it didn't give you the information you needed?

You really should have it, it's a stock command. Are you running as root? I'm also assuming a relatively recent version of FreeBSD (5.x, 6.x)

bash# uname -rs
bash# which dmesg

The first few lines of dmesg output should tell you the cpu info :

CPU: Intel(R) Pentium(R) D CPU 3.00GHz (2992.52-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf47  Stepping = 7
  AMD Features=0x20100000<NX,LM>
  AMD Features2=0x1<LAHF>
  Cores per package: 2
real memory  = 1072218112 (1022 MB)
avail memory = 1040101376 (991 MB)
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1

Failing that if you use the procfs tip above you can find it in /proc/cpuinfo :

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 16
model name      : Intel(R) Pentium(R) D CPU 3.00GHz
stepping        : 7
processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 16
model name      : Intel(R) Pentium(R) D CPU 3.00GHz
stepping        : 7
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 b19 b21 mmxext mmx fxsr xmm b26 b27 b28 b29 3dnow
cpu MHz         : 2992.52
bogomips        : 2992.52

You could also use sysctl :

sysctl -a | grep hw.model

Which should return the vendor string from the cpu :

hw.model: Intel(R) Pentium(R) D CPU 3.00GHz

Is it a full FreeBSD box you have? or some kindof virtual server? I have seen some virtualised FreeBSD machines (not using jails) which have had some very...odd...setup configurations.

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.


Author Comment

ID: 19545800
'dmesg' doesnt return an error but it doesnt return any output either:

bash-2.05b# dmesg
bash-2.05b# uname -rs
bash-2.05b# which dmesg

Any ideas why? It is a full FreeBSD box too. 'sysctl -a' does work for me though.

Expert Comment

ID: 19545843
dmesg requires access to the kernel message buffer which you can turn off for non root users :

mail# dmesg
dmesg: sysctl kern.msgbuf: Operation not permitted

But root (in a non jailed system) should have access to it. There are a few sysctl variables related to it, mine are set like this :

bash# sysctl -a | grep msgbuf
kern.msgbuf_clear: 0
kern.consmsgbuf_size: 8192
security.bsd.unprivileged_read_msgbuf: 0

The last entry is the one stopping non root users looking at the message buffer. I suspect the other interesting one from your point of view would be kern.msgbuf_clear. That implies that if it's set to '1' the message buffer is cleared instantly / periodically. Might be worth checking to see what it's set to.

You could have a look at :


Which should have the contents - but they may be empty if your actual dmesg command is not functioning as expected.

Are you sure you're not running as root within a jail?

If your 'ps aux' listing has a 'J' character next to the process states :

www     97284  0.0  0.4  6524  4364  ??  SJ    9:55AM   0:00.01 /usr/local/sbin/httpd -DSSL
root    24721  0.0  0.1  1532   856  p1  R+J  10:08AM   0:00.00 ps aux

You're in a jailed environment. This would be fairly transparent to you if set up correctly.

I'm not sure if you set the server up yourself or not, I'm making the assumption you didn't as you're looking for hardware info.
LVL 62

Expert Comment

ID: 19569398
Install "dmicecode" port and it will read whatever your BIOS holds like serial numbers, memory banks etc.

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

868 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question