vnstat:tldr:87da1
The "vnstat" command stands for "virtual network statistics" and is used to monitor network traffic on a Linux-based system. It provides detailed information about network usage, including data transfer rates (both incoming and outgoing), total data transferred, and other statistics.
When you execute the "vnstat" command without any options or arguments, it displays a summary of network traffic for all available network interfaces. This summary typically includes data such as the total amount of data transferred, average data rates, peak data rates, and the current network usage for different time periods (e.g., hourly, daily, monthly).
Here is an example of the output produced by the "vnstat" command:
Database updated: Fri Jan 15 23:59:59 2021
eth0 since 01/01/21
rx: 1.24 GiB tx: 3.13 GiB total: 4.37 GiB
monthly
rx | tx | total | avg. rate
------------------------+-------------+-------------+---------------
Jan '21 1.24 GiB | 3.13 GiB | 4.37 GiB | 172.67 kbit/s
------------------------+-------------+-------------+---------------
estimated 1.24 GiB | 3.13 GiB | 4.37 GiB |
In this example, the command displays the network statistics for the "eth0" interface since January 1, 2021. It shows the amount of data received (rx) and transmitted (tx), as well as the total data transferred. The monthly breakdown gives a detailed overview of network usage for January 2021, including average data rates.
By using different options and arguments with the "vnstat" command, you can specify a specific network interface, view statistics for a particular time range, or display output in a different format. For more information on the available options and usage, you can refer to the command's manual page by typing "man vnstat" in the terminal.