ulimit, we can find out how many open files, running processes etc. at most the user can have at the same time. My question is: how can we find out how much of these limits are being used and how much is available?
Obviously, I can count how many running processes I have, for instance. But isn't there a simpler way to do this? I assume there is a counter somewhere in the system that, when a limit is reached, the user is not allowed to use more of that resource. How could we simply print that number?