HP-UX Reference (11i v2 04/09) - 2 System Calls (vol 5)

s
settune_txn(2) settune_txn(2)
DESCRIPTION
This function is used to modify the values of a set of kernel tunable parameters at the same time. The
caller needs to have super-user privileges to make this call. Changes are made to the tunables using a
transactional change model using a three-phase commit where the following rules apply:
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.
If any of the tunables in a transaction require a reboot to take effect, then the entire transaction
requires a reboot to take effect i.e. the effects of all the changes within the transaction are visible only
on a reboot.
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 (2) or an equivalent) after that time. (Some specific parame-
ters may be exceptions to this general rule; see the documentation for those parameters in the kcweb(1M)
online help for details.) The tuneinfo2 (2) 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 parame-
ters may have specific notes regarding their behavior when changed; consult the online help in
kcweb(1M) for details on each specific parameter.
Persistence of Changes
Changes to parameter values made with
settune_txn()
will remain effective across reboots in this
release of HP-UX. Tunable parameter values are stored in the Kernel Registry database. Each time the
system boots, it reads the parameter values from the database and restores them. Changes to parameter
values made with
settune_txn() may not remain effective across reboots in future releases of HP-UX.
RETURN VALUES
STR_OK The values of the parameters have been changed and the new values are
effective immediately.
STR_REBOOT The new values of the parameters have been held pending and will be effective
at the next reboot.
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 gen-
erated. 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 super-user privileges.
[EBADVER] The version parameter is not valid.
[EINVAL] One or more of the specified values within the transaction are not within the
acceptable range of values for the corresponding parameters.
[EINVAL] The transaction rules were violated and hence none of the changes were made.
[EINVAL] The changes within the transaction could not be applied immediately. One or
more of the tunables within the transaction either do not support pending values
or the
STF_NEXTBOOT flag was not set.
Section 2354 Hewlett-Packard Company 2 HP-UX 11i Version 2: September 2004