Advertisement
Advertisement


Understanding the output of top on Mac


Question

$ man top
     CPU         Percentage of processor usage, broken into user, system, and idle components.  The time period for which
                 these percentages are calculated depends on the event counting mode.

     Disks       Number and total size of disk reads and writes.

     LoadAvg     Load average over 1, 5, and 15 minutes.  The load average is the average number of jobs in the run 
                 queue.

     MemRegions  Number and total size of memory regions, and total size of memory regions broken into private (broken
                 into non-library and library) and shared components.

     Networks    Number and total size of input and output network packets.

     PhysMem     Physical memory usage, broken into wired, active, inactive, used, and free components.

     Procs       Total number of processes and number of processes in each process state.

     SharedLibs  Resident sizes of code and data segments, and link editor memory usage.

     Threads     Number of threads.

     Time        Time, in H:MM:SS format.  When running in logging mode, Time is in YYYY/MM/DD HH:MM:SS format by
                 default, but may be overridden with accumulative mode.  When running in accumulative event counting
                 mode, the Time is in HH:MM:SS since the beginning of the top process.

     VirtMem     Total virtual memory, virtual memory consumed by shared libraries, and number of pageins and pageouts.

     Swap        Swap usage: total size of swap areas, amount of swap space in use and amount of swap space available.

     Purgeable   Number of pages purged and number of pages currently purgeable.

     Below the global state fields, a list of processes is displayed.  The fields that are displayed depend on the 
     options that are set.  The pid field displays the following for the architecture:

     + for 64-bit native architecture, or - for 32-bit native architecture, or * for a non-native architecture.

I see the following output of top on Mac. I don't quite understand as the manual is not very detailed.

For example, I only have 8GB of memory. Why it shows 15G PhysMem? What are wired, active, inactive, used, and free components?

For Disks, are the numbers '21281572/769G read' the size of disk read since the machine starts?

For Networks, are the numbers since the machine starts?

For VM, what are vsize, framework vsize, swapins, swapouts?

$ top -l 1 | head
Processes: 797 total, 4 running, 1 stuck, 792 sleeping, 1603 threads 
2019/05/08 09:48:40
Load Avg: 54.32, 41.08, 34.69 
CPU usage: 62.2% user, 36.89% sys, 1.8% idle 
SharedLibs: 258M resident, 65M data, 86M linkedit.
MemRegions: 78888 total, 6239M resident, 226M private, 2045M shared.
PhysMem: 15G used (2220M wired), 785M unused.
VM: 3392G vsize, 1299M framework vsize, 0(0) swapins, 0(0) swapouts.
Networks: packets: 24484543/16G in, 24962180/7514M out.
Disks: 21281572/769G read, 20527776/242G written.
$ df -h
Filesystem                                            Size  Used Avail Use% Mounted on
/dev/disk1s1                                          466G  444G   19G  97% /
/dev/disk1s4                                          466G  3.1G   19G  14% /private/var/vm
/dev/disk2s1                                          932G  546G  387G  59% /Volumes/usbhd
[email protected]/dev/disk1s1  466G  441G   19G  96% /Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/py???s MacBook Air/2019-05-06-225547/Macintosh HD
[email protected]/dev/disk1s1  466G  440G   19G  96% /Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/py???s MacBook Air/2019-05-02-082105/Macintosh HD
2019/05/08
1
1
5/8/2019 3:03:43 PM