| United States-English |
|
|
|
![]() |
HP-UX Reference (Volume 5 of 9): Section 2: System Calls > ssettune(2) |
|
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 will take effect immediately, except in the cases noted below. Some parameters cannot be changed without rebuilding the OS kernel, and then booting that rebuilt kernel. settune() will return an error (ENOTSUP) if asked to change one of these parameters. 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 SAM online help for details.) If the STF_DEFAULT flag is set in the flags parameter, the value of the tunable parameter will be set to its hard-coded default value. In this case, the value parameter to settune() will be ignored. The tuneinfo(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 online help in SAM for details on each specific parameter. Persistence of ChangesChanges to parameter values made with settune() will remain effective across reboots. 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. There is a separate Kernel Registry database for each different kernel file name. For example, /stand/vmunix has a different set of stored parameter values than /stand/vmunix.other. settune() always changes the database corresponding to the kernel file from which the system was last booted. Its changes do not affect any other database. Whenever a kernel gets rebuilt, using SAM, mk_kernel(1M), or some other method, the Kernel Registry database will be erased and replaced with the tunable parameter values compiled into the new kernel. Therefore, parameter changes made using settune() do not persist across kernel rebuilds. To make a parameter change which persists across kernel rebuilds, the system files read during the kernel build process must be updated. Use SAM or kmtune(1M) to do this. 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:
WARNINGSIt 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 saved as a backup; if the system fails to boot after a tunable change, boot from that backup kernel. 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 and to the Kernel Logging system.) |
|||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||