Reputation: 1333
I am looking for a way to check the current number of file descriptors being monitored by an epoll instance. I use the following for creating and populating the epoll instance
epoll_create
epoll_ctl
Platform is Gnu/Linux.
Upvotes: 5
Views: 1750
Reputation: 106
As far as I know, there is no system call available which can provide the count of file descriptors which are getting monitored by epoll. You can achieve this by maintaining one counter variable. Increment/decrement this variable after successfully adding/removing the file descriptor to the epoll using epoll_ctl().
Upvotes: 2