Editing Sysctl
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 5: | Line 5: | ||
The [https://www.freebsd.org/cgi/man.cgi?query=sysctl&apropos=0&sektion=0&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html 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.<br/> | The [https://www.freebsd.org/cgi/man.cgi?query=sysctl&apropos=0&sektion=0&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html 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.<br/> | ||
− | == | + | ==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 [https://www.freebsd.org/cgi/man.cgi?query=ps&sektion=1&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports ps(1)], [https://www.freebsd.org/cgi/man.cgi?query=systat&sektion=1&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports systat(1)], and [https://www.freebsd.org/cgi/man.cgi?query=netstat&sektion=1&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports netstat(1)]. | 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 [https://www.freebsd.org/cgi/man.cgi?query=ps&sektion=1&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports ps(1)], [https://www.freebsd.org/cgi/man.cgi?query=systat&sektion=1&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports systat(1)], and [https://www.freebsd.org/cgi/man.cgi?query=netstat&sektion=1&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports netstat(1)]. | ||
Line 11: | Line 11: | ||
Some of the variables which cannot be modified during normal system operation can be initialized via [https://www.freebsd.org/cgi/man.cgi?query=loader&sektion=8&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports loader(8)] tunables. This can for example be done by setting them in [https://www.freebsd.org/cgi/man.cgi?query=loader.conf&sektion=5&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports loader.conf(5)]. Please refer to [https://www.freebsd.org/cgi/man.cgi?query=loader.conf&sektion=5&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports loader.conf(5)] for more information on which tunables are available and how to set them. | Some of the variables which cannot be modified during normal system operation can be initialized via [https://www.freebsd.org/cgi/man.cgi?query=loader&sektion=8&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports loader(8)] tunables. This can for example be done by setting them in [https://www.freebsd.org/cgi/man.cgi?query=loader.conf&sektion=5&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports loader.conf(5)]. Please refer to [https://www.freebsd.org/cgi/man.cgi?query=loader.conf&sektion=5&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports 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: | ||
<code>sysctl NAME</code> | <code>sysctl NAME</code> | ||
Line 76: | Line 79: | ||
|} | |} | ||
− | ==Categories of Kernel information== | + | ===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. | 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. | ||
Line 120: | Line 123: | ||
Each of this categories have further subcategories. Each category is connected with its subcategories by making a string with a point between them.<br/> | 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'' | + | '''Example:''' the category ''kern'' and its subcategory ''hostname'' give you: ''kern.hostname'' variable. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
[[Category:How To]] | [[Category:How To]] | ||
[[Category:Kernel]] | [[Category:Kernel]] |