vnStat

vnStat is a lightweight (command line) network traffic monitor. It monitors selectable interfaces and stores network traffic logs in a database for later analysis.

Installation

Install the vnstat package.

Configuration

Start/enable the vnstat.service daemon.

Pick a preferred network interface and edit the Interface variable in the /etc/vnstat.conf accordingly. To list all interfaces available to vnstat, use vnstat --iflist.

To start monitoring a particular interface that was not referred to in the configuration file when the daemon was started, you must initialize a database first. Each interface needs its own database. The command to initialize one for the eth0 interface is:

# vnstat --add -i eth0

Remember to restart the vnstat.service daemon after you have added a new interface.

Usage

Query the network traffic:

# vnstat --query

Viewing live network traffic usage:

# vnstat --live

To find more options, use:

# vnstat --help

or to see all options use:

# vnstat --longhelp

Eye candy presentation of the data can also be achieved by vnstati(1), which is part of the vnstat package.

gollark: Rust will be allowed iff Rust is allowed.
gollark: JSON is defined as on here (https://www.json.org/json-en.html) except that input strings are constrained to ASCII, for purposes (Unicode escapes are permitted).
gollark: Okay, the challenge is to validate JSON, i.e. to take a string and return a boolean indicating whether it is a valid JSON value or not.
gollark: I can define a subset of JSON.
gollark: I suppose we can drop string stuff, yes.
This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.