"nettop" - Processes Top Network Usages

This section provides a tutorial example on how to use the 'nettop' command to display running processes sorted by top usages of network resources.

What Is the "nettop" Command? - The "nettop" command displays running processes sorted by top usages of network resources.

Here is an example of the "top" command output screen.

herong$ nettop

                                                  interface         state  bytes_in bytes_out
apsd.84                                                                    9138 B    6348 B
   tcp4 192.168.1.191:59880<->17.188.168.141:5223       en7   Established  4300 B    2310 B
   tcp4 192.168.1.191:59879<->17.57.145.165:5223        en7   Established  4838 B    4038 B
httpd.85                                                                      0 B       0 B
   tcp4 *:*<->*:*                                                  Closed
usbmuxd.88                                                                   11 KiB  9405 B
   tcp4 192.168.1.191:60076<->192.168.1.120:65356       en7   Established    11 KiB  9405 B
mDNSResponder.170                                                            81 MiB  2254 KiB
   udp6 *.65054<->*.*                                                         0 B       0 B
   udp4 *:65054<->*:*                                   en7                 171 B     116 B
   udp6 *.64260<->*.*                                                         0 B       0 B
   udp4 *:64260<->*:*                                   en7                 171 B     116 B
   udp6 *.61656<->*.*                                                         0 B       0 B
   udp4 *:61656<->*:*                                   en7                 169 B     114 B
   udp6 *.5353<->*.*                                  awdl0                  74 KiB    66 KiB
   udp4 *:5353<->*:*                                    en7                  81 MiB  2187 KiB
ntpd.209                                                                     13 KiB    14 KiB
   udp4 169.254.48.230:123<->*:*                        en8                   0 B       0 B
   udp6 fe80::aede:48ff:fe00:1122%en5.123<->*.*         en5                   0 B       0 B
   udp6 fe80::509b:eaff:fe30:21e4%awdl0.123<->*.*     awdl0                   0 B       0 B
   udp6 fe80::4872:4fa9:3a5c:98af%utun1.123<->*.*     utun1                   0 B       0 B
   udp6 fe80::3690:7aca:3c17:18f7%utun0.123<->*.*     utun0                   0 B       0 B
   udp4 192.168.1.191:123<->*:*                         en7                  13 KiB    14 KiB
   udp6 fe80::1%lo0.123<->*.*                           lo0                   0 B       0 B
   udp6 ::1.123<->*.*                                   lo0                   0 B       0 B
   udp4 127.0.0.1:123<->*:*                             lo0                   0 B       0 B
WiFiAgent.642                                                                 0 B       0 B
   udp4 *:*<->*:*
SystemUIServer.650                                                            0 B    6584 B
   udp4 *:*<->*:*
   udp4 *:*<->*:*
   udp4 *:60351<->*:*                                   en7                   0 B    6584 B
   udp4 *:*<->*:*
   udp4 *:*<->*:*
com.apple.WebKi.938                                                         182 B     664 B
...

You can also specify the pid (process id) to watch net resource usages of a given process using the "-p n" option.

herong$ nettop -p 84

                                                    interface       state bytes_in bytes_out
apsd.84                                                                   9456 B    6954 B
   tcp4 192.168.1.191:59880<->17.188.168.141:5223      en7 Established 4459 B    2613 B
   tcp4 192.168.1.191:59879<->17.57.145.165:5223       en7 Established 4997 B    4341 B

Table of Contents

 About This Book

 Macintosh OS (Operating System) History

 macOS Operating System

 macOS File Systems

 macOS Network Connections

System and Application Processes

 What Is a Running Process

 Use Activity Monitor on macOS

 "ps" - Process Status Command

 "top" - Display Top Processes

"nettop" - Processes Top Network Usages

 "Finder" Process - File Browser on Mac

 "WindowServer" Process - Drawing Graphics on Screen

 "Dock" Related Processes

 "Siri" Processes - Voice Command Interpreter

 "mds" Processes - Metadata Server and Spotlight

 "spindump" Processes - Dump Memory Contents

 "login" Processes - Login Window and Services

 "softwareupdate" Processes - Update System and Apps

 "TeamsUpdater" Process from Microsoft Teams

 Keychain Access - Password Manager

 Keychain Access - Certificate Manager

 Productivity Tools on macOS

 Programming Tools on macOS

 Apache Web Server on macOS

 Develop and Run Java Applications

 Full Version in PDF/EPUB