GitHub - vergoh/vnstat-snap: vnStat as a snap with image output (original) (raw)

vnStat in a snap

vnStat is a network traffic monitor that uses the network interface statistics provided by the kernel as information source. This means that vnStat won't actually be sniffing any traffic and also ensures light use of system resources regardless of network traffic rate.

By default, traffic statistics are stored on a five minute level for the last 48 hours, on a hourly level for the last 4 days, on a daily level for the last 2 full months and on a yearly level forever. The data retention durations are fully user configurable. Total seen traffic and a top days listing is also provided.

See the official webpage or theGitHub repository for additional details and output examples. An example of the included image output is alsoavailable.

How to install

Using release channel:

Or alternatively using development channel:

sudo snap install vnstat --edge

vnStat will automatically start monitoring all available interfaces once installed. Statistics can be viewed using the vnstat command (sudo not required) after around 5 minutes.

For more install options, see https://snapcraft.io/vnstat. For more details about channels and versions, see the "Channels and versions" section below.

Configurability

Snap doesn't support using a configuration file in /etc or in the home directory due to sandbox restrictions. Instead, Snap provides a configuration interface via the snap command directly. For vnStat, the commands are:

All the configuration options in Snap mirror the same names as in the vnStat configuration file but in full lower case. From vnStat's perspective, the active configuration can be queried with vnstat --showconfig. A restart of the daemon (sudo snap restart vnstat) is needed after changing daemon related configuration options. See thevnstat.conf man page for longer descriptions of each option.

Known limitations

Channels and versions

vnStat is published on two snap channels:

In addition, with snap list command, a revision is visible. This revision is a unique incremental identifier for the build being used. It will be incremented for any vnstat snap builds regardless of channel or architecture.