1

So I'm running top -stats pid,command,kprvt,vsize,rprvt and I get the following output:

Processes: 314 total, 2 running, 312 sleeping, 1827 threads                            13:05:41
Load Avg: 5.02, 4.32, 4.20  CPU usage: 22.82% user, 11.76% sys, 65.41% idle
SharedLibs: 173M resident, 56M data, 14M linkedit.
MemRegions: 124907 total, 1560M resident, 62M private, 649M shared.
PhysMem: 8082M used (3189M wired), 109M unused.
VM: 3244G vsize, 1987M framework vsize, 287575527(192) swapins, 300917960(0) swapouts.
Networks: packets: 13403531/8415M in, 10226281/3149M out.
Disks: 29569952/1427G read, 17952018/1367G written.

PID               COMMAND                     KPRVT           VSIZE           RPRVT
441               Terminal                    N/A             N/A             N/A
62759             com.apple.WebKit            N/A             N/A             N/A
235               WindowServer                N/A             N/A             N/A
0                 kernel_task                 N/A             N/A             N/A
147               hidd                        N/A             N/A             N/A
2686              com.apple.WebKit            N/A             N/A             N/A
63156             top                         N/A             N/A             N/A
42514             plugin-container            N/A             N/A             N/A
37592             firefox                     N/A             N/A             N/A
535               Safari                      N/A             N/A             N/A
581               com.apple.WebKit            N/A             N/A             N/A
62714             WebexHelper                 N/A             N/A             N/A
91                RTProtectionDaem            N/A             N/A             N/A
427               FrontendAgent               N/A             N/A             N/A

However Brew's htop can display virtual memory just fine. What am I doing wrong?

1 Answer 1

2

For MacOS to show those values, you must include the -r parameter.

Add it to the command line you are using:

Eg: top -r -stats pid,command,kprvt,vsize,rprvt

1
  • Thank you @Prado! -r Traverse and report the memory object map for each process. I wouldn't have guessed it from the description. Thanks again! Commented Sep 23, 2023 at 1:22

You must log in to answer this question.

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