Is there any way to check the usage of the ulimits for a given user? I know that you can change ulimits for a single process when you start it up or for a single shell when running but I want to be able to "monitor" how close a user is to hitting their limits. I am planning on writing a bash
script that will report back to statsd the current usage percentage. Specifically, I want to track:
- open files (
ulimit -n
) - max user processes (
ulimit -u
) - pending signals (
ulimit -i
)
What I want out is the percentage of usage (0-100).