As we mentioned above, we will work on Ubuntu Therefore, we need to open the Terminal application to explain RAM monitoring tasks. Using the following command, you can check how much RAM is installed on your Ubuntu The above command is used to check memory and swap utilization on your system in a few lines.
If you will not use any switch, then the output to be printed in kilobytes. It is better to use switch -h along with the free command that shows the installed RAM and swap utilization in 3 nearest possible digit format. The available and columns represent the available free GBs for use and about the RAM that how much is used in your system respectively.
The -s switch allows free to run continuously for seconds, it shows a new output after the specified number of seconds. For example, we want to execute the free command for every 3 seconds then we will use the following command:. You can check how much RAM you have installed on your Ubuntu As you can see from the marked section of the screenshot below, the total installed RAM on my Ubuntu As you can see from the marked section of the screenshot below, the RAM used on my Ubuntu There are different types of RAM available in the market.
Every RAM or memory module these days has different profiles. Each of these profile define the clock speed at which the RAM should be running. You can check the type of RAM you have installed on your Ubuntu You should see the following window as shown in the screenshot below. MemAvailable is an estimate of how much memory is available for starting new applications. DirectMap4k represents the amount of memory being mapped to standard 4k pages, while DirectMap2M shows the amount of memory being mapped to 2MB pages.
The getconf command is one that will provide quite a bit more information than most of us want to contemplate. Pare that output down to something specific with a command like the one shown below, and you'll get the same kind of information provided by some of the commands above. That command calculates memory by multiplying the values in the first and last lines of output like this:. Another command with very digestible output is top. In the first five lines of top's output, you'll see some numbers that show how memory is being used.
And finally a command that will answer the question "So, how much RAM is installed on this system? Depending on how much detail you want to see, Linux systems provide a lot of options for seeing how much memory is installed on your systems and how much is used and available.
Sandra Henry-Stocker has been administering Unix systems for more than 30 years. She describes herself as "USL" Unix as a second language but remembers enough English to write books and buy groceries. Finally, you might find useful to use the top and htop interactive commands in order to track your memory usage. As you can see here, you are provided with CPU statistics but also with the total amount of RAM and swap used by your system.
Statistics are given for your complete system but they are also provided for every single process on your instance sorted from top to bottom. The htop command can also be effectively used in order to provide a human-friendly memory tracking on your server.
In this tutorial, you learnt about the many different ways to check your RAM on Linux using either the command-line or modern monitoring solutions such as Prometheus and Grafana. If you need to improve memory management on your system, you should definitely check tutorials related to swap as they elaborate more about the importance of virtual memory on your system.
If you are interested in Linux system administration, make sure to have a look at other tutorials that we have on the subject. Save my name, email, and website in this browser for the next time I comment.
This site uses Akismet to reduce spam. Learn how your comment data is processed. All rights reserved.
0コメント