0

I'm using vm_stat to calculate RAM info like here

But when I try to add all the values and multiply it with page size im getting approx. 1.3gb less.

Mach Virtual Memory Statistics: (page size of 4096 bytes)
Pages free:                               22064.
Pages active:                            580105.
Pages inactive:                          472217.
Pages speculative:                         5594.
Pages throttled:                              0.
Pages wired down:                        559999.
Pages purgeable:                          29101.
"Translation faults":                 261945239.
Pages copy-on-write:                    6941679.
Pages zero filled:                    165324784.
Pages reactivated:                     14573079.
Pages purged:                           1602247.
File-backed pages:                       203023.
Anonymous pages:                         854893.
Pages stored in compressor:             1732046.
Pages occupied by compressor:            456427.
Decompressions:                        11423912.
Compressions:                          20641865.
Pageins:                                4475678.
Pageouts:                                 32877.
Swapins:                                1714616.
Swapouts:                               2389086.

So by adding first 6 values and multiplying with page size, im getting 6.7GB but my mac has 8GB.

So what is going wrong?

or

Is there any other way to get RAM info like used,wired,free?(Other than top)

Thank you!

1 Answer 1

2

Found the answer here.

To get Total RAM, we also need to add Pages occupied by compressor.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .