OpenBSD: Find Out Memory RAM Size Information

How do I check for installed RAM (memory) size on a OpenBSD UNIX operating systems using command line?

You need to use the following commands to see installed memory and other information such as installed CPU can be displayed:[donotprint]
Tutorial details
Difficulty level Easy
Root privileges No
Requirements None
Est. reading time 2m
[/donotprint]

a) dmesg command – Display the OpenBSD system message buffer including boot time info.

b) sysctl command – Display or set the OpenBSD system sysctl (kernel) variables.

Method #1: Display real and user installed memory on OpeBSD

Type the following command:
# dmesg | grep -i mem
OR
# grep -i mem /var/run/dmesg.boot
Sample outputs:

real mem = 3500277760 (3338MB)
avail mem = 3398483968 (3241MB)

Method #2: OpenBSD show installed RAM memory size

Type the following command

sysctl hw | grep mem

OR

sysctl  | grep -i hw.\*mem

Sample outputs:

hw.physmem=3500277760
hw.usermem=3500253184

Or simply get full hardware info, type:

sysctl hw

Sample outputs:

How much RAM is installed on a OpenBSD server?


🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 1 comment so far... add one


CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
1 comment… add one
  • Matias Colli May 28, 2014 @ 2:09

    Or just type: sysctl -a | grep -i memory

    Matias Colli
    Perito Judicial en Informática

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum