*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> settune (2)              


 settune(2)                                                       settune(2)

 NAME    [Toc]    [Back]
      settune - set the value of a kernel tunable parameter

 SYNOPSIS    [Toc]    [Back]
      #include <sys/dyntune.h>

      int settune(const char  *tunable,
                  uint64_t     value,
                  unsigned int flags);

 DESCRIPTION    [Toc]    [Back]
      This 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 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:

           STF_DEFAULT    [Toc]    [Back]
           STF_AUTO       The value of the tunable parameter will be set by
                          the kernel.  The value parameter to settune() will
                          be ignored.

           STF_NOPENDING  The changes are not held pending for the next
                          boot.  If the tunable cannot be set without a
                          reboot, the changes are rejected.  The global
                          variable errno is set to [ENOTSUP].

           STF_NOAUTO     Sets the tunable paramater to the value and turns
                          off any automatic tuning done by the kernel.

      The caller needs to have super-user privileges 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

    Persistence of Changes    [Toc]    [Back]
      Changes to parameter values made with settune() 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.

 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003

 settune(2)                                                       settune(2)

      Changes to parameter values made with settune() may not remain
      effective across reboots in future releases of HP-UX.

 RETURN VALUE    [Toc]    [Back]
      This function returns one of the following values:

           STR_OK           The value of the specified parameter has been
                            changed, or will be changed at next boot.

           STR_ERROR        The function did not complete successfully.  The
                            value of the specified parameter has not been

 ERRORS    [Toc]    [Back]
      If 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:

           [ENOENT]       The specified tunable parameter does not exist.

           [EFAULT]       tunable specifies an address that is inaccessible.

           [EPERM]        The caller does not have super-user privileges.

           [EINVAL]       The specified value is not within the acceptable
                          range for the specified parameter.

           [EBUSY]        The value of the parameter could not be changed

           [ENOTSUP]      The specified parameter cannot be changed without
                          rebooting the kernel and STF_NOPENDING flag was

           [EIO]          The Kernel Registry Service was unavailable or
                          encountered an error.

           [ENOMEM]       Insufficient memory to accommodate the new
                          parameter value.

 WARNINGS    [Toc]    [Back]
      The caller must have super-user permissions 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.)

 Hewlett-Packard Company            - 2 -   HP-UX 11i Version 2: August 2003

 settune(2)                                                       settune(2)

 AUTHOR    [Toc]    [Back]
      settune() was developed by Hewlett-Packard Company.

 SEE ALSO    [Toc]    [Back]
      kctune(1M), mk_kernel(1M), gettune(2), tuneinfo2(2), and the
      individual tunable parameter man pages in section 5.

 Hewlett-Packard Company            - 3 -   HP-UX 11i Version 2: August 2003
[ Back ]
 Similar pages
Name OS Title
gettune HP-UX get the value of a kernel tunable parameter
kcalarm HP-UX add, delete, or list kernel tunable alarms, as well as turn kernel tunable monitoring on and off.
kctune HP-UX manage kernel tunable parameters
kcmond HP-UX EMS Kernel Tunable Monitor daemon
tuneinfo2 HP-UX retrieve detailed information about kernel tunable parameters
settune_txn HP-UX sets the values of kernel tunable parameters in a transaction
AFgetinstparamlong IRIX get / set a parameter list / long parameter value for an instrument configuration in an AFfilehandle structure
systune IRIX display and set tunable parameters
mtune IRIX default system tunable parameters
stune IRIX local settings for system tunable parameters
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service