In Linux, there are user limits for accessing system resources.
Shell built-in command ulimit
can be used to see user limits for the current user.
ulimit -a # soft limits
ulimit -a -H # hard limits
Then I also can see per process soft/hard limit by looking at /proc/$PID/limits
.
# Example limits on firefox process
PID=$(ps -A | grep firefox | awk '{print $1;}')
cat /proc/$PID/limits
I am wondering what is the difference between these two output?
I see /proc/$PID/limits
having some limits larger than ulimit -a -H
(Hard limits) output for the same resource.
Can process spawned by a user have its limits exceed user limits (ulimit
)?
I tried to include my question in a question with similar goals: https://unix.stackexchange.com/review/suggested-edits/470961 . The edit was rejected.