Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1610310
  • 博文数量: 409
  • 博客积分: 6240
  • 博客等级: 准将
  • 技术积分: 4908
  • 用 户 组: 普通用户
  • 注册时间: 2011-06-01 00:04
文章分类

全部博文(409)

文章存档

2021年(1)

2019年(1)

2017年(1)

2016年(13)

2015年(22)

2013年(4)

2012年(240)

2011年(127)

分类: LINUX

2012-04-20 09:34:50

检测网卡流量:nload
nload默认的是eth0网卡,如果你想监测eth1网卡的流量
#nload eth1
nload 默认分为上下两块:上半部分是:Incoming也就是进入网卡的流量,下半部分是:Outgoing,也就是从这块网卡出去的流量,每 部分都有当前流量(Curr),平均流量(Avg),最小流量(Min),最大流量(Max),总和流量(Ttl)这几个部分,看起来还是蛮直观的。
另外,你也可以自己定义流量数值显示的单位

  1. -bash-3.2$ nload --help
  2. nload version 0.7.3
  3. Copyright (C) 2001 - 2011 by Roland Riegel
  4. nload comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
  5. welcome to redistribute it under certain conditions. For more details see the
  6. GNU General Public License Version 2 ().
  7. Command line syntax:
  8. nload [options] [devices]
  9. nload --help|-h
  10. Options:
  11. -a period Sets the length in seconds of the time window for average
  12. calculation.
  13. Default is 300.
  14. -i max_scaling Specifies the 100% mark in kBit/s of the graph indicating the
  15. incoming bandwidth usage. Ignored if max_scaling is 0 or the
  16. switch -m is given.
  17. Default is 10240.
  18. -m Show multiple devices at a time; no traffic graphs.
  19. -o max_scaling Same as -i but for the graph indicating the outgoing bandwidth
  20. usage.
  21. Default is 10240.
  22. -t interval Determines the refresh interval of the display in milliseconds.
  23. Default is 500.
  24. -u h|b|k|m|g Sets the type of unit used for the display of traffic numbers.
  25. H|B|K|M|G h: auto, b: Bit/s, k: kBit/s, m: MBit/s etc.
  26. H: auto, B: Byte/s, K: kByte/s, M: MByte/s etc.
  27. Default is h.
  28. -U h|b|k|m|g Same as -u, but for a total amount of data (without "/s").
  29. H|B|K|M|G Default is H.
  30. devices Network devices to use.
  31. Default is to use all auto-detected devices.
  32. --help
  33. -h Print this help.
  34. example: nload -t 200 -i 1024 -o 128 -U M
  35. The options above can also be changed at run time by pressing the 'F2' key.
  36. -bash-3.2$
# /usr/local/nload/bin/nload --help
-a:这个好像是全部数据的刷新时间周期,单位是秒,默认是300.
-i:进入网卡的流量图的显示比例最大值设置,默认10240 kBit/s.
-m:不显示流量图,只显示统计数据。
-o:出去网卡的流量图的显示比例最大值设置,默认10240 kBit/s.
-t:显示数据的刷新时间间隔,单位是毫秒,默认500。
-u:设置右边Curr、Avg、Min、Max的数据单位,默认是自动变的.注意大小写单位不同!
   h|b|k|m|g    h: auto, b: Bit/s, k: kBit/s, m: MBit/s etc.
   H|B|K|M|G    H: auto, B: Byte/s, K: kByte/s, M: MByte/s etc.
-U:设置右边Ttl的数据单位,默认是自动变的.注意大小写单位不同(与-u相同)!
Devices:自定义监控的网卡,默认是全部监控的,使用左右键切换。

检测:
  1. Device eth0 [ip] (1/4):
  2. =================================================================================================================
  3. Incoming:
  4. Curr: 893.63 kBit/s
  5. Avg: 907.08 kBit/s
  6. Min: 638.64 kBit/s
  7. .. Max: 1.06 MBit/s
  8. ######|||######## Ttl: 710.08 MByte
  9. Outgoing:
  10. ### ##| ##
  11. ### ### ##
  12. #|#### ###| ##|
  13. ###### .########
  14. ######. #########
  15. ####### #########
  16. #######.#########
  17. #################
  18. #################
  19. ################# Curr: 8.36 MBit/s
  20. ################# Avg: 9.29 MBit/s
  21. ################# Min: 5.32 MBit/s
  22. ################# Max: 12.89 MBit/s
  23. ################# Ttl: 4.01 GByte




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