vergoh/vnstat
FreevnStat - a network traffic monitor for Linux and BSD
FreeFree tier
About vergoh/vnstat
vnStat is a console-based network traffic monitor for Linux and BSD systems. It gathers traffic statistics directly from the kernel's network interface counters, making it extremely lightweight and suitable for low-resource environments without packet sniffing. The tool stores data at multiple granularities: five-minute intervals for the last 48 hours, hourly for the last 4 days, daily for the last 2 months, and yearly forever—all fully configurable. It also provides a top-days view and optional image output if the GD library is installed. vnStat is open source under GPL-2.0 and can be installed from stable releases, development builds, or Docker containers.
Key Features
Console-based network traffic monitor
Uses kernel network interface statistics (no packet sniffing)
Lightweight system resource usage regardless of traffic rate
Configurable data retention: 5-minute, hourly, daily, yearly levels
Optional image output support via GD library
Top days listing and total traffic summary
Available as stable release, development version, or Docker container
Supports Linux and BSD operating systems
Pros & Cons
Pros
- Extremely lightweight, uses minimal CPU and memory
- No packet sniffing, respects privacy and system security
- Fully configurable data retention periods
- Optional graphical output via GD library
- Open source and free with permissive GPL-2.0 license
- Available as Docker container for easy deployment
Cons
- Native console interface only; no built-in web UI (requires separate front-end or Docker image with HTTP)
- Graphical output requires GD library installation
- Installation required (not a simple script or portable binary)
Best For
Monitoring network bandwidth usage on serversTracking data consumption over timeIdentifying peak traffic periodsLightweight traffic monitoring on embedded or low-resource systemsHistorical network usage analysis and reporting
FAQ
Is vnStat a packet sniffer?
No, vnStat does not sniff traffic. It reads network interface statistics provided by the kernel, so it is lightweight and does not affect privacy or system performance.
What data retention periods does vnStat support?
By default, data is stored at five-minute level for the last 48 hours, hourly for the last 4 days, daily for the last 2 full months, and yearly forever. All retention durations are user-configurable.
Can I get graphical output from vnStat?
Yes, vnStat can produce image output if the GD library is installed on the system.
How can I install vnStat?
You can download the latest stable release from https://humdi.net/vnstat/, clone the development version from GitHub, or use the official Docker container vergoh/vnstat.