feat: Introduce measure_bandwidth.sh script, install perfquery, and add the script to the Docker image for RDMA bandwidth monitoring.

This commit is contained in:
Donato Capitella
2026-02-07 10:40:53 +00:00
والد 9cf7eaeab2
کامیت 6754095398
3فایلهای تغییر یافته به همراه20 افزوده شده و 1 حذف شده
+1 -1
مشاهده پرونده
@@ -8,5 +8,5 @@ dnf -y install --setopt=install_weak_deps=False --nodocs \
gcc gcc-c++ binutils make ffmpeg-free \
cmake ninja-build aria2c tar xz vim nano dialog \
libdrm-devel zlib-devel openssl-devel pgrep \
numactl-devel gperftools-libs iproute libibverbs-utils patch perftest ping iperf3 \
numactl-devel gperftools-libs iproute libibverbs-utils patch perftest ping iperf3 perfquery \
&& dnf clean all && rm -rf /var/cache/dnf/*
+18
مشاهده پرونده
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
while true; do
A_IN=$(rdma statistic | awk '/ip4InOctets/ {print $2}')
A_OUT=$(rdma statistic | awk '/ip4OutOctets/ {print $2}')
sleep 1
B_IN=$(rdma statistic | awk '/ip4InOctets/ {print $2}')
B_OUT=$(rdma statistic | awk '/ip4OutOctets/ {print $2}')
RX=$(( (B_IN - A_IN) * 8 ))
TX=$(( (B_OUT - A_OUT) * 8 ))
printf "%s RDMA RX: %7sbit/s TX: %7sbit/s SUM: %7sbit/s\n" \
"$(date +%T)" \
"$(numfmt --to=iec $RX)" \
"$(numfmt --to=iec $TX)" \
"$(numfmt --to=iec $((RX+TX)))"
done