get number of open files in a process?

Batutis, Ed Ed.Batutis at netapp.com
Thu Jan 21 19:49:49 UTC 2016


> 
> However, the real question is what do you need this for.
> 

I would like to know when I am getting close to hitting the file handle limit. This is useful for two reasons: 1) if I run out of available file handles this will most likely cause my process to crash. If I start logging when the count begins to get dangerously high, then I might after the fact be able to determine what was going on to cause that. 2) Some handles are used by a user interface. It would be nice if the server could reject connections when the open handle count hit a critical threshold so the user interface doesn't become part of the problem - obscuring the actual underlying cause.

Thanks,

=Ed


More information about the freebsd-hackers mailing list