From: Willy Tarreau Date: Fri, 10 Nov 2017 15:53:09 +0000 (+0100) Subject: MINOR: cli: make "show fd" report the fd's thread mask X-Git-Tag: v1.8-rc3~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5d9846f4b3b4b92fca7fd49eb1007a0e9c18dd74;p=thirdparty%2Fhaproxy.git MINOR: cli: make "show fd" report the fd's thread mask This is useful to know what thread(s) an fd is scheduled to be handled on. It's worth noting that at the moment the "show fd"d doesn't seem totally thread-safe. --- diff --git a/src/cli.c b/src/cli.c index 9c77949451..6625a093d3 100644 --- a/src/cli.c +++ b/src/cli.c @@ -825,7 +825,7 @@ static int cli_io_handler_show_fd(struct appctx *appctx) li = fdt.owner; chunk_printf(&trash, - " %5d : st=0x%02x(R:%c%c%c W:%c%c%c) ev=0x%02x(%c%c%c%c%c) [%c%c%c%c] cache=%u owner=%p iocb=%p(%s)", + " %5d : st=0x%02x(R:%c%c%c W:%c%c%c) ev=0x%02x(%c%c%c%c%c) [%c%c%c%c] cache=%u owner=%p iocb=%p(%s) tmask=0x%lx", fd, fdt.state, (fdt.state & FD_EV_POLLED_R) ? 'P' : 'p', @@ -850,7 +850,8 @@ static int cli_io_handler_show_fd(struct appctx *appctx) (fdt.iocb == conn_fd_handler) ? "conn_fd_handler" : (fdt.iocb == dgram_fd_handler) ? "dgram_fd_handler" : (fdt.iocb == listener_accept) ? "listener_accept" : - "unknown"); + "unknown", + fdt.thread_mask); if (fdt.iocb == conn_fd_handler) { chunk_appendf(&trash, " cflg=0x%08x", conn_flags);