]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: cli/streams: show a stream's tgid next to its thread ID
authorWilly Tarreau <w@1wt.eu>
Fri, 15 Jul 2022 14:18:43 +0000 (16:18 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 15 Jul 2022 17:41:26 +0000 (19:41 +0200)
We now display both the global thread ID and the tgid/ltid pair so that
it's easier to match it with the FD.

src/stream.c

index e90ac352548bc699a21a25fb8511074c82367731..5187eb9eec16b3c0c4f5af3ec55a049e6aacadaa 100644 (file)
@@ -3284,7 +3284,7 @@ static int stats_dump_full_strm_to_buffer(struct stconn *sc, struct stream *strm
                }
 
                chunk_appendf(&trash,
-                            "  task=%p (state=0x%02x nice=%d calls=%u rate=%u exp=%s tid=%d%s",
+                            "  task=%p (state=0x%02x nice=%d calls=%u rate=%u exp=%s tid=%d(%d/%d)%s",
                             strm->task,
                             strm->task->state,
                             strm->task->nice, strm->task->calls, read_freq_ctr(&strm->call_rate),
@@ -3293,6 +3293,8 @@ static int stats_dump_full_strm_to_buffer(struct stconn *sc, struct stream *strm
                                             human_time(TICKS_TO_MS(strm->task->expire - now_ms),
                                             TICKS_TO_MS(1000)) : "<NEVER>",
                             strm->task->tid,
+                            ha_thread_info[strm->task->tid].tgid,
+                            ha_thread_info[strm->task->tid].ltid,
                             task_in_rq(strm->task) ? ", running" : "");
 
                chunk_appendf(&trash,