HP-UX Reference (11i v2 07/12) - 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 the SYSATTR privilege 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 parameters
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 parameters 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.
Security Restrictions
Some or all of 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 system configuration. See privileges(5) for more information about privileged access on sys-
tems 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_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 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.
390 Hewlett-Packard Company − 2 − HP-UX 11i Version 2: December 2007 Update