Sets the current process's tag and related flags.
Workload Manager Library (libwlm.a)
int wlm_set_tag ( tag, flags)
The tag attribute is a new attribute of a process that can be set using the Workload Manager (WLM) wlm_set_tag subroutine. This tag is a character string with a maximum length of WLM_TAG_LENGTH (not including the null terminator). Process tags can be displayed using the ps command.
The tag attribute is also one of the process attributes used in the assignment rules to automatically assign a process to a given class. The syntax of the assignment rules precludes the use of special characters in the application tag string. Thus, application tags should be comprised only of upper and lower case letters, numbers and underscores ('_').
The main use of the tag attribute is to allow WLM administrators to discriminate between several instances of the same application, which typically have the same user and group ids, execute the same binary, and, therefore, end up in the same class using the standard classification criteria.
For more details about application tags, refer to Workload Manager Application Programming Interface.
When an application sets its tag using wlm_set_tag, it is automatically reclassified according to the current assignment rules and the new tag is taken into account when doing this reclassification.
In addition to the tag itself, the application can also specify flags indicating to WLM if a child process should inherit the tag from its parent after a fork or an exec subroutine.
A process does not require any special privileges to set its tag.
|tag||Specifies the address of a character string. An error is returned if this tag is too long.|
|flags||Specifies the address of an integer interpreted in a manner similar to
the versflags field of the wlmargs structure passed to
other API routines. The integer pointed to by flags should be
initialized with WLM_VERSION. In addition, one or more of
the following values can be or'ed to WLM_VERSION:
Both flags can be set to specify that the children of a tagged process inherits the tag on the fork subroutine and then retains it on the exec subroutine.
Upon successful completion, the wlm_set_tag subroutine returns a value of 0. In case of error, a non-0 value is returned.
For a list of the possible error codes returned by the WLM API functions, see the description of the wlm.h header file.
The wlm.h header file.
Workload Manager rules File in AIX 5L Version 5.1 Files Reference.