Compare commits
2 Commits
8349791630
...
4719a77f21
| Author | SHA1 | Date | |
|---|---|---|---|
| 4719a77f21 | |||
| 08124c8a1c |
File diff suppressed because it is too large
Load Diff
@@ -46,7 +46,10 @@ echo "Starting iperf3 clients for ${DURATION}s..."
|
||||
for pair in "${PAIRS[@]}"; do
|
||||
IFS=':' read -r server server_ip client <<<"$pair"
|
||||
logfile="${WORKDIR}/${client}.log"
|
||||
docker exec "${LAB_PREFIX}-${client}" iperf3 -c "$server_ip" -p "$PORT" \
|
||||
# -R: DC hosts the service, campus is the consumer -- data should flow
|
||||
# server -> client (download), not client -> server, to match how a
|
||||
# real DC-hosted service/campus-consumer pair behaves.
|
||||
docker exec "${LAB_PREFIX}-${client}" iperf3 -c "$server_ip" -p "$PORT" -R \
|
||||
-t "$DURATION" -i 1 --forceflush -f m >"$logfile" 2>&1 &
|
||||
CLIENT_PIDS+=("$!")
|
||||
done
|
||||
@@ -68,7 +71,7 @@ for ((elapsed = 0; elapsed <= DURATION; elapsed++)); do
|
||||
last_line="$(grep -E 'Mbits/sec' "$logfile" 2>/dev/null | tail -1 || true)"
|
||||
bw="$(sed -E 's/.*[[:space:]]([0-9.]+ Mbits\/sec).*/\1/' <<<"$last_line")"
|
||||
[[ -z "$last_line" ]] && bw="waiting..."
|
||||
printf " %-13s -> %-13s : %s\n" "$client" "$server" "$bw"
|
||||
printf " %-13s -> %-13s : %s\n" "$server" "$client" "$bw"
|
||||
done
|
||||
sleep 1
|
||||
done
|
||||
@@ -81,5 +84,5 @@ for pair in "${PAIRS[@]}"; do
|
||||
IFS=':' read -r server _ client <<<"$pair"
|
||||
logfile="${WORKDIR}/${client}.log"
|
||||
summary="$(grep -E 'receiver' "$logfile" 2>/dev/null || true)"
|
||||
echo " ${client} -> ${server}: ${summary:-no data}"
|
||||
echo " ${server} -> ${client}: ${summary:-no data}"
|
||||
done
|
||||
|
||||
@@ -4,7 +4,7 @@ metrics, merge it into a manually-authored dashboard base, and optionally
|
||||
provision the result into Grafana.
|
||||
|
||||
Scope (see #52): this script knows only about the weathermap panel --
|
||||
targets (node status / link tx / link rx / VXLAN tooltip queries) and
|
||||
targets (node status / link tx per side / VXLAN tooltip queries) and
|
||||
options.weathermap (nodes/links/scale/settings). It has no knowledge of the
|
||||
BGP sessions table, ports/interfaces table, or throughput panels -- those
|
||||
live in the manually-authored `configs/grafana/dashboard-base.json` and are
|
||||
@@ -363,6 +363,12 @@ def build_weathermap(devices, links, interface_speeds, positions, prometheus_url
|
||||
link_defs.append({
|
||||
"id": f"{link['a_host']}-{a_gnmic_int}--{link['z_host']}-{z_gnmic_int}",
|
||||
"nodes": [{"id": link["a_host"]}, {"id": link["z_host"]}],
|
||||
# Each side's query is that side's own tx (egress) counter, not the
|
||||
# far end's rx -- see #57. a_host tx and z_host rx both describe the
|
||||
# *same* A->Z flow measured from opposite ends (the a_host->z_host
|
||||
# direction, counted twice), leaving the Z->A direction never
|
||||
# queried by either side. Using each node's own tx gives two
|
||||
# independent, opposite-direction measurements instead.
|
||||
"sides": {
|
||||
"A": {
|
||||
"bandwidth": a_bw,
|
||||
@@ -371,7 +377,7 @@ def build_weathermap(devices, links, interface_speeds, positions, prometheus_url
|
||||
},
|
||||
"Z": {
|
||||
"bandwidth": z_bw,
|
||||
"query": f"{link['z_host']} {z_gnmic_int} rx",
|
||||
"query": f"{link['z_host']} {z_gnmic_int} tx",
|
||||
"labelOffset": 55, "anchor": ANCHOR["Left"], "dashboardLink": "",
|
||||
},
|
||||
},
|
||||
@@ -410,11 +416,6 @@ def build_weathermap(devices, links, interface_speeds, positions, prometheus_url
|
||||
"expr": f'rate(interfaces_interface_state_counters_out_octets{{device=~"{host_regex}", interface=~"{interface_regex}"}}[5m]) * 8',
|
||||
"legendFormat": "{{device}} {{interface}} tx",
|
||||
},
|
||||
{
|
||||
"refId": "C",
|
||||
"expr": f'rate(interfaces_interface_state_counters_in_octets{{device=~"{host_regex}", interface=~"{interface_regex}"}}[5m]) * 8',
|
||||
"legendFormat": "{{device}} {{interface}} rx",
|
||||
},
|
||||
]
|
||||
if vtep_hosts:
|
||||
vtep_regex = "|".join(promql_escape(h) for h in vtep_hosts)
|
||||
|
||||
Reference in New Issue
Block a user