Every SA sooner or later runs into a user hitting a ulimit like open files or number of processes.
There must be a simple mechanism to track and test against usage of these limits, or ulimits would be horribly inefficient.
So, how could an admin or a user see current usage versus their ulimits?
I do not need to hear ulimit -Sa, ulimit -HA, or side-effect/discovery methods like lsof | grep $USER. I would really hope for something like:
cat /proc/$$/task/$$/limits
Except there would be another column labeled "Current Usage".