]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: Display to end user the MAX_FDS allowed
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 24 May 2019 11:53:32 +0000 (07:53 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 24 May 2019 12:24:18 +0000 (08:24 -0400)
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 <sharpd@cumulusnetworks.com>
lib/thread.c

index 04abb7e5f452b9e33d9386e93e7d383b97bf6549..d3fb2cdf3650c688e74b3c852ebb07f8311cde0e 100644 (file)
@@ -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,