Difference between revisions of "Sysctl"
(→Retrieve Kernel Information) |
|||
Line 78: | Line 78: | ||
|} | |} | ||
+ | |||
+ | ===Categories of Kernel information=== | ||
+ | |||
+ | The kernel information are organized in a tree format, called as ''management information base (MIB) with several categories. Compare the following list with the NAMEs above. | ||
+ | |||
+ | {|class="wikitable" style="width:96.5%;background:#FFFFFF; border:2px solid #008000;text-align:left;padding: 10px" | ||
+ | |- | ||
+ | ! scope="col" style="width: 100px;"|'''Category''' | ||
+ | ! scope="col" style="width: 350px;"|'''Function''' | ||
+ | |- | ||
+ | |kern | ||
+ | |Core kernel funktions and features | ||
+ | |- | ||
+ | |vm | ||
+ | |Virtual memory system | ||
+ | |- | ||
+ | |vfs | ||
+ | |Filesystem | ||
+ | |- | ||
+ | |net | ||
+ | |Networking | ||
+ | |- | ||
+ | |debug | ||
+ | |Debugging | ||
+ | |- | ||
+ | |hw | ||
+ | |Hardware | ||
+ | |- | ||
+ | |machdep | ||
+ | |Machine-depend settings | ||
+ | |- | ||
+ | |user | ||
+ | |Userland interface information | ||
+ | |- | ||
+ | |p1003_1b | ||
+ | |POSIX behavior | ||
+ | |- | ||
+ | |dev | ||
+ | |Device-specific information | ||
+ | |- | ||
+ | |security | ||
+ | |Security-specific kernel features | ||
+ | |} | ||
+ | |||
+ | Each of this categories have further subcategories. Each category is connected with its subcategories by making a string with a point between them.<br/> | ||
+ | Example: the category ''kern'' and its subcategory ''hostname'' give you: ''kern.hostname'' variable. | ||
[[Category:How To]] | [[Category:How To]] | ||
[[Category:Kernel]] | [[Category:Kernel]] |
Revision as of 11:40, 26 February 2020
Welcome to Sysctl. |
Kernel Competence | ||
---|---|---|
Sysctl | Kldstat | Third-party Kernel Modules |
Kernel Modules | FreeBSD Ports: Kld | Kenv |
Compiling a new GhostBSD kernel | ||
Back to the System |
Contents
Introduction
The sysctl 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.
Usage
The information available from sysctl consists of integers, strings, and opaque types. The sysctl 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.conf(5). Please refer to loader.conf(5) for more information on which tunables are available and how to set them.
Retrieve Kernel Information
Use sysctl plus the following NAME:
sysctl NAME
You will get the following examples:
Categories of Kernel information
The kernel information are organized in a tree format, called as management information base (MIB) with several categories. Compare the following list with the NAMEs above.
Category | Function |
---|---|
kern | Core kernel funktions and features |
vm | Virtual memory system |
vfs | Filesystem |
net | Networking |
debug | Debugging |
hw | Hardware |
machdep | Machine-depend settings |
user | Userland interface information |
p1003_1b | POSIX behavior |
dev | Device-specific information |
security | Security-specific kernel features |
Each of this categories have further subcategories. Each category is connected with its subcategories by making a string with a point between them.
Example: the category kern and its subcategory hostname give you: kern.hostname variable.