![]() Here is a screenshot of how it looks: top command running It gives the information about memory and CPU. This is probably one of the most common and the one that I use at first. You can see that the free command provides only the necessary info at a glance. RAM, the swap usage and the buffer used by the Linux kernel.Īll you have to do is to type free in the terminal and hit enter: You can see the free and used physical memory i.e. It shows the amount of free and used memory on your Linux system. The free command in Linux has the simplest output. In this article, we will cover how to check memory in different ways and explain a little bit how each of the command lines for this purpose works. 5 Commands to check memory usage in Linux If you want to check disk space in Linux, you use disk related commands. In other words, if you want to check RAM usage in Linux, you use the memory related commands. Note: Memory, physical memory terms are used for RAM (which is a more popular term). ![]() We have already showed you how to check CPU info in Linux, today, I am going to show how to check memory in Linux. No matter which command you use, the info about the RAM or memory that is printed out should match or should be similar across all of them.When using any Linux distribution, it is important as a SysAdmin to know how to visualize your available and used resources, such as memory, CPU, disk space, etc. The above command or example will just print out the field MemTotal from the output, which is the total memory that is installed in the system. You can use other filter text such as mem, or total to print out the rows selectively. As with almost all other commands, you can use grep as in this example. You can use the grep command to narrow or filter the output down to the memtotal row (or a set of rows), which shows you the total installed memory on your system. You are most likely looking for first three or four rows of this table. ![]() It is very unlikely that you will need all of these information. It shows information about the Swap, Memory, High and Low totals, Active and Inactive files, Dirty Pages, Huge Page information and much much more. You can access this from a terminal by the command gnome-system-monitor or access it from the menu, look for a menu entry by the name of System Monitor.Īs you can see there is lot of information in the output, actually way more than what the above screenshot shows. In Gnome, gnome-system-monitor will show you the memory usage and the total memory installed on the system. Graphical InterfacesĪpart from the free and top command, most modern Linux distros also have a GUI option (actually there might be several) that shows the entire system information including the installed memory. You can easily convert it to the metric you want. The memory info is usually printed out in kB or kilo bytes. The first part of the output is the value that you are looking for. So, the following command will print out the memory information… This information is printed out with a line prefix Memory. –human (or -h) will print the output in human readable format, while –total (or -t) will add a row which totals the columns.Īnother option is to check the kernel ring buffer output to see what the kernel detected during the system startup about the installed memory. There are several command line options available with this command to print the information in bytes, kilobytes, megabytes or gigabytes. You can use the free command to find almost all information about the RAM or memory usage and availability. We will mostly concentrate on the command line options in this post. Many people may find the GUI based option much more user friendly to use. There are also a couple of GUI options depending on your distro. ![]() IMHO, This is probably also the quickest and easiest method to use. We will primarily use the command shell in this post to find the memory usage. ![]() Though most of these commands are available across different and all Posix platforms, some are also dependent on the Linux distributions and what libraries or packages you have installed on the system. There are several methods in Linux or Unix machines to determine how much RAM or memory you have installed on your machine. It can also come in handy after you have upgraded the memory on your machine, you want to make sure that the new memory is getting used. This is especially useful if you find that your machine is acting sluggish or crashing repeatedly. Often times you want to know how much RAM or memory is installed on your machine and how much of it is currently being used. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |