Description of ulimit-a output on AIX

Source: Internet
Author: User

The meaning of ulimit-a output on AIX has previously been shared about changing commands in linux, but the AIX commands are not the same as those in linux. However, the solution is basically www.2cto.com: too open files. The system resource restrictions used by AIX users include two concepts: hard limits and soft limits ). Hard limits has been introduced since AIX 4.1. Hard limits should be set by the AIX system administrator. Only members in the security Group can increase the value. Users can reduce the value but the change will expire as the user exits from the system. Run the following command to view the limits of hard limits: www.2cto.com ulimit-Ha soft limits is the upper limit on the use of system resources by the AIX core. This value can be changed by anyone, but cannot exceed the hard limits value. Note that only members of the security group can make the changes take effect permanently. changes made by common users will expire after they exit the system. Run the following command to view the soft limits settings: ulimit-a sets the stack value to-1 in/etc/security/limits. Why does ulimit-a display 4194304? The cause of this problem is that you have set the "hard limit" of the default stack in your operating system ). To solve this problem, you need to set the new hard limit of the stack in/etc/security/limits to be infinite, and then set the stack restriction. For example, default: fsize = 2097151 core = 2097151cpu =-1 data = 262144rss = 65536stack_hard =-1 stack =-1 nofiles = 2000 then log on again with the affected user account and run the ulimit-a command, the limitations of the new stack should be infinite: # ulimit-atime (seconds) unlimitedfile (blocks) unlimiteddata (kbytes) 131072 stack (kbytes) unlimitedmemory (kbytes) 32768 coredump (blocks) 2097151 nofiles (descriptors) 2000 To view the current value specified for these shell limits, and to change M if necessary: 1. enter the following command: # many problems with smit chuser may also be caused by improper settings. These values can be viewed through ulimit-a: PEKAX528:/> ulimit-atime (seconds) unlimitedfile (blocks) unlimiteddata (kbytes) unlimitedstack (kbytes) 4194304 memory (kbytes) 32768 coredump (blocks) unlimitednofiles (descriptors) 2000 what does this mean? The text below will be clear after reading it. PEKAX528:/> more/etc/security/limits ** Sizes are in multiples of 512 byte blocks, CPU time is in seconds ** fsize --- soft file size in blocks * core --- soft core file size in blocks * cpu --- soft per process CPU time limit in seconds * data --- soft data segment size in blocks * stack --- soft stack segment size in blocks * rss --- soft real memory usage in blocks * nofiles --- soft file descriptor li Mit * fsize_hard --- hard file size in blocks * core_hard --- hard core file size in blocks * cpu_hard --- hard per process CPU time limit in seconds * data_hard --- hard data segment size in blocks * stack_hard --- hard stack segment size in blocks * rss_hard --- hard real memory usage in blocks * nofiles_hard --- hard file descriptor limit ** The following table contains the default hard values if * Hard values are not explicitly defined: ** Attribute Value * =================================* fsize_hard set to fsize * cpu_hard set to cpu * core_hard- 1 * data_hard-1 * stack_hard 8388608 * rss_hard-1 * nofiles_hard-1 ** NOTE: A value of-1 implies "unlimited" * default: fsize = 2097151 core = 2097151cpu =-1 data = 262144rss = 65536 stack = 65536 nofiles = 2000 root: fsize =-1 data =-1 stack =-1 core =-1 daemon: B In: sys: adm: uucp: guest: nobody: lpd: db2inst1: core =-1rss =-1 fsize =-1 data = 491519 oracle: fsize =-1 data =-1 stack =-1 core =-1fsize_hard =-1cpu_hard =-1data_hard =-1stack_hard =-1core_hard =-1core_hard =-1rss =-1 nofiles = 4000 use the ulimit command to set or report user resource limits. Syntax ulimit [-H] [-S] [-a] [-c] [-d] [-f] [-m] [-n] [-s] [- t] [Limit] specifies the ulimit command to set or report the resource Limit of a user process, as defined in the/etc/security/limits file. The file contains the following default limits: fsize = 2097151 core = 2097151cpu =-1 data = 262144rss = 65536 stack = 65536 nofiles = 2000 when a new user is added to the system, these values are used as default values. When a user is added to the system, the preceding values are set using the mkuser command or the chuser command. The limits are soft and hard. With the ulimit command, you can change the soft limit to the maximum value of the hard limit. To change the hard limit of a resource, you must have the root user permission. Many systems do not include one or more limits. The Limit of a specific resource is set when the Limit parameter is specified. The value of the Limit parameter can be a number in a specified unit in each resource or an unlimited value. To set a specific ulimit to unlimited, you can use the word unlimited. Note: In the/etc/security/limits file, setting the default limit is to set the system Width limit, not just the limit required by the user when creating the user. When the Limit parameter is omitted, the current resource Limit is printed. The soft limit is printed unless the-H flag is specified. When you specify more than one resource, the limit name and unit are printed before the value. If no option is provided, it is assumed that the-f flag is included. Because the ulimit command affects the current shell environment, it will be provided as a general built-in shell command. If you call this command in an independent command execution environment, the file size limit of the caller environment is not affected. This is the case in the following example: nohup ulimit-f restart env ulimit 10000 once the hard limit is reduced through the process, it cannot be increased without the root privilege, even if it is returned to the original value. For more information about user and System resource limits, see getrlimit, setrlimit, or vlimit subroutines in AIX 5L Version 5.2 Technical Reference: Base Operating System and Extensions Volume 1. Flag-a lists all current resource limits. -C uses 512 bytes to specify the core dump size. -D specifies the size of the data area in K bytes. -F sets the file size Limit (in blocks) when the Limit parameter is used, or reports the file size Limit when no parameter is specified. The default value is the-f flag. -H specifies the hard limit of a given resource. If you have root user permissions, you can increase the hard limit. Any user can reduce the hard limit. -M specifies the size of the physical memory in K bytes. -N specifies the maximum number of file descriptors that a process can possess. -S specifies the size of the stack in K bytes. -S specifies the soft limit for the given resource. The soft limit can be increased to the hard limit value. If the-H and-S signs are not specified, the limit applies to the above two. -T specifies the number of seconds used by each process. The following exit value is returned: 0 is successfully completed.> 0. A request to a higher limit is rejected or an error occurs. In this example, the file size limit is set to 51,200 bytes. The input: ulimit-f 100 file/usr/bin/ksh contains the ulimit built-in command. In linux, the program is placed on AIX560, and the result is coredown as soon as it is run. Use ulimit-a to view the limit and find that the memory limit is too small. Change the memory to unlimited (you can also use smit), ulimit-m unlimited memory ulimit-s unlimited stack ulimit-d unlimited Data Segment discovery programs can apply for up to MB of memory, and more or coredown. Then, you can apply for a maximum of 2 GB space for the export LDR_CNTRL = MAXDATA = 0x40000000 1 Gexport LDR_CNTRL = MAXDATA = 0x80000000 2 GB. The above are compiled in 32 bits. After 64-bit compilation (-q64. Export LDR_CNTRL = MAXDATA = 0xD0000000export LDR_CNTRL = MAXDATA = 0xF0000000 4G can apply for up to 4 GB space. Finally, set export LDR_CNTRL = MAXDATA = 0xF00000000 4G to apply for an infinite amount of space (exceeding the physical memory ). When setting this environment variable, you can set the dsa attribute and whether to use the maximum page eg: export LDR_CNTRL = MAXDATA = 0xF00000000 @ dsaexport LDR_CNTRL = MAXDATA = 0xF00000000 @ LARGE_PAGE_DATA = y if 32-bit compilation is used, you can use the shared memory to extend the memory application for more than 2 GB. The preceding environment variables are only valid for the current dialog, and can be set to the program separately. You can use eg: cc-bmaxdata: 0xD0000000/dsa sample to add options during compilation or startup. oLDR_CNTRL = MAXDATA = 0xF00000000. out this value (nofiles) can only be changed in AIX 4.3.1 or later versions. The above definition is stored in the file/etc/security/limits as the default value, and takes effect after new users are added to the system. To directly change the definition value in this file, you need to restart the system for the change to take effect. "-1" indicates that the value is not limited by soft limits (unlimited ). Next we will introduce each field one by one: the size limit of the files created by the fsize user. This defined value (512 bytes in units) is the maximum size of files that can be generated by the user. The size limit of the core file generated by the core (512 bytes ). Cpu user process cpu limit (in seconds ). Normal users can only reduce this value, and root can increase this value. Note that the CPU usage time of a process depends on the AIX Kernel (core program) process scheduling algorithm. This value is for reference only. Data Process data segment size limit (in bytes ). Stack process stack segment size limit (in bytes ). The limit of the resident memory segment of the rss process (in bytes ). The AIX core does not refer to this limitation. The maximum number of files opened in nofiles.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.