ulimit - Set or display resource limits

Synopsis

ulimit [ -HS ] [ -acdfmnst ] [ limit ]

Description

The ulimit utility sets or displays resource limits. The resource limits apply to the current process and to any processes that are started after the resource limit is set.

For each resource, there is a hard or maximum limit and a soft or current limit. The soft limit can be changed to any value that is less than or equal to the hard limit. The hard limit can be changed to any value that is greater than or equal to the soft limit. The hard limit can only be increased by a user with *JOBCTL special authority.

On i5/OS, only the file size (-f) and number of descriptors (-n) resource limits can be set. All of the resource limits can be displayed.

Options

-a
Display all of the resource limits.
-c
Display the resource limit for the maximum size of a core file in kilobytes.
-d
Display the resource limit for the maximum size of a process' data segment in kilobytes.
-f
Set or display the resource limit for the maximum size of a file in kilobytes.
-H
Set or display the hard limit for the resource.
-m
Display the resource limit for the maximum size of a process' total available storage.
-n
Set or display the resource limit for the maximum number of file descriptors that can be opened by the process.
-s
Display the resource limit for the maximum size of the process' stack in kilobytes.
-S
Set or display the soft limit for the resource.
-t
Display the resource limit for the maximum amount of CPU time in seconds.

Operands

When limit is not specified, the value of the resource limit is displayed. When the -H option is specified, the hard limit is displayed. Otherwise, the soft limit is displayed.

When limit is specified, the value of the resource limit is set. The limit can be an arithmetic expression or the string "unlimited" for no limit. If neither the -H or -S options are specified, both the hard and soft limits are set.

If no resource is specified, the default is the file size (-f) resource limit.

Exit status

  • 0 when successful
  • >0 when unsuccessful