January 22, 2021 — 16:58

Author: silver  Category: bsd linux  Comments: Off

You might have used vnstat to view monthly traffic statistics in CLI, e.g. vnstat -i eth0 -m. But if you’re like me you might also not have followed the project for a few years and know there’s now JSON output available (--json) and there is vnstati to output to PNG images.

Oneliner to output all possible stats:

for i in h d m t s hs vs; do
  vnstati -i $inf -${i} -o vnstati-$i.png

We use Matomo free and open source web analytics
We also use Jetpack Stats which honors DNT