The prctl utility allows the examination and modification of the resource controls associated with an active process, task, or project on the system. It allows access to the basic and privileged limits on the specified entity.
The following options are supported:
Disables (-d) or enables (-e) the specified action on the specified resource control. The special token all is valid with the disable option to deactivate all actions on the given resource control value.
The other defined actions for a resource are deny and signal=signum. The deny action indicates that the resource control encountered will attempt to deny granting the resource to the process, task, or project on a request for resources in excess of the value provided by the -v option for the new resource control. In the signal=signum action, signum is a signal number (or string representation of a signal). deny actions may not be activated or deactivated if global flags indicate that the deny action is unchangeable.
Specifies the type of the id operands. Valid idtypes are process, task, or project. The default id type, if the -i option is omitted, is process.
Specifies the name of the resource control to get or set. If the name is unspecified, all resource controls are retrieved.
Replaces the first resource control value (matching with the -t privilege) with the new value specified through the -v option.
Specifies which resource control type to set. Unless the "lowerable" flag is set for a resource control, only invocations by users (or setuid programs) who have privileges equivalent to those of root can modify privileged resource controls. See rctlblk_set_value(3C) for a description of the RCTL_GLOBAL_LOWERABLE flag. If the type is not specified, basic is assumed. For a get operation, the values of all resource control types, including system, are displayed if no type is specified.
Specifies the value for the resource control for a set operation. If no value is specified, then the modification (deletion, action enabling or disabling) will be carried out on the lowest-valued resource control with the given type.
Deletes the specified resource control value. If the delete option is not provided, the default operation of prctl is to modify a resource control value of matching value and privilege, or insert a new value with the given privilege. The matching criteria are discussed more fully in setrctl(2).
If none of the -d, -e, -v, or -x options is specified, the invocation is considered a get operation.
The following operand is supported:
The ID of the entity (process, task, or project) to interrogate. If the invoking user's credentials are unprivileged and the entity being interrogated possesses different credentials, the operation will fail. If no id is specified, an error message is returned.
example$ pgrep sort 111759 example$ prctl 111759 111759: /usr/bin/sort process.max-address-space [ lowerable deny no-local-action ] 18446744073709551615 privileged deny 18446744073709551615 system deny process.max-file-descriptor [ lowerable deny ] 256 basic deny 65536 privileged deny 2147483647 system deny process.max-core-size [ lowerable deny no-local-action ] 18446744073709551615 privileged deny 18446744073709551615 system deny process.max-stack-size [ lowerable deny no-local-action ] 8388608 basic deny 9223372036854775807 privileged deny 9223372036854775807 system deny process.max-data-size [ lowerable deny no-local-action ] 18446744073709551615 privileged deny 18446744073709551615 system deny process.max-file-size [ lowerable deny file-size ] 9223372036854775807 privileged signal=XFSZ deny 9223372036854775807 system deny process.max-cpu-time [ lowerable no-deny cpu-time ] 18446744073709551615 privileged signal=XCPU 18446744073709551615 system deny [ infinite ] task.max-cpu-time [ no-deny cpu-time ] 18446744073709551615 system deny [ infinite ] task.max-lwps 2147483647 system deny project.cpu-shares [ no-basic no-local-action ] 10 privileged none 65535 system deny
example# prctl -n project.cpu-shares -i project group.staff 111788: ksh project.cpu-shares [ no-basic no-local-action ] 1 privileged none 65535 system deny example# prctl -n project.cpu-shares -v 10 -r -i project group.staff example# prctl -n project.cpu-shares -i project group.staff 111788: ksh project.cpu-shares [ no-basic no-local-action ] 10 privileged none 65535 system deny
Fatal error encountered.
Invalid command line options were specified.
See attributes(5) for descriptions of the following attributes:
|ATTRIBUTE TYPE||ATTRIBUTE VALUE|