Methods to check an available memory in Ubuntu 20.04 LTS ?

Are you trying to check the available memory in your Linux Server? 

This guide will help you.


RAM or memory in any computer system helps to fetch the programs from the hard disk, hold them temporarily, schedule their processing, and then send them one by one to the CPU for execution. 

This memory can hold a process only if it has a sufficient amount of space available to accommodate that process. 

That is why it is extremely important for a user in general and a system administrator, in particular, to frequently monitor the available memory.

To find out the available and used disk space, use df (disk filesystems, sometimes called disk free). To discover what's taking up the used disk space, use du (disk usage). Type df and press enter in a Bash terminal window to get started. 


Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to troubleshoot their Linux System.

In this context, we shall look into the different methods of checking the available memory in Ubuntu.


How to check the Available Memory in Ubuntu ?

There are different methods of checking the available memory in Ubuntu 20.04. 

Below we have outlined the most effective methods of doing so.


1. How to use the "top" Command to check Available Memory ?

The "top" command is used in Ubuntu to display your CPU and memory statistics along with the information about the currently running processes. To use this command for checking the available memory in Ubuntu 20.04, you should essentially perform all the following steps:


After launching the terminal in Ubuntu 20.04 by looking for it in the Activities menu, you need to run the command stated below in your terminal:

top

Executing this command will display a detailed output on the terminal. Out of all that information. Here you will see the free memory, the available memory and the free swap memory respectively. 


2. How to use the "free" command along with the "-m" Flag to check Available Memory ?

The "free" command in Ubuntu is used to display the current memory usage of your system. To use this command for checking the available memory in Ubuntu 20.04, you should perform the steps stated below:

After launching the terminal in Ubuntu 20.04 by looking for it in the Activities menu, you need to run the following command in your terminal:

free –m

Executing this command will display information such as free memory, total memory, used memory, available memory and free swap memory.


3. How to use the "cat" Command with "/proc/meminfo" ?

The /proc/meminfo file in Ubuntu contains all the information about the memory usage of your system. For using this file to check the available memory in Ubuntu 20.04, you should perform the following steps:

After launching the terminal in Ubuntu 20.04 by looking for it in the Activities menu, you need to run the following command in your terminal:

cat /proc/meminfo

Here, the "cat" command has been used to display the contents of the /proc/meminfo file on the terminal.

In the output of this command, there will be several memory statistics available that you can examine as per your needs.


4. How to use "vmstat" command along with the "-s" Flag to check memory?

The "vmtstat" command in Ubuntu is used to display all the virtual memory statistics. To use this command for checking the available memory in Ubuntu 20.04, you will have to perform the following steps:

After launching the terminal in Ubuntu 20.04 by looking for it in the Activities menu, you need to run the command stated below in your terminal:

vmstat –s


[Need urgent assistance to perform Linux related tasks? We are available to help you today. ]

This article will guide you on how different methods of checking the available #memory in #Ubuntu 20.04. By following any of these methods, you can check the available memory along with lots of other useful memory statistics of your Ubuntu 20.04 system.

Logical Volume Manager (#LVM) is a software-based RAID-like system that lets you create "pools" of storage and add hard drive space to those pools as needed. There are lots of reasons to use it, especially in a data center or any place where storage requirements change over time.

#Linux by default tries to use RAM in order to speed up disk operations by making use of available memory for creating buffers (file system metadata) and #cache (pages with actual contents of files or block devices), helping the system to run faster because disk information is already in memory which saves I/O #operations 

To check memory #usage on Linux:

1. free command. The free command is the most simple and easy to use command to check memory usage on linux.

2. /proc/meminfo. The next way to check memory usage is to read the /proc/meminfo file.

3. vmstat. The vmstat command with the s option, lays out the memory usage statistics much like the proc command.

4. top command.

5. htop.

Related Posts