0

I use atop cmd to check memory usage. on the screenshot use can I see I have 1gb total, and 300mb free. how do I found out what consumes other ~700mb? I tried to use atop cmd, but that doesn't give me much information.

enter image description here

Mofi
  • 46,139
  • 17
  • 80
  • 143
  • Why don't to try htop command? ? It provides a better interface to sort based on many factor like memory, cpu, time, etc . – Vidya Sagar Jul 04 '17 at 07:23
  • 1
    I think this is better suited to ServerFault than the programmer specific StackOverflow. – Joe Jul 04 '17 at 07:27

2 Answers2

2

a memory leak occurs when a process doesn't give memory back that it doesn't need anymore so first run top and type > key to sort by memory utilization or virtual memory utilization you should review how much swap you are using in /proc/meminfo then check the inactive(anon) if it has high value that is bigger than the swap memory then make your swap is greater than it finally, run free -m to see the memory details if you find cache is high run the following command

echo 3 > /proc/sys/vm/drop_caches; sync

then run free -m again to see the changes

rolly4444
  • 67
  • 5
1

I think glances utility is better suited for this purpose. It is more user friendly and provides various options for real time server stats. For more information about the utility, see this page.

Lohit Gupta
  • 1,045
  • 6
  • 11