As per the title:

How can I tell how much RAM is installed on a FreeBSD server?


sysctl hw.physmem
  • 1
    And you can use -h to output the number with thousand separator commas: sysctl -h hw.physmem – bovine Aug 11 '16 at 20:41
  • What unit is the output in? KB, MB, GB? – Philipp Ludwig Aug 23 '18 at 10:37

I usually look it up through dmesg messages, like

su-3.2# grep memory /var/run/dmesg.boot 
usable memory = 8571846656 (8174 MB)
avail memory  = 8270299136 (7887 MB)

A quick and dirty way is to run the "top" utility.


If you want to know the size and count of memory sticks in the machine, install dmidecode from the ports tree. It will read the DMI information from the Motherboard and give you lots of hardware configuration information.


I use the free -m command on Linux. Here is an article on different ways of getting this, including a FreeBSD replacement for the free command: http://www.cyberciti.biz/faq/freebsd-command-to-get-ram-information/

  • 1
    Please make sure to always include the important bits in your answer when citing external sources — after all, the external site might vanish and make your link-only answer useless. – n.st Jun 1 '17 at 20:27

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.