From: Donald Sharp Date: Fri, 24 May 2019 11:53:32 +0000 (-0400) Subject: lib: Display to end user the MAX_FDS allowed X-Git-Tag: base_7.2~314^2~5 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=6c19478a3b62c243dc44a6d175db761486ab2921;p=matthieu%2Ffrr.git lib: Display to end user the MAX_FDS allowed Upon startup FRR reads in the MAX_FDS variable from it's control files via the getrlimit call. We then setup code to limit the poll data structure size to that value. The OS also limits our FD's to that value because that is what is set. Provide a methodology that a interested end user can figure this data out. Signed-off-by: Donald Sharp --- diff --git a/lib/thread.c b/lib/thread.c index 04abb7e5f4..d3fb2cdf36 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -312,7 +312,8 @@ static void show_thread_poll_helper(struct vty *vty, struct thread_master *m) vty_out(vty, "\nShowing poll FD's for %s\n", name); vty_out(vty, "----------------------%s\n", underline); - vty_out(vty, "Count: %u\n", (uint32_t)m->handler.pfdcount); + vty_out(vty, "Count: %u/%d\n", (uint32_t)m->handler.pfdcount, + m->fd_limit); for (i = 0; i < m->handler.pfdcount; i++) vty_out(vty, "\t%6d fd:%6d events:%2d revents:%2d\n", i, m->handler.pfds[i].fd,