From 754564167f199a86ca31955f8fc09f4478ccb36e Mon Sep 17 00:00:00 2001 From: kisfenyo Date: Sun, 7 Jun 2026 12:50:41 +0200 Subject: [PATCH] updated probe-loop.sh --- admin-system/wan-monitor.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/admin-system/wan-monitor.yaml b/admin-system/wan-monitor.yaml index 092566e..9fb0082 100644 --- a/admin-system/wan-monitor.yaml +++ b/admin-system/wan-monitor.yaml @@ -146,12 +146,13 @@ data: mv "$SHARED/.metrics.tmp" "$SHARED/metrics" } - run_irtt() { # $1 condition $2 outfile $3 duration(seconds) + run_irtt() { timeout "$(( $3 + 25 ))" irtt client -i "$IRTT_INTERVAL" -d "${3}s" -q $HMAC_OPT \ -o - "${HETZNER}:${IRTT_PORT}" 2>/dev/null \ - | python3 /scripts/irtt_to_prom.py "$1" "$IRTT_TARGET" > "$2" + | python3 /scripts/irtt_to_prom.py "$1" "$IRTT_TARGET" > "$2.tmp" + mv "$2.tmp" "$2" } - + run_tput() { P="${IPERF_PARALLEL:-4}" # parallel streams: a single stream can't fill 1 Gbps over the RTT TO="$(( TPUT_TIME + 20 ))"