Changing
ulimit values in AIX
Edit the ulimit
value file under /etc/security/limits
The current
resource limit is printed when you omit the Limit parameter. The soft
limit is printed unless you specify the -H flag. When you specify
more than one resource, the limit name and unit is printed before the
value. If no option is given, the -f flag is assumed.
Since the ulimit
command affects the current shell environment, it is provided as a
shell regular built-in command. If this command is called in a
separate command execution environment, it does not affect the file
size limit of the caller's environment. This would be the case in the
following examples:
# nohup ulimit
-f 10000
# env ulimit
10000
Once a hard limit
has been decreased by a process, it cannot be increased without root
privilege, even to revert to the original limit.
Flags
Item
Description
-a Lists all
of the current resource limits.
-c Specifies
the size of core dumps, in number of 512-byte blocks.
-d Specifies
the size of the data area, in number of K bytes.
-f Sets the
file size limit in blocks when the Limit parameter is used, or
reports the file size limit if no parameter is specified. The -f flag
is the default.
-H Specifies
that the hard limit for the given resource is set. If you have root
user authority, you can increase the hard limit. Anyone can decrease
it.
-m Specifies
the size of physical memory (resident set size), in number of K
bytes. This limit is not enforced by the system.
-n Specifies
the limit on the number of file descriptors a process may have.
-r Specifies
the limit on the number of threads a process can have.
-s Specifies
the stack size, in number of K bytes.
-S Specifies
that the soft limit for the given resource is set. A soft limit can
be increased up to the value of the hard limit. If neither the -H nor
-S flags are specified, the limit applies to both.
-t Specifies
the number of seconds to be used by each process.
Example
To set the file
size limit to 51,200 bytes, enter:
# ulimit -f 100
To list all the
current resource limits, enter:
# ulimit -a
time(seconds)
unlimited
file(blocks)
2097151
data(kbytes)
131072
stack(kbytes)
32768
memory(kbytes)
65536
coredump(blocks)
2097151
nofiles(descriptors)
2000
threads(per
process) unlimited
processes(per
user) unlimited
Note
: ulimit change takes effect after reboot
No comments:
Post a Comment