Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1885149
  • 博文数量: 333
  • 博客积分: 10791
  • 博客等级: 上将
  • 技术积分: 4314
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-08 07:39
文章分类

全部博文(333)

文章存档

2015年(1)

2011年(116)

2010年(187)

2009年(25)

2008年(3)

2007年(1)

分类: LINUX

2011-09-02 19:19:05



  1. 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. However, in Linux at least a 2.2 series kernel is required.
  2. 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). A discussion forum is also available. Announcements about new versions can be obtained by subscribing to the vnStat project at freshmeat.net.
  1. 下载地址:
  2. 官方站点:
Ubuntu 10.04 Server:
安装:emerge vnstat
第一次使用需要对每个网卡运行:#vnstat -u -i eth0 ……
1、查看5秒内网卡eth0的平均流量:默认5s
  1. #vnstat -tr -i eth0
查看3秒内网卡eth0的平均流量:

  1. #vnstat -tr 3 -i eth0
2、网卡eth0一周内的流量:

    1. #vnstat -i eth0 -w

源码安装:

  1. #get vnstat package
  2. wget -O vnstat.tar.gz http://humdi.net/vnstat/vnstat-1.7.tar.gz
  3. # unzip
  4. tar -xzvf vnstat.tar.gz
  5. cd vnstat-1.7
  6. #INSTALL
  7. make
  8. make all
  9. make install
  10. #initial
  11. vnstat -u -i eth0
  12. #use
  13. vnstat -tr -l eth0
  14. ### Result ###
  15. 133 packets sampled in 5 seconds
  16. Traffic average for eth0
  17.   
  18.       rx 10.55 KiB/s 15 packets/s
  19.       tx 1.06 KiB/s 11 packets/s
  20.   
  21. Monitoring eth0... (press CTRL-C to stop)
  22.   
  23.    rx: 1.81 KiB/s 12 p/s tx: 2.23 KiB/s 10 p/s

阅读(3866) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

2012-09-07 18:24:42

Ubuntu什么时候用emerge安装软件了,是Gentoo的安装方式吧