Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| sysctl [2021/04/19 04:40] – Provide non (manpage) duplicative intro KubilayKocak | sysctl [2021/04/20 01:26] (current) – sysctl descriptions are high impact on everyone, not just devs KubilayKocak | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== sysctl – get or set kernel state ===== | + | ===== Introduction |
| - | sysctl, an abbreviation of //System Control//, is a command (([[https:// | + | sysctl, an abbreviation of //System Control//, is a command (([[https:// |
| - | < | + | sysctl' |
| - | /boot/loader.conf}}) stage)>> of system and kernel state. | + | |
| - | sysctl' | + | The above form effectively enables a tree-like, hierarchically organised set of configuration states. |
| - | + | ||
| - | The above form effectively enables' | + | |
| Example output: | Example output: | ||
| - | {{{ | + | < |
| hw.ncpu: Number of active CPUs - Often used with for the make(1) -j flag | hw.ncpu: Number of active CPUs - Often used with for the make(1) -j flag | ||
| hw.physmem: Amount of physical memory (in bytes) - The physical RAM of the system | hw.physmem: Amount of physical memory (in bytes) - The physical RAM of the system | ||
| Line 39: | Line 36: | ||
| </ | </ | ||
| - | ==== Proposals for Consistency | + | ===== Standards ===== |
| - | As a facility for built-in, developer-facing documentation, | + | The quality of sysctl descriptions has a direct impact on the %%FreeBSD%% |
| - | === Existence === | + | When authoring a new sysctl description, |
| - | Please do not leave the sysctl -d output blank. Some categories have descriptions while many do not. | + | ==== Categorization ==== |
| - | + | ||
| - | < | + | |
| - | vm.domain: | + | |
| - | vm.domain.0: | + | |
| - | vm.domain.0.pidctrl: | + | |
| - | vm.domain.0.pidctrl.kdd: | + | |
| - | + | ||
| - | kstat.zfs: | + | |
| - | kstat.zfs.zroot: | + | |
| - | kstat.zfs.zroot.dataset: | + | |
| - | </ | + | |
| - | + | ||
| - | A full list of missing descriptions can be obtained with: | + | |
| - | + | ||
| - | < | + | |
| - | sysctl -ad | grep '[: ]$' | + | |
| - | </ | + | |
| - | + | ||
| - | External components like %%OpenZFS%% and drivers can be a challenge. | + | |
| - | + | ||
| - | === Category Accuracy | + | |
| < | < | ||
| Line 86: | Line 62: | ||
| </ | </ | ||
| - | Suggestion: Survey these and propose a format to follow | + | Ideas: |
| - | Suggestion: Do not use " | + | * Survey these and propose a format to follow |
| + | * Suggestion: Do not use " | ||
| + | * Suggestion: Consider manual page references | ||
| - | Suggestion: Consider manual page references | + | ==== Descriptions ==== |
| - | === Provide a summary, not a manual page/ | + | sysctl category and items OID descriptions must not be blank. |
| + | |||
| + | Example: | ||
| + | |||
| + | < | ||
| + | vm.domain: | ||
| + | vm.domain.0: | ||
| + | vm.domain.0.pidctrl: | ||
| + | vm.domain.0.pidctrl.kdd: | ||
| + | ... | ||
| + | kstat.zfs: | ||
| + | kstat.zfs.zroot: | ||
| + | kstat.zfs.zroot.dataset: | ||
| + | </ | ||
| + | |||
| + | A full list of missing descriptions can be obtained with: | ||
| + | |||
| + | < | ||
| + | sysctl -ad | grep '[: ]$' | ||
| + | </ | ||
| + | |||
| + | External components like %%OpenZFS%% and drivers can be a challenge. | ||
| + | |||
| + | === Concise but complete and informative === | ||
| + | |||
| + | Provide a summary, not a manual page. Avoid line breaks | ||
| + | |||
| + | Example: | ||
| < | < | ||
| Line 134: | Line 139: | ||
| Providing the input unit is helpful such as "in kilobytes per second" | Providing the input unit is helpful such as "in kilobytes per second" | ||
| - | === Use descriptions, | + | === Descriptive |
| + | |||
| + | Descriptions should // | ||
| + | |||
| + | Don't use normal sentences, or end in periods (.). | ||
| + | |||
| + | Example: | ||
| < | < | ||
| Line 152: | Line 163: | ||
| </ | </ | ||
| - | === Avoid syntax that may be parser-unfriendly === | + | === Avoid parser-unfriendly |
| - | Consider avoiding | + | Avoid characters such as single quotation marks and unnecessary parentheses that may be a challenge to machine parsing: |
| < | < | ||
| Line 164: | Line 175: | ||
| </ | </ | ||
| - | ==== Possible | + | ==== Other Considerations ==== |
| Consider a format that includes a brief description, | Consider a format that includes a brief description, | ||
| Line 198: | Line 209: | ||
| Do we really need to grow the description string with values from other members of the same struct? | Do we really need to grow the description string with values from other members of the same struct? | ||
| + | |||
| + | ===== Footnotes ===== | ||