Macos – Mac: number of bytes transmitted over interface

macosmonitoringnetwork-adapternetworking

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.

Best Answer

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.)

Related Question