Linux安装vnstat统计流量
什么是vnstat
引用官方原文
vnStat is a console-based network traffic monitor for Linux and BSD that keeps a log of network traffic for the selected interface(s). It 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.
This program is open source / GPL’ed and can be installed either as root or as a single user. Better instructions are included in the README. Feel free to send comments by email (remove the spamfilter) or try contacting me from irc (Vergo @ IRCNet).
简单说就是一个在ssh下可以很方便地查看流量使用的一款功能强大的工具
安装vnstat
因为我惯用CentOS,测试是在CentOS上测试
安装epel
1 |
|
安装vnstat
1 |
|
生成一个数据库
1 |
|
*eth0是默认网卡,此处可选择其他网卡
Linux安装vnstat统计流量
http://www.evec.cc/2016/05/07/Linux-Install-vnstat/