Below is a screenshot of Activity Monitor on mac os. I wonder what command line I can use to get the memory usage. I tried below command:
$ top -l 1 -n 0 Processes: 399 total, 3 running, 396 sleeping, 2460 threads 2018/03/07 19:54:01 Load Avg: 7.41, 6.55, 6.23 CPU usage: 58.38% user, 12.97% sys, 28.63% idle SharedLibs: 191M resident, 54M data, 24M linkedit. MemRegions: 193162 total, 6016M resident, 107M private, 3067M shared. PhysMem: 16G used (3042M wired), 70M unused. VM: 2858G vsize, 1100M framework vsize, 178320755(0) swapins, 184739800(0) swapouts. Networks: packets: 10995802/17G in, 9674758/13G out. Disks: 15617288/823G read, 11170324/846G written.
These two lines:
MemRegions: 193162 total, 6016M resident, 107M private, 3067M shared. PhysMem: 16G used (3042M wired), 70M unused.
tells me the Physical Memory(16G + 70M), Wired Memory(3042M) and Compressed memory(107M + 3067M). But I don't know how to calculate the App Memory shown in the screenshot. Does anyone know how to get the App memory value? I need that one to calculate the total used memory on Mac OS.