I'm trying to figure out how much memory is used by my system, like
so:
var os = require('os'),
total = os.totalmem(),
usage = total - os.freemem(),
percentage = usage / total * 100;
Unfortunately, usage is returning
3804721152 bytes (3.5GB, 95%) while
Ubuntu's System Monitor tells me I am only using 2.2GB (60.1%).
Is freemem bugged, or should I get to my calculations differently?
Regards,
Tom