2

I have a Redhat system which has a total of 64GB RAM. As per free output it is utilizing 47GB of RAM.

 free -g
             total       used       free     shared    buffers     cached
Mem:            62         59          2          0          3          8
-/+ buffers/cache:         47         15
Swap:            7          0          7

But when I added the individual memory usage of the processes, total memory usage value appears to be around 37GB much less than 47GB. Can someone please explain why there is a difference of 10GB in these two.

I tried reading many man pages and articles. But none of them were helpful for a mere mortal like me.

Is there a way to visualize every bit (pun intended) of the used memory of free output (in my case 47GB)?

ps -eo size |  awk '{mem += $1} END {print mem/1024/1024}'
37.2644

ps aux |awk '{rsstotal += $6} END {print rsstotal/1024/1024}'
17.9053

This is what /proc/meminfo shows:

cat /proc/meminfo
MemTotal:       65963224 kB
MemFree:         2923708 kB
Buffers:         3716988 kB
Cached:          9134512 kB
SwapCached:        36260 kB
Active:         21634524 kB
Inactive:        9797536 kB
Active(anon):   16855836 kB
Inactive(anon):  1725656 kB
Active(file):    4778688 kB
Inactive(file):  8071880 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       8241144 kB
SwapFree:        8066288 kB
Dirty:              3720 kB
Writeback:             0 kB
AnonPages:      18561916 kB
Mapped:            31756 kB
Shmem:               732 kB
Slab:           14282976 kB
SReclaimable:   13920332 kB
SUnreclaim:       362644 kB
KernelStack:       33944 kB
PageTables:        71732 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    32834148 kB
Committed_AS:   21413336 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      262076 kB
VmallocChunk:   34359450304 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
HugePages_Total:    8192
HugePages_Free:     7840
HugePages_Rsvd:       55
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:        8192 kB
DirectMap2M:     2088960 kB
DirectMap1G:    65011712 kB

Can someone please help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.