服务器带宽及网络流量发送、接收速度测量

带宽测试工具:iperf

1.下载地址 

https://github.com/esnet/iperf

2.安装

tar -zxvf iperf-3.9.tar.gz

./configure

make && make install

3.启动

服务端:iperf3 -s

客户端:iperf3 -c 192.168.88.206 

测试带宽在93M左右,内网局域网为100M,基本吻合。

其中-b 100M也可以不带。

流量测量工具:iftop、nethogs

iftop查看所有流量,nethogs查看所有进程流量。

iftop安装与使用

1.下载地址

http://www.ex-parrot.com/pdw/iftop/download/

2.安装

yum -y install flex byacc libpcap ncurses ncurses-devel libpcap-devel

tar -zxvf iftop-1.0pre4.tar.gz

cd iftop-1.0pre4

./configure

make && make install

3.简单启动

iftop 

4.参数

-B:iftop默认单位是b,位的意思。和平时的B不同,B是字节,1B=8b。

-i:指定网卡名,只监测该网卡的流量

-P:显示端口信息

-n:显示ip

携带参数启动:iftop -i enp4s0 -P -B

5.数据结果说明

中间右侧三列:分别是该连接2s、10s、40s的平均流量

TX:发送流量

RX:接收流量

TOTAL:合计流量

cum:累计流量

peak:峰值流量

rates:2s、10s、40s的平均流量速度

nethogs安装与使用

 1.下载地址

https://github.com/raboof/nethogs/releases

2.安装

yum install gcc-c++ libpcap-devel.x86_64 libpcap.x86_64 "ncurses*"

tar -zxvf nethogs-0.8.5.tar.gz

cd nethogs-0.8.5

make && make install

3.简单启动

nethogs

4.参数

-d:多少秒发送一次,nethogs -d 5

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
最新版本iperf,官网下载直接编译,适合win10系统。 iperf 3.9 (cJSON 1.7.13) CYGWIN_NT-10.0-19041 LAPTOP-4KUBOSU3 3.2.0-340.x86_64 2021-03-29 08:42 UTC x86_64 Optional features available: CPU affinity setting Usage: iperf3 [-s|-c host] [options] iperf3 [-h|--help] [-v|--version] Server or Client: -p, --port # server port to listen on/connect to -f, --format [kmgtKMGT] format to report: Kbits, Mbits, Gbits, Tbits -i, --interval # seconds between periodic throughput reports -F, --file name xmit/recv the specified file -A, --affinity n/n,m set CPU affinity -B, --bind bind to the interface associated with the address -V, --verbose more detailed output -J, --json output in JSON format --logfile f send output to a log file --forceflush force flushing output at every interval --timestamps emit a timestamp at the start of each output line (using optional format string as per strftime(3)) -d, --debug emit debugging output -v, --version show version information and quit -h, --help show this message and quit Server specific: -s, --server run in server mode -D, --daemon run the server as a daemon -I, --pidfile file write PID file -1, --one-off handle one client connection then exit --server-bitrate-limit #[KMG][/#] server's total bit rate limit (default 0 = no limit) (optional slash and number of secs interval for averaging total data rate. Default is 5 seconds) Client specific: -c, --client run in client mode, connecting to -u, --udp use UDP rather than TCP --connect-timeout # timeout for control connection setup (ms) -b, --bitrate #[KMG][/#] target bitrate in bits/sec (0 for unlimited)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值