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.
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;
tov = ((double)mem.available) * 100.0 / mem.total;
And then if it works as expected, perhaps a second memory sensor can be added.