I want to know why the used or active psutil virtual memory does not match the value that I get from the linux 'free -m' command. I want to know that physical system memory is being 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 assume that virtual_memory (). used returns physical mem + shared mem + cached mem but still active memory must match 1148.
source share