HP-UX Reference (11i v3 07/02) - 2 System Calls (vol 5)
s
settune_txn(2) settune_txn(2)
NAME
settune_txn() - sets the values of kernel tunable parameters in a transaction
SYNOPSIS
#include <sys/dyntune.h>
int settune_txn (uint64_t version,
struct ktune_context *transaction,
size_t struct_size,
uint64_t num_elements,
char *err_buf,
uint64_t *err_bufsize,
uint64_t stf_flags);
PARAMETERS
version The version parameter should always be set to
SETTUNE_VERSION.
transaction The details of the changes are specified in an array of
ktune_context
structures. Each
ktune_context structure provides context to the changes to be made to a single tun-
able, and contains at least the following fields, in unspecified order:
char *kct_name The name of the tunable parameter to be changed. NULL-
terminated ASCII string.
uint64_t ktc_value The value to which the tunable parameter must be set.
uint64_t ktc_flags These are flags to describe this change within the transaction.
Valid flags and their corresponding connotations are:
TCF_CURRVALUE
The current value of the tunable should be changed to the
value specified in the ktc_value parameter. This is
allowed for all tunables. Setting the current value of a
tunable that the system is tuning automatically turns off
the automatic tuning.
TCF_DEFAULT
The tunable parameter is switched to its default state.
For tunables that can be tuned by the system, the
automatic tuning is turned on. The value specified in the
ktc_value parameter is ignored.
size The size of a ktune_context
structure, as understood by the caller.
num_elements The number of tunables that are being modified in this call.
err_buf Errors or warning messages that give details about the tuning are passed back in the
err_buf, which must specify an address in the caller’s space. The messages will be in
English and returned as NULL-terminated ASCII strings. A NULL string terminates the
error messages.
err_bufsize The parameter err_bufsize is a pointer to a variable containing the size of the err_buf buffer
(in bytes). Upon completion of the system call, err_bufsize will contain the size necessary
for all the error and/or warning messages for the transaction. If this value is greater than
the original err_bufsize value, the messages have been truncated to fit into err_buf.A
buffer of size 300 bytes per tunable is usually sufficient for the error buffer.
stf_flags A bitmask of flags governing the tunable change operation. The following flag value is
recognized:
STF_VALIDATE Check the requested changes, but do not actually make any change.
With this flag set, settune_txn() will return the same exit code
and error and warning messages as if it were actually making the
change, but no change will be made.
DESCRIPTION
This function is used to modify the values of a set of kernel tunable parameters at the same time. Changes
are made to the tunables using a transactional change model using a three-phase commit where the follow-
ing rules apply:
406 Hewlett-Packard Company − 1 − HP-UX 11i Version 3: February 2007