Use nettop command to check per-application network activity in OS X

While Activity Monitor will show you process stats, it does not give you information on which programs may be using your network bandwidth.

While broadband Internet speeds let you do more online, if your system uses a lot of bandwidth, you might run into some limitations. In some cases, ISPs may throttle your network speed after you have reached a certain usage level, or may even charge you additional fees for the extra bandwidth used. In other cases, a constant upload or download from one system may saturate your bandwidth and greatly slow down Internet-based activities for the other computers that share the connection.

For the most part, programs will not use a great amount of bandwidth, but there are times when one may do so without you being aware of it. For example, if you are on a system with multiple accounts, another user may have a file-sharing program or online backup service running constantly, or you may have an updater utility that is running into errors and is persistently downloading an update, deleting it when the error occurs, and then downloading it again.

To help determine what might be tying everything up, overall network throughput can be monitored on some network routers to help pinpoint which computers and devices are generating high network traffic. You can also do this with tools like Apple's Activity Monitor. Though useful for identifying which device on your network is the culprit, unfortunately these options generally do not give enough information for you to pinpoint the specific process running.

However, if these network monitors indicate that your Mac is generating large amounts of traffic, you can use the command line to help diagnose traffic loads on a per-application basis.

For those familiar with the OS X Terminal, the command "top" is a popular tool for monitoring the processes in your system and viewing statistics on their system loads. But while "top" will only monitor details like RAM and CPU usage and not network activity, there is a similar tool called "nettop," which, as its name implies, is geared toward network monitoring.

nettop running in OS X
In this example, with nettop we can see that the process with the most network bandwidth usage is WebProcess (ID 455), which in this case happens to be Safari downloading a large update (click for larger view). Screenshot by Topher Kessler/CNET

The nettop command is a fairly simple program to use. Simply open Terminal and enter the command "nettop," and the output will show you a list of processes and their corresponding process IDs that have active network connections. The output will have a number of columns for different details, including the network interface being used, packets and bytes in and out, and some details about the process' packets.

You can scroll through the list using the up and down arrows, and expand it to see information on each connection being made by a process. While some of the details that nettop outlines are a bit cryptic, if you collapse the extended information by pressing the left arrow key, you can get an overview of which programs are generating the most network traffic, and then investigate the cause or quit the program.



Questions? Comments? Have a fix? Post them below or e-mail us!
Be sure to check us out on Twitter and the CNET Mac forums.

Tags:
Computers
Read the full CNET Review

Mac OS X 10.8 Mountain Lion

The Bottom Line: Though it's not a complete system or interface overhaul, Mountain Lion's improved core apps and new features make it well worth the $19.99 price. / Read full review

About the author

    Topher, an avid Mac user for the past 15 years, has been a contributing author to MacFixIt since the spring of 2008. One of his passions is troubleshooting Mac problems and making the best use of Macs and Apple hardware at home and in the workplace.

     

    ARTICLE DISCUSSION

    Conversation powered by Livefyre

    Don't Miss
    Hot Products
    Trending on CNET

    Hot on CNET

    The Next Big Thing

    Consoles go wide and far beyond gaming with power and realism.