I want to know why psutil's virtual memory used or active do not match the value I get from the linux command 'free -m' What I want to know is the physical system memory used.
virtual_memory().total / 1024 / 1024 = 29741
virtual_memory().used / 1024 / 1024 = 7967
virtual_memory().active / 1024 / 1024 = 2259
total used free shared buff/cache available
Mem: 29741 1148 21773 16 6819 28322
Swap: 0 0 0
I'm guessing that virtual_memory().used returns physical mem + shared mem + cached mem but still, active memory should match 1148.