Tuesday, July 12, 2011

ulimit parameters explain

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]MeaningExample
-HSet the hard resource limit, once set can not increase.ulimit - Hs 64; limited hardware resources, the thread stack size is 64K.
-SSet the soft resource limit settings can be increased, but not more than hard-resource settings.ulimit - Sn 32; soft resource limit, 32 file descriptors.
-AShow all current limit information.ulimit - a; show all current limit information.
-CMaximum core file size, in blocks as a unit.ulimit - c unlimited; the generated core file size without limit.
-DThe largest process data segment size in Kbytes units.ulimit-d unlimited; of the process data segment size without limit.
-FThe maximum process can create a file to blocks of flats.ulimit - f 2048; limit process can create the maximum file size is 2048 blocks.
-LMaximum locked memory size in Kbytes units.ulimit - l 32; limit the maximum locked memory size 32 Kbytes.
-MMaximum memory size to Kbytes units.ulimit - m unlimited; no limit on the maximum memory.
-NThe maximum number of file descriptors can open.ulimit - n 128; limit the maximum to 128 file descriptors.
-PPipe buffer size in Kbytes units.ulimit - p 512; limit the size of pipe buffer is 512 Kbytes.
-SThread stack size in Kbytes units.ulimit - s 512; limit thread stack size is 512 Kbytes.
-TMaximum CPU utilization time in seconds.ulimit - t unlimited; for maximum CPU usage time without restrictions.
-UMaximum available number of user processes.ulimit - u 64; restrict users may use up to 64 process.
-VProcess the maximum amount of virtual memory, in Kbytes units.ulimit - v 200000; limit the maximum amount of virtual memory is 200000 Kbytes.