As far as I know, there is no system call that can provide the number of file descriptors tracked by epoll. You can achieve this by maintaining a single counter variable. Increase / decrease this variable after successfully adding / removing a file descriptor to epoll using epoll_ctl ().
source
share