Commit a2843489 authored by Juliane Aulbach's avatar Juliane Aulbach

Log additional BBR v2 parameters

parent 69ba3148
while true;
ss -tin | sed -n -e 's/.* cwnd:\([0-9]*\).* bbr:(\([^)]*\)).*/\1;;\2/p' -e 's/.* cwnd:\([0-9]*\).* ssthresh:\([0-9]*\).*/\1;\2;/p';
sleep $1;
done | ts '%.s;'
# ‘s/regexp/replacement/flags’
# -E: use normal RegEx syntax
# tr: remove newlines
# sed #2: reorder output - very ugly, but the only solution I found
# ts: add timestamp
strace ss -tin 2>&1 | sed -En \
-e 's/.* cwnd:([0-9]*).* ssthresh:([0-9]*).*/\1;\2;/p' \
-e 's/.* cwnd:([0-9]*).* bbr:\(([^)]*)\).*/\1;;\2;/p' \
-e 's/.* \{(bbr_bw_lo=[^,]*),\s(bbr_bw_hi=[^,]*).*/\1,\2;/p' \
| tr -d '\n' \
| sed -En -e 's/(bbr_bw_lo=[^,]*,bbr_bw_hi=[^;]*;)(.*)/\2\1\n/p' \
| ts '%.s;'
sleep $1;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment