

Screenshot of top command showing an easy way to find RAM size in LinuxĪs you see on the screenshot, top command shows the total memory usage on an option called: KiB Mem (32753636 total in my case).

Top command is one of my favourite and most used tools to quickly check out system performance, but it can also be used to get valuable hardware information. :~] free -htĪs you see on this output, now the free command is showing the information in sizes humans can read. h is used to transform bytes into human readable units, and -t is used to display a line showing the column totals. Let’s use two useful parameters that can be added to the free command: free -ht The last line belongs to the swap memory, which is reporting around 1GB of usage.īut this byte based numbers are not easy to read. It is normal to see lot of cached memory in the buff/cache on Linux operating systems, this memory can later be freed and used if really needed. Then you have the Free colum that is showing around 1GB, and the others called ‘shared’, ‘buffer/cache’ and ‘available’. The second colum called ‘used’ shows the the RAM used by the operating system, in this case around 9GB. The total OS RAM in bytes is 32753636, which can be translated to 32 GB of RAM installed on the system. Total used free shared buff/cache available The free command is the most classic terminal based tool to check memory usage on Linux / Unix operating systems. Here is the list of the top 5 commands that can be used to find LInux RAM size in Linux. How can I Find RAM size in Linux operating systems?

Lot of times, because of order mistakes, dedicated servers providers will give you less hardware resources than the ones you purchased. On this post, we will find out how to find RAM size in Linux / Unix operating systems with 5 useful commands. This plugin is installed by default on newly monitored servers.When you order a dedicated server or cloud server with your web hosting provider, there is one thing you must check always when you first login into your system: your hardware must be exactly the same as ordered.

If you are using Scout, Eric Lindvall’s Memory Profiler plugin already takes the buffer cache into account when determining free memory. That’s 95x more free memory than than we initially thought. Actual Free MemoryĪctual Free Memory = Free (39 MB) + Buffers (95) + Cached (3590) = 3,724 MB When an important task comes up, he drops the less important chores. The buffer cache works like your most efficient coworker: when things aren’t busy, he runs around making things run smoother. What happens if a program needs more memory than what’s available? The buffer cache will shrink to accommodate the increased memory needs. In fact, Linux uses all free RAM for the buffer cache to make reading data as efficient as possible. Linux caches blocks from the disk in memory. Reading data from a disk is far slower than accessing data from memory. Only 39 MB of free memory? Put down the antacid – you’ve got a lot more free memory than you think. With a quick glance, you might start sweating. When checking the amount of free memory on a Linux server, it’s easy to think you’re running out of memory when you’re not.įor example, here’s the output of free -m on a server with 4GB of RAM:
