Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

8
  • What if I want just one number (minimum free memory from log)? is it possible with awk?
    – mrgloom
    Commented May 12, 2017 at 8:46
  • Seems it should be: atopsar -r /var/log/atop/atop_20170512 -m -R 1 | sed 1,6d | awk '{print $3}' | sed 's:M::g' | sed 's:[^0-9]*::g'| awk 'NF' | sort -n | head -n 1
    – mrgloom
    Commented May 12, 2017 at 10:20
  • Thats technical correct so far, but you should think about your intentions of finding out lowest "free memory". free memory can also be low, when the system uses memory as cache because the applications do not require the whole memtotal. Also paged out memory to swap could be important for any memory related investigations. Good luck Commented May 12, 2017 at 10:27
  • Seems memfree is not 'correct', I don't know how it's calculated, but even in days without heavy load on server it shows about only 30% of memory free.
    – mrgloom
    Commented May 12, 2017 at 10:31
  • Sounds perfectly fine for me, as linux utilizes memory for buffers and caches until an application requires more memory. try out: free -m and compare "free memory" with "available memory": daniel@trucka:~$ free -m total used free shared buff/cache available Mem: 1888 312 734 17 840 1496 Swap: 2047 0 2047 As you can see in my example: there is 1496M of memory available, but 840 are currently used for caches (which is fine). Commented May 12, 2017 at 10:41