11

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.

Paul D. Waite
  • 6,434
  • 11
  • 49
  • 72
  • 2
    My bounty is for any **free** application which does show **the amount of bandwidth** per application. (I made this as a [separate question](http://superuser.com/questions/205199/macosx-how-much-network-traffic-by-each-app-free-solution-closed) but it was closed as a duplicate to this one and I was told to start a bounty here instead; so here it is). – Albert Nov 02 '10 at 22:07
  • @Albert: some Stack Exchange users are a bit heavy on the “no duplication” thing — applying programming principles too literally into real life. Hope you get some useful answers. – Paul D. Waite Nov 03 '10 at 15:23

2 Answers2

18

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.

Telemachus
  • 6,845
  • 1
  • 27
  • 33
  • Perfect, that’s spot on. You can assign a keyboard shortcut to the network monitor too, if you don’t want it to come up every time something accesses the network. – Paul D. Waite Sep 28 '09 at 19:56
16

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.

Arjan
  • 30,974
  • 14
  • 75
  • 112
Xetius
  • 1,221
  • 1
  • 10
  • 15