The OpenNET Project / Index page

[ новости /+++ | форум | wiki | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 [Cписок руководств | Печать]

sysctl (8)
  • sysctl (2) ( Русские man: Системные вызовы )
  • sysctl (2) ( Linux man: Системные вызовы )
  • sysctl (3) ( FreeBSD man: Библиотечные вызовы )
  • >> sysctl (8) ( FreeBSD man: Команды системного администрирования )
  • sysctl (8) ( Русские man: Команды системного администрирования )
  • sysctl (8) ( Linux man: Команды системного администрирования )
  • sysctl (9) ( FreeBSD man: Ядро )
  • Ключ sysctl обнаружен в базе ключевых слов.

  • BSD mandoc


     - get or set kernel state


    [-bdehNnoqx ] name [= value ] ...
    [-bdehNnoqx ] -a  


    The utility retrieves kernel state and allows processes with appropriate privilege to set kernel state. The state to be retrieved or set is described using a ``Management Information Base'' (``MIB'' ) style name, described as a dotted set of components.

    The following options are available:

    Equivalent to -o a (for compatibility).
    List all the currently available non-opaque values. This option is ignored if one or more variable names are specified on the command line.
    Force the value of the variable(s) to be output in raw, binary format. No names are printed and no terminating newlines are output. This is mostly useful with a single variable.
    Print the description of the variable instead of its value.
    Separate the name and the value of the variable(s) with `=' This is useful for producing output which can be fed back to the utility. This option is ignored if either -N or -n is specified, or a variable is being set.
    Format output for human, rather than machine, readability.
    Show only variable names, not their values. This is particularly useful with shells that offer programmable completion. To enable completion of variable names in zsh(1)PqPaports/shells/zsh, use the following code:
    listsysctls () { set -A reply $(sysctl -AN ${1%.*}) }
    compctl -K listsysctls sysctl

    To enable completion of variable names in tcsh(1), use:

    "complete sysctl 'n/*/`sysctl -Na`/'"
    Show only variable values, not their names. This option is useful for setting shell variables. For instance, to save the pagesize in variable psize use:

    "set psize=`sysctl -n hw.pagesize`"
    Show opaque variables (which are normally suppressed). The format and length are printed, as well as a hex dump of the first sixteen bytes of the value.
    Suppress some warnings generated by to standard error.
    Equivalent to -x a (for compatibility).
    As -o but prints a hex dump of the entire value instead of just the first few bytes.

    The information available from consists of integers, strings, devices (Vt dev_t ) and opaque types. The utility only knows about a couple of opaque types, and will resort to hexdumps for the rest. The opaque information is much more useful if retrieved by special purpose programs such as ps(1), systat(1), and netstat(1).

    Some of the variables which cannot be modified during normal system operation can be initialized via loader(8) tunables. This can for example be done by setting them in loader.conf5. Please refer to loader.conf5 for more information on which tunables are available and how to set them.

    The string and integer information is summarized below. For a detailed description of these variable see sysctl(3).

    The changeable column indicates whether a process with appropriate privilege can change the value. String, integer, and devices values can be set using . For device values, value can be specified as a character device special file name. Special values off and none denote ``no device''

    Name  Type    Changeable
    "kern.ostype      string  no
    "kern.osrelease     string  no
    "kern.securelevelintegerraise only



    In sys/sysctl.h
    definitions for top level identifiers, second level kernel and hardware
    identifiers, and user level identifiers
    In sys/socket.h
    definitions for second level network identifiers
    In sys/gmon.h
    definitions for third level profiling identifiers
    In vm/vm_param.h
    definitions for second level virtual memory identifiers
    In netinet/in.h
    definitions for third level Internet identifiers and fourth level IP identifiers
    In netinet/icmp_var.h
    definitions for fourth level ICMP identifiers
    In netinet/udp_var.h
    definitions for fourth level UDP identifiers



    For example, to retrieve the maximum number of processes allowed in the system, one would use the following request:

    "sysctl kern.maxproc"

    To set the maximum number of processes allowed per uid to 1000, one would use the following request:

    "sysctl kern.maxprocperuid=1000"

    Information about the system clock rate may be obtained with:

    "sysctl kern.clockrate"

    Information about the load average history may be obtained with:

    "sysctl vm.loadavg"

    More variables than these exist, and the best and likely only place to search for their deeper meaning is undoubtedly the source where they are defined.  


    The -w option has been deprecated and is silently ignored.  


    sysctl(3), loader.conf5, sysctl.conf5, loader(8)  


    A utility first appeared in BSD 4.4

    In Fx 2.2 , was significantly remodeled.  


    The utility presently exploits an undocumented interface to the kernel sysctl facility to traverse the sysctl tree and to retrieve format and name information. This correct interface is being thought about for the time being.




    Поиск по тексту MAN-ов: 

    Inferno Solutions
    Hosting by

    Закладки на сайте
    Проследить за страницей
    Created 1996-2024 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру