netr 0.3.0

Display network interface throughput by second and by minute along with a graph. This is quick and easy to use via a mobile handset or similar device where typing is cumbersome.
Documentation

netrs

A simple console program to show network interface statistics.

Pull requests welcome.

install

$ git clone https://gitlab.com/edneville/netrs.git
$ cd netrs
$ cargo build --release
$ please install -o 0 -g 0 -m755 target/release/netr /usr/local/bin
$ cargo clean

usage

It works best in an 80x24 terminal.

You'll see something that looks a bit like this:

interface         in       out      | in/sec   | out/sec  | in/min   | out/min   
docker0           0        0        | 0        | 0        | 0        | 0       
eth0              231 GiB  575 GiB  | 25 KiB   | 47 KiB   | 1 MiB    | 4 MiB   
lo                23 GiB   23 GiB   | 0        | 0        | 33 KiB   | 33 KiB  
total             255 GiB  599 GiB  | 25 KiB   | 47 KiB   | 1 MiB    | 4 MiB   

          O                                                              218 KiB
          O               O                                           
          O               OO          O                               
          O               OO   O      O O                             
          O            OO OO OOO  O   OOOO  O  O O      O             
          O   O    OOOOOOOOOOOOOOOOOOOOOOOOOO OOOO OO  OO O OO OOO O  
          OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
          OOOOOOOOOOOOOOOOOOOOOIOOOOOOOOOOOOOOOOOIOOOOOOOOOOOOOOOOOOOO
          IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
                                                   ^ 17:18

netr will remain running until you quit using ctrl-c.

netr can be used with MRTG as a target, if you so wish:

netr --counters --include eth0

format

The follow strings are supported with --format:

placeholder effect
%{if} Interface name, eg 'enp1s0'
%{ibytes} Interface input bytes
%{obytes} Interface output bytes
%{ipackets} Interface input packets
%{opackets} Interface output packets
\n line feed
\r carriage return
\t tab

Usage of a format string will simply output and exit.

options

netr can restrict the interface names to report usage on by specifying a match regex in the include argument, or inversely, as the exclude argument.