nload实时查看linux服务器网络流量 2012-04-20 10:40:57
分类: LINUX
如果你仅仅是想查询当前服务器的带宽,nload绝对是个很好用的一个工具,功能虽然很单一,但是很强.虽然不能像iptraf那样,可针对IP,协议等条件来查询,可以实时地监控网卡的流量,分输入流量Incoming 和输出流量Outgoing两部分,同时统计当前,平均,最小,最大,总流量的值,并且用动态图形方式表现出来,让你一目了然.
补充:
nload默认分为上下两块:上半部分是:Incoming也就是进入网卡的流量,下半部分是:Outgoing,也就是从这块网卡出去的流量,每部分都 有当前流量(Curr),平均流量(Avg),最小流量(Min),最大流量(Max),总和流量(Ttl)这几个部分,看起来还是蛮直观的。
另外,你也可以自己定义流量数值显示的单位 #/usr/local/nload/bin/nload –help
就可以看到具体的相关参数了。
效果请见文章最后面.
nload官网及下载 http://www.roland-riegel.de/nload/
http://www.roland-riegel.de/nload/nload-0.7.2.tar.gz
 
nload安装方法:

 
  1. wget http://www.roland-riegel.de/nload/nload-0.7.2.tar.gz
  2. tar zxvf nload-0.7.2.tar.gz
  3. cd nload-0.7.2
  4. ./configure
  5. make
  6. make install
这样就安装好了,
直接输入nload回车即可看到动态流量信息,也可以指定网卡,如nload eth1
还可以指定是以K或M来显示流量,如nload -u M显示的流量是以MB为单位的.
执行命令:nload
  1. Device eth0 [74.125.71.17] (1/4):
  2. =============================================================
  3. Incoming:
  4. Curr: 1.44 MBit/s
  5. Avg: 1.20 MBit/s
  6. Min: 0.67 kBit/s
  7. .... . .. . . Max: 2.20 MBit/s
  8. ||##################||###############|||######## Ttl: 1.26 GByte
  9. Outgoing:
  10. . ################## ########|.######## #######
  11. # ################## ##################|#######
  12. # ################## ##########################
  13. #|################## |##########################
  14. #################### ###########################
  15. #################### ###########################
  16. #################### ########################### Curr: 12.92 MBit/s
  17. ################################################ Avg: 11.80 MBit/s
  18. ################################################ Min: 3.25 MBit/s
  19. ################################################ Max: 15.20 MBit/s
  20. ################################################ Ttl: 2.81 GByte
我远程安装了两台服务器,第一台完全正常,第二台服务器在执行./configure 编译的时候,出现了下边两个报错:
1. ./configure时报错: configure: error: C++ compiler cannot create executables
有组件没有安装,执行命令:
yum install gcc gcc - c ++ gcc - g77
继续执行./configure  ,不料又报一下错误
2.configure: error: ncurses library or development files not found. ncurses is required for nload.
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target `install'. Stop.
yum install -y ncurses-devel
 即可解决