Unix admin tutorial: How much memory is in this machine?

It would seem that answering this question ought to be easy; it is -- but every system has the answer in a different place. Most put an answer of some sort into kernel messages reported by dmesg (AIX, for one, apparently does not).

But, why would you need to know how much memory is in a machine?

  • Determine the need for expansion: An upgrade of a system from one operating system version to the next may require more memory. Knowing how much is in the machine will help you to determine if the system satisfies the new requirements.
  • System load analysis: If your system is heavily used, you will want to know how much memory is in the machine in order to properly analyze whether the system is properly handling the system load. Is the amount of memory sufficient, or does additional memory need to be added?
  • Memory deallocation tracking (in

Requires Free Membership to View

  • HP terminology): When memory goes bad, many midrange servers will remove the memory from use and thus the total physical memory reported will go down. Knowing what is in the machine will help you recognize when this happens.
  • Inventory tracking: Suppose, for example, that the server is sent in for service with 32G of memory and comes back with 28G. Where did the memory go?

As you can see, knowing how much physical memory is in the system is important. So, how do you go about taking inventory of your system memory?

Most systems have a program for system inventory which reports a variety of things, including memory. Inventory programs vary widely and none are the same.

Rather than go into great detail about each environment and how to find total physical memory details for each one, we'll just put these out there for you to reference. Each environment has multiple commands that give available memory; each command is listed succinctly below.

Without further ado, here are a few answers to this burning question:


  1. dmesg | grep mem
  2. prtdiag | grep Memory
  3. prtconf -v | grep Memory


  1. bootinfo -r
  2. lsattr -E1 sys0 -a realmem
  3. getconf REAL_MEMORY


  1. dmesg | grep Physical
  2. /opt/ignite/bin/print_manifest | grep Memory
  3. machinfo | grep Memory


  1. dmesg | grep Memory
  2. grep -i memtotal /proc/meminfo
  3. free


  1. show mem /page


  1. dmesg | grep memory
  2. grep memory /var/run/dmesg.boot
  3. sysctl -a | grep mem

ABOUT THE AUTHOR: David Douthitt (RHCE, LPIC1, SCSA, Linux+, CNA) is a UNIX Systems Administrator for a major healthcare software company. His blog is Unix Administratosphere, where he continues to write on UNIX, Linux and OpenVMS. He has also written two books on system administration. He still has his copy of Red Hat 2.0 and 4.4BSD.

This was first published in June 2008

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.