Calculate Linux system memory utilization correctly
For the operating system, buffers and cached are already used (Mem: this line)
memfree=total-used314952=24946552-24631600
For the application (corresponding to the-/+ Buffers/cache line)
memfree=buffers+cached+free19536392=152116+19069324+314952
[[email protected] bin] # free total used free shared buffers mem:37 820 37316 504 0 704 swap:0 0 0total:37820 37316 504[[email protected] bin] # cat/proc/meminfo memtotal:37820 kbmemfree:50 0 kbbuffers:704 kbcached:12512 kbswapcached:0 kbactive:11516 kbinactive: 11176 kbactive (anon): 9708 kbinactive (anon): 8160 kbactive (file): 1808 kbinactive (file): 3016 kbunevictable:0 kbmlocked:0 kbswaptotal:0 kbswapfree:0 kbdirty: 0 kbwriteback:0 kbanonpages:9500 kbmapped:4452 kbshmem:8392 kbslab:6432 kbsreclaimable:600 kbsunreclaim:5832 kbkernelstack:592 kbpagetables: 196 Kbnfs_unstable:0 kbbounce:0 kbwritebacktmp:0 kbcommitlimit:18908 kbcommitted_as:8842 8 kbvmalloctotal:966656 kbvmallocused:20720 kbvmallocchunk:918896 kb[[email protected] bin] #
Linux Memory usage details
Calculate Linux system memory utilization correctly