From 6a54d746625312898233fb7187b47748d5971bdd Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 2 Apr 2021 13:40:03 +0200 Subject: [PATCH] CONTRIB: debug: add the show-fd-to-flags script This script reads the output of a "show fd" command and for each line showing a connection, will decode its flags by calling "flags". --- contrib/debug/show-fd-to-flags.sh | 2 ++ 1 file changed, 2 insertions(+) create mode 100755 contrib/debug/show-fd-to-flags.sh diff --git a/contrib/debug/show-fd-to-flags.sh b/contrib/debug/show-fd-to-flags.sh new file mode 100755 index 0000000000..29757c3204 --- /dev/null +++ b/contrib/debug/show-fd-to-flags.sh @@ -0,0 +1,2 @@ +#!/bin/sh +awk '{print $12}' | grep cflg= | sort | uniq -c | sort -nr | while read a b; do c=${b##*=}; d=$(${0%/*}/flags conn $c);d=${d##*= }; printf "%6d %s %s\n" $a "$b" "$d";done -- 2.47.3