A lightweight network performance measurement tool.
git clone https://github.com/LiuNotTwo/PerfTrace.git
cd PerfTrace
make
If the existing executable file (perftrace_srv or perftrace_cli) does not work on your machine, recompile it.
make clean
make
./perftrace_srv
! Note that the client communicates with the server via UDP. If the server-side firewall is on, UDP packets may be filtered.
Solution 1: Disable the server-side firewall;
Solution 2: Open the specified UDP port (19999).
cent-os$ firewall-cmd --permanent --zone=public --add-port=19999/udp
cent-os$ firewall-cmd --reload
./perftrace_cli -s server_ip -c 10 -i 10ms -m 1
-c: Specify the number of packets to be sent, default is 10;
-i: Specify the packet sending interval, the default is 1ms;
-m: Specify the measurement mode, the default is 1 (Basic Mode).
./perftrace_cli -s server_ip -m 2