Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Determine 'Free' Memory in Linux

I'm wondering if there is an easy way to determine the amount of "utilized" memory in Linux. Specifically, memory that is actively in use by the Kernel and applications and not counting the buffers and cached memory. I'm looking for something analogous to Window's reporting of used memory found in the task manager (Where you see the percentage of memory used).

So far, the closest solution I can think of to calculate it comes from this link: Determining Free Memory on Linux

On my Ubuntu 13.0.4, doing a cat /proc/meminfo, I then calculate 100-(((MemFree+Buffers+Cached)/MemTotal)*100) which should give the percentage of "utilized" memory.

This is the closest way I found to get a Physical Memory percentage like the one found in window's task manager.

Does this seem like a valid approach? And if so, are there more straight-forward approaches?

like image 663
sager89 Avatar asked Jul 14 '26 12:07

sager89


1 Answers

I am a fan of free -m

             total       used       free     shared    buffers     cached
Mem:          1446       1172        273          0        225        821
-/+ buffers/cache:        126       1320
Swap:         1471          0       1471
like image 64
RyPope Avatar answered Jul 17 '26 14:07

RyPope



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!