Ulimit values control certain characteristics about what resources processes have access to. These values can be set globally or per user.
These values are configured in the following file:
Any entries added to this file require 4 columns.
- Domain: This can be a user a group or a wildcard that specifies all users.
- Type: This can be "soft" or "hard" for the type of limit you are configuring
- Item: The valid limits can be any of the following:
core- limits the core file size (KB)
data- max data size (KB)
fsize- maximum filesize (KB)
memlock- max locked-in-memory address space (KB)
nofile- max number of open files
rss- max resident set size (KB)
stack- max stack size (KB)
cpu- max CPU time (MIN)
nproc- max number of processes (see note below)
as- address space limit (KB)
maxlogins- max number of logins for this user
maxsyslogins- max number of logins on the system
priority- the priority to run user process with
locks- max number of file locks the user can hold
sigpending- max number of pending signals
msgqueue- max memory used by POSIX message queues (bytes)
nice- max nice priority allowed to raise to values: [-20, 19]
rtprio- max realtime priority
- Value: The value of the setting you are modifying
$USER hard nproc 25
The command above modified the number of processes for a user to be restricted to only 25 processes.
[domain@cloudlinux ~]$ ulimit -u