ulimit parameters through a number of options to manage different types of system resources. In this section, we will explain the use of these parameters.
ulimit command format is: ulimit [options] [limit]
Meaning of specific options and a simple example can refer to the following table.
Table 1. Ulimit parameter descriptions
Options [options] | Meaning | Example |
-H | Set the hard resource limit, once set can not increase. | ulimit - Hs 64; limited hardware resources, the thread stack size is 64K. |
-S | Set the soft resource limit settings can be increased, but not more than hard-resource settings. | ulimit - Sn 32; soft resource limit, 32 file descriptors. |
-A | Show all current limit information. | ulimit - a; show all current limit information. |
-C | Maximum core file size, in blocks as a unit. | ulimit - c unlimited; the generated core file size without limit. |
-D | The largest process data segment size in Kbytes units. | ulimit-d unlimited; of the process data segment size without limit. |
-F | The maximum process can create a file to blocks of flats. | ulimit - f 2048; limit process can create the maximum file size is 2048 blocks. |
-L | Maximum locked memory size in Kbytes units. | ulimit - l 32; limit the maximum locked memory size 32 Kbytes. |
-M | Maximum memory size to Kbytes units. | ulimit - m unlimited; no limit on the maximum memory. |
-N | The maximum number of file descriptors can open. | ulimit - n 128; limit the maximum to 128 file descriptors. |
-P | Pipe buffer size in Kbytes units. | ulimit - p 512; limit the size of pipe buffer is 512 Kbytes. |
-S | Thread stack size in Kbytes units. | ulimit - s 512; limit thread stack size is 512 Kbytes. |
-T | Maximum CPU utilization time in seconds. | ulimit - t unlimited; for maximum CPU usage time without restrictions. |
-U | Maximum available number of user processes. | ulimit - u 64; restrict users may use up to 64 process. |
-V | Process the maximum amount of virtual memory, in Kbytes units. | ulimit - v 200000; limit the maximum amount of virtual memory is 200000 Kbytes. |