sbm: monitor network traffic

$ sbm -i wlp2s0 -c 10
wlp2s0:   0.00  bps Rx   0.00  bps Tx     0 pps Rx     0 pps Tx
wlp2s0:   5.54 kbps Rx  18.94 kbps Tx     6 pps Rx     8 pps Tx
wlp2s0:   2.78 Mbps Rx 122.69 kbps Tx   256 pps Rx   141 pps Tx
wlp2s0: 433.54 kbps Rx  45.22 kbps Tx    55 pps Rx    35 pps Tx
wlp2s0: 528.00  bps Rx 752.00  bps Tx     1 pps Rx     1 pps Tx
wlp2s0:  10.94 kbps Rx   5.50 kbps Tx     6 pps Rx     4 pps Tx
wlp2s0:   0.00  bps Rx   0.00  bps Tx     0 pps Rx     0 pps Tx
wlp2s0:  13.34 kbps Rx  26.10 kbps Tx    11 pps Rx    13 pps Tx
wlp2s0: 384.64 kbps Rx  57.70 kbps Tx    57 pps Rx    49 pps Tx
wlp2s0: 553.67 kbps Rx  51.35 kbps Tx    69 pps Rx    56 pps Tx

sbm (Simple Bandwidth Monitor) is a tiny utility to track your network traffic. It’s similar to slurm in functionality but shows a continuous log of transfer rates (upstream and downstream). The best use-case is the situation in which you want to figure out how much data an application transmits in isolation. With constant monitoring, you can also figure out easily if any application is sending information home.

Features

  • shows amount of data and number of packets transferred
  • show values in bits (default) or bytes
  • specify the number of samples to monitor
  • specify delay between samples
  • specify interface to monitor
  • works with ethernet and wireless interfaces
  • trigger (SIGINFO, generally ^T) to dump collected data

Installation

You have to download and compile sbm from source to run it on Ubuntu. Dependencies are minimal. Get the latest released package here and run the following commands:

$ tar -xf sbm-version.tar.gz
$ cd sbm-version
$ make
$ sudo make install

Usage

You can simply run

$ sbm

and by default sbm will pick the first active, non-loopback interface.

Here’s an example to monitor wlp2s0 and collect 15 samples:

$ sbm -i wlan0 -c 15

For more help, run:

$ man sbm

Rating

Features: 3/5
Usability: 4.5/5

Leave a Reply

Your email address will not be published. Required fields are marked *