HP-UX Reference (11i v3 07/02) - 2 System Calls (vol 5)

s
settune_txn(2) settune_txn(2)
None of the changes within a transaction succeed or all of the changes within a transaction succeed.
There are no in-betweens.
No duplicates are allowed within a transaction, where duplicates are defined as more than one change to
a tunable.
There are no restrictions on the order in which the tunables need to be specified within a transaction.
Some parameters represent limits on resources that can be consumed by individual processes. In general,
changes to these parameters do not affect processes that are running at the time the change is made; they
affect only new programs started (with
exec() or an equivalent) after that time. Some specific parame-
ters may be exceptions to this general rule; see the man pages for those parameters for details.
The
tuneinfo2() call can give information about whether or not changes to a parameter are allowed, or
will require a reboot, or can be tuned automatically. Some individual parameters may have specific notes
regarding their behavior when changed; see the man pages for those parameters for details.
Security Restrictions
The actions associated with this system call require the
SYSATTR privilege. Processes owned by the
superuser have this privilege. Processes owned by other users may have this privilege, depending on sys-
tem configuration. See privileges (5) for more information about privileged access on systems that support
fine-grained privileges.
RETURN VALUES
STR_OK The values of the parameters have been changed and the new values are effective
immediately.
STR_ERROR The function did not complete successfully. None of the changes were applied. The
detailed error messages are in the buffer err_buf.
If the buffer size returned in err_bufsize is greater than the size of err_buf, there
were more error messages than have been returned. To get the remaining errors,
increase the size of the buffer and try again.
STR_WARN The function completed successfully, but there were warning messages generated.
These warning messages are in the buffer, err_buf.
If the buffer size returned in err_bufsize is greater than the size of err_buf, some
warning messages were generated which did not fit into the buffer.
ERRORS
When the function returns
STR_ERROR the global variable errno will be set to one of the following values:
[ENOENT] One or more of the specified tunables does not exist.
[EPERM] The caller does not have the SYSATTR privilege.
[EBADVER] The version parameter is not valid.
[EINVAL] One or more of the specified values within the transaction are not within the accept-
able range of values for the corresponding parameters.
[EINVAL] At least one transaction rule was violated and hence none of the changes were made.
[EINVAL] The changes within the transaction could not be applied immediately.
[EINVAL] The combination of flags specified is invalid.
[EINVAL] The number of elements specified is zero.
[EINVAL] The size of a ktune_context structure as specified by struct_size is invalid.
[EINVAL] The number of elements specified is greater than the number of tunables available.
[EFAULT] err_buf or err_bufsize specifies an address that is inaccessible.
[EIO] The Kernel Registry Service was either unavailable or encountered an error.
[ENOMEM] Insufficient memory to accommodate the changes within the transaction.
WARNING
It is possible to seriously degrade system performance, or even render a system unbootable, with incorrect
tunable settings. Use care when setting tunable values. Always have a known working kernel
HP-UX 11i Version 3: February 2007 2 Hewlett-Packard Company 407