Skip to content

mem.available may be more useful than mem.free. #21

Description

@JamesNewton

As per
https://gitlab.com/jeanfi/psensor/-/issues/10 "On my laptop (Ubuntu 18.04, 8750H, Geforce 1070), pSensor 1.1.5 reports free memory percentage and used GPU memory percentage. This inconsistency is confusing."

The better measure of memory is, I think, mem.available rather than mem.free.

This can be tested by just changing
https://github.com/chinf/psensor/blob/master/src/lib/pgtop2.c#L98
from
v = ((double)mem.free) * 100.0 / mem.total;
to
v = ((double)mem.available) * 100.0 / mem.total;

And then if it works as expected, perhaps a second memory sensor can be added.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions