summaryrefslogtreecommitdiffstats
path: root/lib/thread.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-05-24 13:53:32 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-05-24 14:24:18 +0200
commit6c19478a3b62c243dc44a6d175db761486ab2921 (patch)
treee34b27456b1e64afab5db7109eeb49d480f59498 /lib/thread.c
parentlib: 'show thread cpu' help strings referenced a weird option (diff)
downloadfrr-6c19478a3b62c243dc44a6d175db761486ab2921.tar.xz
frr-6c19478a3b62c243dc44a6d175db761486ab2921.zip
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 <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/thread.c')
-rw-r--r--lib/thread.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/thread.c b/lib/thread.c
index 04abb7e5f..d3fb2cdf3 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,