Categories

Network Traffic Monitor Tool for Mac

Written by Guillermo Garron .
Date: 2014-06-28 23:05:00 -0400

If you have a capped connection to the Internet, something like LTE o 3G connection, then you may want to monitor how much bandwidth your Mac is using. There are some tools to help you on this.

The best option for me is vnstat, it will let you monitor the monthly used bandwidth by your Mac, then you can add it to what was used by your phone, and know how much your bill is going to be.

Of course this is an estimation, but it is better than nothing.

Install vnstat

To install vnstat, I used brew.

brew install vnstat

How to use it

The first time you run it, it will initialize the database, after that, you just run.

vnstat

And it will have and output like this one:

 en1:
       May '14    991.13 MiB  /  243.85 MiB  /    1.21 GiB
       Jun '14      3.47 GiB  /  308.60 MiB  /    3.77 GiB  /    	4.04 GiB
     yesterday    206.69 MiB  /   11.44 MiB  /  218.13 MiB
         today    536.80 MiB  /   33.95 MiB  /  570.75 MiB  /     	587 MiB

You can have a daily usage report.

vnstat -d -i en1

The -d option tells the command to show the day usage, and -i en1 tells it to show that data from the en1 interface, which is my wifi interface in my Mac. The output will be something like this:

 en1  /  daily

         day         rx      |     tx      |    total    |   	avg. rate
     ------------------------+-------------+-------------+---------------
      05/24/14      4.67 MiB |    1.14 MiB |    5.80 MiB |    0.55 kbit/s
      05/25/14    461.26 MiB |   19.67 MiB |  480.93 MiB |   45.60 kbit/s
      05/26/14     47.67 MiB |    7.03 MiB |   54.70 MiB |    5.19 kbit/s
      05/27/14    202.47 MiB |   19.53 MiB |  222.00 MiB |   21.05 kbit/s
      05/28/14     38.70 MiB |  164.02 MiB |  202.71 MiB |   19.22 kbit/s
      05/29/14    122.98 MiB |   11.75 MiB |  134.73 MiB |   12.77 kbit/s
      05/30/14     64.29 MiB |   11.86 MiB |   76.14 MiB |    7.22 kbit/s
      05/31/14     49.10 MiB |    8.85 MiB |   57.96 MiB |    5.49 kbit/s
      06/01/14     84.87 MiB |   11.63 MiB |   96.50 MiB |    9.15 kbit/s
      06/02/14     64.61 MiB |    3.34 MiB |   67.95 MiB |    6.44 kbit/s
      06/06/14     99.24 MiB |   16.25 MiB |  115.49 MiB |   10.95 kbit/s
      06/07/14     97.61 MiB |   29.81 MiB |  127.42 MiB |   12.08 kbit/s
      06/08/14    189.66 MiB |   17.25 MiB |  206.91 MiB |   19.62 kbit/s
      06/09/14     17.85 MiB |    6.21 MiB |   24.07 MiB |    2.28 kbit/s
      06/11/14     17.63 MiB |    7.67 MiB |   25.30 MiB |    2.40 kbit/s
      06/13/14     23.33 MiB |    3.25 MiB |   26.58 MiB |    2.52 kbit/s
      06/14/14    293.95 MiB |   12.74 MiB |  306.69 MiB |   29.08 kbit/s
      06/15/14    262.32 MiB |   83.59 MiB |  345.91 MiB |   32.80 kbit/s
      06/16/14     48.44 MiB |    1.34 MiB |   49.78 MiB |    4.72 kbit/s
      06/17/14         0 KiB |       0 KiB |       0 KiB |    0.00 kbit/s
      06/19/14     14.34 MiB |    2.16 MiB |   16.50 MiB |    1.56 kbit/s
      06/20/14      3.29 MiB |     979 KiB |    4.24 MiB |    0.40 kbit/s
      06/21/14      1.52 GiB |   62.21 MiB |    1.58 GiB |  153.10 kbit/s
      06/22/14      6.46 MiB |    1.43 MiB |    7.89 MiB |    0.75 kbit/s
      06/24/14     29.54 MiB |    3.03 MiB |   32.56 MiB |    3.09 kbit/s
      06/25/14       570 KiB |     361 KiB |     931 KiB |    0.09 kbit/s
      06/27/14    206.69 MiB |   11.44 MiB |  218.13 MiB |   20.68 kbit/s
      06/28/14    536.80 MiB |   33.95 MiB |  570.75 MiB |   55.86 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated       553 MiB |      34 MiB |     587 MiB |

As you can see I don’t use my Mac everyday.

Hope this may help someone having the same needs I had.

permalink

If you enjoyed the article, please share it

twitter | facebook | google+ | linkedin | email | reddit