天天看点

LINUX服务器出网带宽 一直被占用原因查找【转载】

原文:https://blog.csdn.net/weixin_38296752/article/details/81189365

https://wenku.baidu.com/view/704af62627284b73f24250bb.html

带宽占用原因查找

  1. 安装iftop/查看iftop参数
    yum install iftop -y
    iftop -h
    Synopsis: iftop -h | [-npbBP] [-i interface] [-f filter code] [-N net/mask]
       -h                  display this message
       -n                  don't do hostname lookups
       -N                  don't convert port numbers to services
       -p                  run in promiscuous mode (show traffic between other
                           hosts on the same network segment)
       -b                  don't display a bar graph of traffic
       -B                  Display bandwidth in bytes
       -i interface        listen on named interface
       -f filter code      use filter code to select packets to count
                           (default: none, but only IP packets are counted)
       -F net/mask         show traffic flows in/out of network
       -P                  show ports as well as hosts
       -m limit            sets the upper limit for the bandwidth scale
       -c config file      specifies an alternative configuration file
               
  2. 运行命令查看流量占用情况
    LINUX服务器出网带宽 一直被占用原因查找【转载】

    如图所示这个36392很占带宽

    iftop界面相关说明

    界面上面显示的是类似刻度尺的刻度范围,为显示流量图形的长条作标尺用的。

    中间的<= =>这两个左右箭头,表示的是流量的方向。

    TX:发送流量

    RX:接收流量

    TOTAL:总流量

    Cumm:运行iftop到目前时间的总流量

    peak:流量峰值

    rates:分别表示过去 2s 10s 40s 的平均流量

附加信息:

1M带宽 = 0.125Mb/s = 128kb/s 的下载速度

原因:

1字节(b)=8比特b(bits)

1Mbps代表每秒传输1,048,576位(1Mb=1024Kb=1024*1024bits),即每秒传输1,048,576/8= 131,072字节=128KB = 0.125MB,因此将X Mbps换算为每MB每秒的公式为:X/8

继续阅读