Switch to SpeakEasy.net DSL

The Modular Manual Browser

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

 tuneinfo(2)							 tuneinfo(2)

      tuneinfo - retrieve detailed information about kernel tunable

      #include <&lt&lt&lt;sys/dyntune.h>&gt&gt&gt;

      int tuneinfo(const char *tunable,
		   tuneinfo_t *buf,
		   size_t      size,
		   int	       count);

      This function provides detailed information about one or all kernel
      tunable parameters.  If a particular parameter is of interest, specify
      it by name in tunable.  Otherwise, set tunable to NULL and information
      will be returned on all kernel tunable parameters (up to the size of
      the supplied buffer).

      Information about the selected tunable parameters is returned in
      tuneinfo_t structures.  buf must specify an address in the caller's
      space containing space for count structures.  The size of a tuneinfo_t
      structure, as understood by the caller, should be passed in the size

      Each tuneinfo_t structure describes a single tunable parameter, and
      contains at least the following fields, in unspecified order:

      char ti_name[TUNENAMELEN];
		The name of the tunable parameter.  NULL-terminated ASCII

      char ti_desc[TUNEDESCLEN];
		An English description of the parameter.  NULL-terminated
		ASCII string.

      char ti_mod[TUNEMODLEN];
		The name of the DLKM module in which the parameter is
		defined.  NULL-terminated ASCII string.	 This will be a null
		string for those parameters defined in the core kernel.

      uint64_t ti_current;
		The current value of the parameter.

      uint64_t ti_bootvalue;
		The boot-time value of the parameter (compiled into the

      uint64_t ti_default;
		The HP-supplied default value of the parameter.

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

 tuneinfo(2)							 tuneinfo(2)

      uint64_t ti_min;
		The minimum value of the parameter.  Valid only if the
		TIF_MINVALID flag is set in the ti_flags word, below.

      uint64_t ti_max;
		The maximum value of the parameter.  Valid only if the
		TIF_MAXVALID flag is set in the ti_flags word, below.

		Note: The minimum and maximum values returned here are
		relatively static limits.  They will reflect the limitations
		of the operating system software, and any limitations placed
		on this tunable parameter by the current values of other
		tunable parameters.  However, they do not reflect any
		restrictions on the tunable value based on transient factors
		like the current usage pattern of the system.

		For example, the maximum value returned for maxfiles (the
		number of files a process may have open) will be no greater
		than the current value of nfile (the number of files the
		system may have open).	However, the minimum value returned
		for maxfiles may very well be less than the number of files
		that some existing process has open.

      unsigned ti_flags;
		A bitmask of zero or more of the following flags:

		TIF_CANSET	  The value of this parameter can be changed
				  using settune().

		TIF_DYNAMIC	  The value of this parameter can be changed
				  using settune(), without requiring a

		TIF_SIGNED	  The values, minima and maxima, for this
				  parameter should be interpreted as signed

		TIF_MINVALID	  The ti_minimum field contains a minimum
				  allowed value for this parameter.

		TIF_MAXVALID	  The ti_maximum field contains a maximum
				  allowed value for this parameter.

      If tuneinfo() is successful, it returns the number of tunable
      parameters for which information is available.  (This number may
      exceed the supplied count parameter if the supplied buffer is too
      small to hold all tunable information.)  If the function is not
      successful, it returns -1.

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

 tuneinfo(2)							 tuneinfo(2)

      If this function returns -1 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 or buf contains an address that is

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

	   [EINVAL]	  The size of a tuneinfo_t structure is incorrect.

	   /* To get information about a specific tunable parameter: */
	   tuneinfo_t info;
	   int	      ret;

	   ret = tuneinfo(swapmem_on, &&amp&amp&amp;info, sizeof(info), 1);
	   if (ret <&lt&lt&lt; 0) ...

	   /* To get information about all tunable parameters: */
	   tuneinfo_t *all;
	   int	       num_tunes;
	   int	       ret;

	   num_tunes = tuneinfo(NULL, NULL, sizeof(tuneinfo_t), 0);
	   if (num_tunes <&lt&lt&lt; 0) ...
	   all = (tuneinfo_t *)malloc(num_tunes * sizeof(tuneinfo_t));
	   ret = tuneinfo(NULL, all, sizeof(tuneinfo_t), num_tunes);
	   if (ret <&lt&lt&lt; 0) ...

      tuneinfo() was developed by Hewlett-Packard Company.

      gettune(2), settune(2).

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