unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (HP-UX-11.11)
Page:
Section:
Apropos / Subsearch:
optional field



 kmtune(1M)							  kmtune(1M)




 NAME
      kmtune - query, set, or reset system parameters

 SYNOPSIS
      /usr/sbin/kmtune [-l] [-d] [[-q name]...] [-S system_file]

      /usr/sbin/kmtune [-u] [[-s name{=|+}value]...] [[-r name]...]
	   [-S system_file]

 DESCRIPTION
      kmtune is used to query, set, or reset system parameters.	 kmtune
      displays the value of all system parameters when used without any
      options or with the -S or -l option.  kmtune reads the master files
      and the system description files of the kernel and kernel modules.
      Information on the running kernel is gathered with the tuneinfo()
      system call.

      Changes to kernel parameters generally do not take effect until the
      kernel has been rebuilt and the system has been rebooted.	 Some kernel
      parameters can be changed in the running kernel.	kmtune with the -u
      option will alter these parameters and avoid the need to rebuild and
      reboot.

    Options
      The following options are recognized by kmtune:

      -l	Print a detailed report.  The -l option cannot be used with
		the -r, -s, or -u options.

      -d	Print a brief difference report.  Only parameters where the
		planned and current values are different are listed.  If the
		planned value is an formula, it is NOT considered different
		from the current value.	 This option is useful to insure
		that only desired changes will be made on a subsequent
		invocation of kmtune -u.  The -d option cannot be used with
		the -r, -s, or -u options.

      -q name	Query the value of the specified system parameter.

      -r name	Reset the value of a system parameter to the default.

      -s name{=|+}value
		Set the value to a system parameter. If the separator is an
		equal sign (=), the parameter is set to the value specified.
		If the separator is a plus sign (+), the parameter is
		incremented by the value specified.  Negative values cannot
		be used with plus sign (+).  The name{=|+}value format must
		not include spaces or tabs.

      -S system_file
		Specify the HP-UX system description file name.	 If not



 Hewlett-Packard Company	    - 1 -   HP-UX Release 11i: November 2000






 kmtune(1M)							  kmtune(1M)




		specified, /stand/system is used as the default.

      -u	Update the currently running kernel.  This modifies the -s
		and -r options, to update the running kernel as well as the
		system files.  The values specified must be numeric.  The
		whole command will fail if any non dynamic parameters are
		being set.  The -s and -r options are processed in the order
		they are listed.  When incrementing a value with the -s
		option the kernel and the system files are set to the value
		in the system file plus the increment value.

		When used alone, or with -S, it updates all the dynamic
		parameters to match the numeric values stored in the system
		files.	A warning is reported if any static parameters have
		differences.  The order the parameters are listed in the
		system files is not important.	The -d option can be used to
		look at the differences to get a preview of what a lone -u
		will do.

		Use of -u requires super user privileges.

      If the -q query option is specified, kmtune displays the following
      format:

      Brief report without -l option

	       Parameter	Current Dyn Planned	     Module Version
	       ============================================================
	       name		  value Y/- value	     module version

      Detailed report with -l option

	       Parameter:      name
	       Current:	       current value from running kernel
	       Planned:	       planned value from system file
	       Default:	       default value from master file
	       Minimum:	       minimum
	       Module:	       module
	       Version:	       version
	       Dynamic:	       Yes/No


      If the -l option is specified without the -q query option, a detailed
      report on all the parameters is displayed.  The information between
      the parameters is separated by blank lines.

      If the parameter has no minimum value specified in a master file,
      minimum will be displayed as '-'.	 If the parameter is not supplied by
      kernel modules, module will be displayed as '-'.	In the brief listing
      the module and version fields are blank unless the parameter comes
      from a dynamically loadable kernel module.



 Hewlett-Packard Company	    - 2 -   HP-UX Release 11i: November 2000






 kmtune(1M)							  kmtune(1M)




      The Current field is an integer read from the running kernel.  Some
      parameters are not stored in the running kernel and are displayed as
      '-'.  The Value string is a copy of the default value or what is
      stored in a system file.

      The Dynamic field, in the -l output, is either Yes or No, and
      indicates whether the parameter can be changed using -u.	This avoids
      rebuilding and rebooting.	 In the brief listing Y is used to indicate
      dynamic parameters.

      If the -s set option is specified with an equal (=) separator and the
      minimum value of the parameter is described in a master file, the
      value range is checked.  If the minimum value or the specified value
      is a formula, the check is not made.  More restrictive range checking
      may be done by the kernel whenever -u is used.

      If the -s set option with a plus (+) separator is specified and the
      original value is non numeric, an error is reported.

 NOTES
      System administrators are encouraged to use kmsystem and kmtune
      instead of editing description files manually.  File format of
      description files are subject to change, and kmtune is intended to
      provide compatibility in case of format change.

      The -u option is new functionality that allows changes to values in
      the kernel that have always been constant before.	 Programs using
      pstat(), getrlimit(), or sysconf() may have been written with the
      previously correct assumption that the returned variables do not vary
      while the system is running.  The use of kmtune to modify the running
      kernel may cause such programs to produce erroneous results or even
      abort.

      When lowering system limits, processes that exceed the new limit will
      be "grandfathered".  Such processes may not be able to reallocate a
      resource that had just been released and may fail in ways that were
      very unlikely before.  After lowering maxfiles, a process may be in
      violation of the new limit.  If it closes a file and then reopens it,
      the open may fail.  See settune(2).

 RETURN VALUE
      Upon completion, kmtune returns with one of the following exit values:

	   0	Successful.

	   1	Requested parameter is not found, the value is out of range,
		or the type of value is formula.

	   2	Syntax error.





 Hewlett-Packard Company	    - 3 -   HP-UX Release 11i: November 2000






 kmtune(1M)							  kmtune(1M)




	   3	Changes in static parameters were found when trying to
		dynamically update the running kernel.

	   >3	Environmental error.

      Results of query requests are sent to stdout.  Error and warning
      messages are sent to stderr.

 EXAMPLES
	   # kmtune -q shmseg
	     Parameter	      Current Dyn Planned    Module Version
	     ========================================================
	     shmseg		  120  Y  120
	   # kmtune -s shmseg=155
	   # kmtune -l -q shmseg
	     Parameter:	     shmseg
	     Current:	     120
	     Planned:	     155
	     Default:	     120
	     Minimum:	     -
	     Module:	     -
	     Version:	     -
	     Dynamic:	     Yes
	   # kmtune -u shmseg
	     shmseg has been set to 155 (0x9b).
	   # kmtune -r shmseg
	   # kmtune -d
	     Parameter	      Current Dyn Planned    Module Version
	     ========================================================
	     shmseg		  155  Y  120

 FILES
      /usr/conf/master.d/*  Master configuration tables for kernel and
			    kernel modules

      /stand/system	    Default HP-UX system description file

      /stand/system.d/*	    Kernel module system description files

 SEE ALSO
      kmsystem(1M), settune(2), tuneinfo(2), master(4).













 Hewlett-Packard Company	    - 4 -   HP-UX Release 11i: November 2000