Estimating total memory usage in any Linux system

Pintu Agarwal pintu.ping at gmail.com
Wed May 20 02:11:21 EDT 2020


On Wed, 20 May 2020 at 11:02, Valdis Klētnieks <valdis.kletnieks at vt.edu> wrote:
>
> On Wed, 20 May 2020 10:26:50 +0530, Pintu Agarwal said:
> > I know it is weird to manually arrive a MemTotal from the values of meminfo.
> > But I am actually looking for general formula.
>
> You missed the point - the "general formula" has probably changed over the years.
>
> > With this I could arrive to some result, but I have some doubts:
> > * Is Mapped already included in Active/Inactive (file) ? Because
> > mapped is coming from NR_FILE_MAPPED.
>
> And that's the sort of question that can have different answers for 3.18 and 5.7.
>
I am okay for even the latest kernel. I am even trying to get this on
5.5 kernel or higher.
But my questions remains the same.
What will be the equation for even 5.7 kerne ?



More information about the Kernelnewbies mailing list