Logo
Explore Help
Sign In
1berry/haproxy
1
0
Fork 0
You've already forked haproxy
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
haproxy/dev/flags/show-fd-to-flags.sh

3 lines
179 B
Bash
Raw Permalink Normal View History

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".
2021-04-02 13:40:03 +02:00
#!/bin/sh
DEV: flags/show-fd-to-flags: adapt to recent versions The script hadn't been updated since it was introduced, and the hard-coded field 12 doesn't match anymore (it's 16 now). Let's just use "grep -o cflg..." to extract the desired part more flexibly. This can be backported at least to 3.0, probably further, but it will need to be tested prior to this. Better not bring it too far, it's only used when debugging.
2024-06-24 11:05:08 +02:00
grep -o 'cflg=[0-9a-fx]*' | 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
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 618ms Template: 12ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API