-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement rlimit() on BSD #809
Comments
Actually that info is already retrievable via stdlib resource module:
Doing the same via /proc/pid/limits would add the ability to do the same for all processes (instead of just |
I ended implementing something like NicolasLM/sauna@f9a7a52#diff-4cdd796dc1ec5ac72502aab351c123a2R86 It would be surprising if other OSes than Linux do not provide a way to fetch this information as well. |
Most (all?) UNIX systems provide a way to know the number of default maximum fds each process can open and #720 is meant to expose that information. |
I'm pretty sure other platforms provide this information as well, for instance on freebsd |
What other platforms are you talking about? Are you sure it's updated info and not the default system setting info being reported insted? |
I just tried on freebsd, indeed it is possible to fetch the actual limits of a process:
|
Getting back to this. Actually I totally forgot it is already possible to do this on Linux: |
@glebius just in case you want to give it a try. ;-) |
In most cases a process running out of file descriptors is a sign that the software does not behave correctly. Psutil currently gives the number of fds opened by a process, but not how many can it open.
On Linux this information is available through
/proc/<pid>/limits
.This metric per process would be complementary of system wide limits described in #720.
The text was updated successfully, but these errors were encountered: