tgraf / bmon

bandwidth monitor and rate estimator
Other
1.2k stars 98 forks source link

`bmon -o ascii:quitafter=1` returns nil because of a lack of samples #58

Open jer-gentoo opened 7 years ago

jer-gentoo commented 7 years ago

Example:

# bmon -o ascii:quitafter=1 -p eth0
Interfaces                               RX bps         pps      %    TX bps         pps      %
  eth0                                        0           0                0           0

This helps:

# bmon -o ascii:quitafter=2 -p eth0
Interfaces                               RX bps         pps      %    TX bps         pps      %
  eth0                                        0           0                0           0
Interfaces                               RX bps         pps      %    TX bps         pps      %
  eth0                                     1.29KiB        1              208B          1

None of the options (-r, -s) seem to allow you to set the elapsed sample time before calculating the result.