osx - Is there an app for the Mac that shows you which apps are using the network?

  • Paul D. Waite

    Possible Duplicate:
    Application for monitoring all applications that are using the internet in Mac OS X

    I use Menu Meters to show me how much data is being sent and received by my Mac as a whole.

    But (as far as I can tell), it doesn’t break it down by application. If there’s a lot of data being sent or received, it’d be nice to see which app is doing it.

  • Answers
  • Telemachus

    Take a look at Little Snitch. It monitors which applications are using the network and also tracks usage. From its website:

    Keep an eye on your traffic

    Little Snitch 2 introduces a new Network Monitor, showing detailed information of all incoming and outgoing network traffic.

    A status icon in the menu bar provides a summary of current network activity, and a monitor window with more comprehensive information pops up automatically in case of new traffic events.

  • Arjan

    There is the lsof terminal command. This has a size field (7th field by default). This has a plethora of switches. Can probably tell you all you need to know about data connections.

    sudo lsof -i : this will give you a complete list of all open network connections. Does not appear to give you the amount of data written or read from each socket though.

    When searching for well-known ports, such as 8080 which is listed as http-alt due to its mapping in /etc/services, it might be easier to use lsof -i -P to suppress conversion of port numbers to port names. Alternatively, explicitly specify the port one's looking for, like lsof -i tcp:8080. When just trying to figure out what services are actually listening, use lsof -i -P | grep LISTEN.

  • Related Question

    osx - Mac: number of bytes transmitted over interface
  • Douglas Squirrel

    On linux, I'm used to typing ifconfig and looking for the line with "RX bytes" and "TX bytes" in it to find out how many bytes have been received and transmitted over a particular interface since boot. The line looks like this:

          RX bytes:106951129 (101.9 MB)  TX bytes:1577761831 (1.4 GB)

    I tried running the same command in a terminal on a Mac (OS X, version 10.4.11) but didn't see this data anywhere. How do I get the same information from a Mac?

    Edit: This is a test server, meant to simulate a typical out-of-the-box Mac install. So I need to avoid installing any programs if I can. A command-line tool would be ideal.

  • Related Answers
  • Douglas Squirrel
    netstat -ib

    seems to do the trick. Thanks to nik for pointing in the right direction. (Putting the result in a new answer so as not to make future readers dig through comments.)

  • osij2is

    The easiest way I know of seeing bytes in/out over an interface (w/o command line) is with MenuMeters. You can see all that info right on the top bar so it's always visually accessible.

  • nik

    Try ifconfig -a.
    But, I suspect there is a better command for the OSX.
    It is discouraged to use the ifconfig command in OSX like its used in Linux.

    check networksetup or netstat.