FreeBSD Command To Find How Much RAM is Installed On a Server

Fig.01: FreeBSD Command To Find How Much RAM is Installed On a Server

Fig.01: FreeBSD Command To Find How Much RAM is Installed On a Server

So how do I tell how much RAM (memory) is installed on my FreeBSD Unix box? The answer is pretty simple just run any one of the following command:
# grep memory /var/run/dmesg.boot
Sample outputs:

real memory  = 35165044736 (33536 MB)
avail memory = 33131155456 (31596 MB)

So I’ve 32 GB ram.

You can also use the sysctl command as follows:
# sysctl hw | egrep 'hw.(phys|user|real)'
Sample outputs:

hw.physmem: 34304413696
hw.usermem: 28331307008
hw.realmem: 35165044736

Examples and usage: FreeBSD find out RAM size Including Total Amount of Free and Used Memory Size