Page 2 of 2

Re: how to exclude the Linux cached memory from the monitori

Posted: Thu Jun 20, 2019 10:45 pm
by vivma1989
is this correct?

total - free = 8193052 - 6360556 = 1832496 # with "-m"
total - free - cached = 8193052 - 6360556 - 856036 = 976460 # without "-m"

if we are calculating (total)-(free)-(cache), then it should be equal to the "used" memory shown by the free command?

please correct me if i am wrong here

Re: how to exclude the Linux cached memory from the monitori

Posted: Fri Jun 21, 2019 8:56 am
by lmiltchev
The output of the second command would never match the output of the free command... In the free command both, the cached memory AND the buffers are subtracted... On the other hand, the plugin subtracts ONLY the cached memory, but NOT the buffers...
-/+ buffers/cache: 791108 7401944
Other words, instead of this:
total - free - cached = 8193052 - 6360556 - 856036 = 976460 # without "-m"
you would have this:
total - free - cached - buffers = 8193052 - 6360556 - 856036 - 185352 = 791108 # without "-m"