English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The Linux ulimit command is used to control the resources of shell programs.
ulimit is a built-in command in the shell, used to control the resources of the shell executing programs.
ulimit [-aHS][-c <Core file limit>][-d <Data section size>][-f <File size>][-m <Memory size>][-n <Number of files>][-p <Buffer size>][-s <Stack size>][-t <CPU time>][-u <Number of programs>][-v <Virtual memory size>]
Parameters:
Display the settings of system resources
[[email protected] ~]# ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited pending signals (-i) 1024 max locked memory (kbytes, -l) 32 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 stack size (kbytes, -s) 10240 cpu time (seconds, -t) unlimited max user processes (-u) 4096 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited [[email protected] ~]#
Set the upper limit of the number of single user programs
[[email protected] ~]# ulimit -u 500 //Set Upper Limits for a Single User Program [[email protected] ~]# ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited pending signals (-i) 1024 max locked memory (kbytes, -l) 32 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 stack size (kbytes, -s) 10240 cpu time (seconds, -t) unlimited max user processes (-u) 500 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited [[email protected] ~]#