>>-getrlimit--resource--stem-----------------------------------><
Function
getrlimit invokes the getrlimit callable service to get
the maximum and current resource limits for the calling process.
Parameters
- resource
- The resource whose limit is being requested. Resources that
have limits with values greater than RLIM_INFINITY will return values
of RLIM_INFINITY.
You can use the predefined variables beginning
with RLIMIT_ or their equivalent numeric values to access the limits.
(See
REXX predefined variables for the numeric values.)
Variable |
Description |
---|
RLIMIT_AS |
Maximum address space size for a process |
RLIMIT_CORE |
Maximum size (in bytes) of a core dump created by a process |
RLIMIT_CPU |
Maximum amount of CPU time (in seconds) used by a process |
RLIMIT_FSIZE |
Maximum files size (in bytes) created by a process |
RLIMIT_NOFILE |
Maximum number of open file descriptors for a process |
- stem
- The name of the stem variable used to return the limit. stem.1 is
the first word and stem.2 is the second word. The first word
contains the current limit; the second word contains the maximum limit.
The values for each word are dependent on the resource specified.
Example
To print the maximum and current limit for number of open files
allowed:
"getrlimit" rlimit_nofile r.
say 'maximum open limit is' r.2
say 'current open limit is' r.1