|
|
HP-UX Reference > Ssettune(2)HP-UX 11i Version 2: December 2007 Update |
|
NAMEsettune() — set the value of a kernel tunable parameter SYNOPSIS#include <sys/dyntune.h> int settune(const char *tunable, uint64_t value, unsigned int flags); DESCRIPTIONThis function sets the value of the kernel tunable parameter named tunable to the supplied value. This new value takes effect immediately, except in the cases noted below. Some parameters cannot be changed without rebooting the OS kernel. 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 man pages for those parameters for details.) Valid values for the flags parameter and their connotations are:
The caller needs to have the SYSATTR privilege to make this call. The tuneinfo2(2) call can give information about whether or not changes to a parameter are allowed, or will require a reboot. Some individual parameters may have specific notes regarding their behavior when changed; consult the parameter man pages for details on each specific parameter. Persistence of ChangesChanges to parameter values made with settune() 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() may not remain effective across reboots in future releases of HP-UX. Security RestrictionsSome 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 systems that support fine-grained privileges. RETURN VALUEThis function returns one of the following values:
ERRORSIf this function returns STR_ERROR to indicate an error, the global variable errno will be set to one of the following values, to indicate the error that occurred:
WARNINGSThe caller must have the SYSATTR privilege to use this call. 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 configuration saved as a backup; if the system fails to boot after a tunable change, boot from that backup kernel configuration. Keep good records of all tunable changes so that they can be reversed if they degrade system performance. (Tunable changes made with settune() are automatically logged to syslog.) If the tunable being changed through settune(2) is used in expressions that set the values of other tunables, those expressions will not be re-evaluated and those tunable values will not be updated. If expression evaluation is desired, use kctune(1M) to set tunable values. SEE ALSOkctune(1M), mk_kernel(1M), gettune(2), tuneinfo2(2), privileges(5). Individual tunable parameter man pages in section 5. |
|