Apple - How can I see what bandwidth each App or process is using?
Quote: "How can I know which app or process is using it?"
You can try nettop(1) in the Terminal. It is pre-installed, and refreshes every few seconds to provide a dashboard of all open network connections (by process) with their usage. Better than lsof
since it shows the usage data too.
$ nettop
Then hit 'd' and look for odd-looking entries or entries with consistently large traffic in the 'bytes in' or 'bytes out' column. The 'd' instructs nettop to only show differences in each screen refresh.
Practical usage notes:
If you don't recognize the process name, Google it.
If you don't want the process around, get the pid (the number next to the process name in nettop), and kill it with kill -9 <pid>
. If that doesn't solve it, find out if you can uninstall the process.
If you're interested in what the process is transmitting over the network, use the client port number for that particular connection (e.g. '53133' from 10.0.0.1:53133->74.125.68.100:80
) to run a tcpdump(1) to see the data in the packets being exchanged: sudo tcpdump -nnvvXSs 1514 port 53133
If you're interested in the destination the process is talking to, but the destination IP address doesn't have a reverse DNS hostname (like in the previous example), then try visiting that IP address in a web browser as https://IP, click the broken lock icon in the address bar, and view the certificate details to find out which domain is served there (*.google.com in this case). This won't work if SSL port 443 isn't open on the destination.
Just to complement the (terrific) nettop answer - some complained that the output is cryptic. For clean output, try:
nettop -P -k state,interface -d
Flags explained:
-P
collapses the rows of each parent process
-k state,interface
removes less informative columns that stand between you and the bytes in/out columns
-d
activates the delta option (same as pressing the d
button)
Use the h
button or run man nettop
for some more options.
You can easily view all network activity from the Activity Monitor; it's built right in to OS X.
- Open Applications > Utilities > Activity Monitor
- Click Network tab