s Thread stack size, With Kbytes In units of ulimit –s 512 Limit the size of the thread stack to 512 Kbytes p The size of the pipeline buffer, With Kbytes In units of ulimit –p 512 Limit the size of the pipeline buffer to 512 Kbytes n The maximum number of file descriptors that can be opened ulimit –n 128 Limit the maximum use of 128 File descriptors m Maximum memory size, With Kbytes In units of ulimit –m unlimited There is no limit on the maximum memory l Maximum lockable memory size, With Kbytes In units of ulimit –l 32 Limit the maximum lockable memory size to 32 Kbytes f The maximum number of files a process can create, With blocks In units of ulimit –f 2048 Limit the maximum file size that a process can create to 2048 blocks d The size of the largest data segment of the process, With Kbytes In units of ulimit -d unlimited There is no limit on the data segment size of the process c maximal core File size, With blocks In units of ulimit –c unlimited Pair generated core The size of the file is not limited a Show all current limit Information ulimit –a Show all current limit Information ulimit –Sn 32 Limit soft resources ,32 File descriptors. S Set soft resource limits, After setting, you can add, But it can't exceed the hard resource settings. ulimit –Hs 64 Limit hard resources, The thread stack size is 64K. H Set hard resource limits, Once the settings cannot be increased.
POSIX message queues (bytes, -q) unlimitedĠ2.04 ulimit Parameter Introduction Command parameter describe Example
HOW TO INSTALL GLIBC CENTOS TRIAL
Ulimit -c unlimited # Cancel size limit, Development, Secondary parameters can be used in the trial operation stageĠ2.03 Check coredump File option parameters ulimit -a # Show all current limit Information
#ulimit -c 1024 # 1024 individual blocks, commonly 1block=512bytes 02.01 see coredump Whether the function is turned on ulimit -c # If 0 Express coredump The switch is offĠ2.02 open coredump function # Appoint coredump file size, Open coredump function Usually ,core The file will contain the memory of the program at run time, Register state, Stack pointer, Memory management information and various function call stack information, etc, We can understand it as a file generated by the current state storage of program work, When many programs make mistakes, they will produce a core file, Analyze this file through tools, We can locate the corresponding stack call and other information when the program exits abnormally, Find out the problem and solve it in time. When a program terminates or crashes abnormally while it is running, The operating system will record the memory state of the program at that time, Save in a file (core file ), This kind of behavior is called Core Dump Or called " Core Dump ", utilize coredump Can help us quickly locate the location of the program crash.