Check the installed, used and available RAM on your Ubuntu system

about check the installed ram

In the next article we will see how we can check RAM and its status. While using Ubuntu, users can find themselves in many scenarios in which RAM has to be taken into account. For this reason it is always interesting to know how much RAM is installed, if our RAM is error free or how much of it we can use.

RAM memory (random access memory) we could consider it as the workspace of your computer system. In the following lines we are going to see some of the things we can do with respect to the installed RAM. In this example, we will do all of this through the Ubuntu 18.04 command line.

How to check installed, used and available RAM

About drop_caches
Related article:
Drop_caches, clean the RAM memory on your system from the terminal

The easiest and fastest way to check memory statistics in Ubuntu it is through the command free. We just have to open a terminal (Ctrl + Alt + T) and write it:

view memory using free command

free

With this command we can verify memory and usage swap in your system using a few lines. Without writing any options to the command, the displayed output will be printed in kilobytes.

A good alternative is use -h option for the free command to show memory and swap in 3 digit format, as close as possible:

view RAM memory expressed in GB

free -h

On the line 'Conference proceedings'from the output that the command is going to show us, we will be able to see the information about the RAM in your system. Total column it will show us the total in GB of RAM. The columns shown below show the RAM your system is using and the size available for use.

The following command is the longest version of the FREE command, in which we will find the concept of inactive memory. This term is used to speak of memory in use but not allocated to any process, making it free memory for all intents and purposes:

vmstat command results

vmstat -s -S M

May get similar results by catching the file / proc / meminfo.

Check the speed and type of RAM

about dmidecode
Related article:
Dmidecode, check the BIOS version and other data from the terminal

Before starting it may be necessary to indicate that the type of RAM today comes in many different profiles, depending on data and transfer rates. Among them we can find DDR1, DDR2, DDR3, etc For portable devices we will find DRAM or SDRAM.

Regarding the speed of the RAM we will be referring to the clock cycles. A cycle refers to a single read and write session, so the speed of the RAM means how many cycles per second can be performed.

With the following command we will be able to verify the type of RAM that our equipment uses. In a terminal (Ctrl + Alt + T) we are going to write:

check the clock speed and RAM type

sudo dmidecode --type memory | less

In the command output you can locate in the field "TypeThe type of RAM or the set clock speed, which in this case is 1333 MT / s.

When you finish, press the 'keyq' to close.

Check RAM for errors using MemTester

Since RAM is a fragile device, its performance could be compromised if it suffers. For check RAM for possible errors, we will be able to use MemTester.

To install this utility on our Ubuntu system, we will have to open a terminal (Ctrl + Alt + T). Once in it, first we will update the available packages index. With this we will be able to guarantee that the latest available version of the selected software is installed in our system:

sudo apt update

Now we are going to use the following command in the same terminal to install Memtester:

install memtester command

sudo apt install memtester

This is the using the memtester command:

use of memtester

As an example we will see how through the following command they will check the 400 MB of RAM space in two iterations:

memtest command data

sudo memtester 400M 2

As you can see in the previous screenshot, the verification for this example has been correct.

It has to be said that this command has a limitation. It will only be able to scan the RAM up to the size of free RAM on your system. If you want to thoroughly test your RAM, the best option is Utility memtest86 + which you can find in the GRUB start menu.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.