Six Simple Ways to Test Your Linux Memory Usage

Six Simple Ways to Test Your Linux Memory Usage

Linux has many tools that can be used to optimize and administer your system. You can find the right tools for your system administration here Linux is getting new features If you are new to Linux or have just made the move from Windows to it, there are a few commands that will help you get the best out of it. Linux is a popular operating system that allows the administrator or user to have full control. Ubuntu, Mint or Debian are all options Linux distribution, You can accomplish anything with the right tools and commands.

We’ll be focusing on Linux’s memory usage in this article. This is an essential skill. You may find that some apps are hogging system memory. In these cases, it is important to understand the correct steps for troubleshooting. These are some of the most powerful command-line tools that can be used to monitor memory usage in Linux systems.

6 easy ways to check memory usage on linux

1. Commandment “Top”

A summary of all running processes will be displayed by the top command line tool. It also includes information about memory usage in real time, which you can use as a monitoring tool. This will allow you to view the total amount of system memory used. Then, you can look through the process list and see what percentage of each one is using that memory.

Simply type the following command to run the tool:

$ top

The “top” command

You can see your Linux system’s total memory and available memory, as well as used and available swap and physical memory. The most crucial column in this example is %MEM. It tells how much physical memory each program used. This will allow you to identify and eliminate the app that is eating too much memory.

You can also use the top command line tool to monitor CPU utilization. To see the processing power used by each application, simply check the column %CPU.

2. The Command “Free”

The top command is sufficient if you only need information about the system’s memory consumption. You can use the free command. Typing free In the terminal, you can immediately see how much swap or physical memory is available. You will also be able to see information regarding the use of buffers by the kernel.

The “free” command

Remember that memory usage information is not displayed in real time. To monitor your memory usage, you can use the command-line free tool. This is basically a screenshot showing you the amount of memory that was available or how many were used at the time you entered it. If you need to track memory usage, or find out how many memory-consuming processes are running at once, use the top command.

3. The command “htop”

The top command, htop, is basically the top command. It has an easier to read environment and more user-friendly controls. This command displays RAM usage and lists all running processes. It also gives shortcuts to control those processes. If you are able to see which process is consuming too much RAM you can hit the shortcut key and kill it.

The “htop” command

Type the following to activate the htop command: htop Use the terminal. You might encounter an error, however, if the default tool is not available in your Linux distribution. If that happens, you can use the following command to install it:

$ sudo apt-get install htop

4. The command “vmstat”

The vmstat command displays the report on virtual memory statistics. This command can provide more information than what you might need but is important if you want to become a Linux administrator. Here are the contents of this report:

  • It is the number of processes that are necessary to run time.
  • It is the amount of memory that has been swapped and freed, as well as caches, buffers, and memory available.
  • Received and sent blocks to an IO (block device).
  • CPU times (user time, system time, idle time).

Type vmstatTo view the report on virtual memory statistics, use the termina.

The “vmstat” command

5. You can check the File “proc/meminfo”

You may be curious about where Linux gets these reports on RAM usage. Most of the command-line tools that you have used in the past all come from the same source, the virtual proc/meminfo. The following command can be used to access the source file and retrieve all information about memory usage:

less /proc/meminfo

Check the “proc/meminfo” file

This report can be quite lengthy so it is best to use the less To quickly search the output and find the information you are looking for, use the command. This detailed report may contain a lot more information than you actually need. Here are some of the key values that you need to focus your attention:

  • MemTotal
  • MemFree
  • MemAvailable
  • Buffers
  • Cached
  • SwapCached
  • SwapTotal
  • SwapFree

6. Make use of the GUI

Linux purists may be opposed to using the GUI instead of command-line tools. However, visualizing RAM usage is extremely useful. The Linux System Monitor app allows you to monitor the memory use of your system in real time and get all the information that you require.

Type “System Monitor” into the search bar in the top menu and hit the Enter key to use the app Enter. . Two tabs in the System Monitor are of interest to us: The Processes and Resources tabs.

Use the gui

However, the Resources tab offers a visual visualization that will allow you to see how your CPU and system memory have behaved.

Use the gui

This is where you will find the CPU,, RAM, You can also view network history in a graph. You can view historical data about your system’s memory use over time, and also track that usage live. 

Which command do you prefer for checking the amount of memory being used by your Linux operating systems? What other commands or tools do you have that provide more useful data to analyze? Comment below to let us know!

Leave a Reply

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