This article will show you how to find the amount of RAM memory on a Linux machine. To find this information you will need to login to the Linux command-line shell and and enter the following command at the $ (or #) prompt:
$ cat /proc/meminfo
Sample Output
MemTotal: 1031960 kB
MemFree: 391172 kB
Buffers: 36576 kB
Cached: 238124 kB
SwapCached: 0 kB
Active: 321984 kB
Inactive: 180664 kB
HighTotal: 129920 kB
HighFree: 248 kB
LowTotal: 902040 kB
LowFree: 390924 kB
SwapTotal: 2040244 kB
SwapFree: 2040244 kB
Dirty: 196 kB
Writeback: 0 kB
AnonPages: 227940 kB
Mapped: 38740 kB
Slab: 84916 kB
SReclaimable: 11080 kB
SUnreclaim: 73836 kB
PageTables: 3168 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 2556224 kB
Committed_AS: 723980 kB
VmallocTotal: 114680 kB
VmallocUsed: 10036 kB
VmallocChunk: 103668 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
Hugepagesize: 4096 kB
What does this mean?
The interesting fields to look at in the output are: MemTotal and MemFree
MemTotal – This is the total amount of physical RAM memory that your computer has in kB. If you take this number, 1031960 for example, and divide it by 1024, you get the number of MB (Megabytes) which is ~ 1000 MB. If you divide this number by another 1024 then you get GB (Gigabytes) which is ~ 1 GB in this case.
MemFree – This field indicates the amount of free physical RAM memory you have available. This value is also in kB so simply divide it by 1024 to figure out the amount in MB. If the amount of free memory is significantly low, it may be time to upgrade the amount of RAM in your computer.
How to find what programs are using up the most memory?
This topic will be discussed in more detail in a separate article. To to find a list of all programs/processes running on a Linux machine and how much memory they are using up, use the top command.
Helpful, thank you!
the same thing we can do including with command like
$top
but i find this article very helpful also
Thanks
Helpful
THanks
using
$free command also we can get the physical memory.
ex: [root@Func-22 ~]# free
total used free shared buffers cached
Mem: 2055668 1940780 114888 0 298060 438004
-/+ buffers/cache: 1204716 850952
Swap: 4128760 8 4128752
Here Mem: 2055668 is the physical memory….
jai.