mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:28:10 +00:00
Base: Add sysctl man page
This commit is contained in:
parent
fb68aa1480
commit
69b98f7d32
2 changed files with 51 additions and 1 deletions
50
Base/usr/share/man/man8/sysctl.md
Normal file
50
Base/usr/share/man/man8/sysctl.md
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
## Name
|
||||||
|
|
||||||
|
sysctl - configure kernel parameters at runtime
|
||||||
|
|
||||||
|
## Synopsis
|
||||||
|
|
||||||
|
```**sh
|
||||||
|
# sysctl [-a] [variable[=value]]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
sysctl is a utility for managing kernel configuration parameters at runtime.
|
||||||
|
This requires root privileges, and can crash your system.
|
||||||
|
Available parameters are listed under /proc/sys/.
|
||||||
|
|
||||||
|
## Options
|
||||||
|
|
||||||
|
* `-a`: Display all kernel parameters and associated values
|
||||||
|
|
||||||
|
## Arguments
|
||||||
|
|
||||||
|
* `variable`: Retrieve the specified parameter
|
||||||
|
* `variable=value`: Set the specified parameter to the specified value
|
||||||
|
|
||||||
|
## Files
|
||||||
|
|
||||||
|
* `/proc/sys` - source of kernel parameters
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
View all parameters:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# sysctl -a
|
||||||
|
```
|
||||||
|
|
||||||
|
View `ubsan_is_deadly` parameter:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# sysctl ubsan_is_deadly
|
||||||
|
ubsan_is_deadly = 1
|
||||||
|
```
|
||||||
|
|
||||||
|
Set `ubsan_is_deadly` parameter to zero (disabled):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# sysctl ubsan_is_deadly=0
|
||||||
|
ubsan_is_deadly = 1 -> 0
|
||||||
|
```
|
|
@ -117,7 +117,7 @@ int main(int argc, char** argv)
|
||||||
args_parser.set_general_help(
|
args_parser.set_general_help(
|
||||||
"Show or modify system-internal values. This requires root, and can crash your system.");
|
"Show or modify system-internal values. This requires root, and can crash your system.");
|
||||||
args_parser.add_option(show_all, "Show all variables", nullptr, 'a');
|
args_parser.add_option(show_all, "Show all variables", nullptr, 'a');
|
||||||
args_parser.add_positional_argument(var, "Command (var[=value])", "command", Core::ArgsParser::Required::No);
|
args_parser.add_positional_argument(var, "variable[=value]", "variable", Core::ArgsParser::Required::No);
|
||||||
args_parser.parse(argc, argv);
|
args_parser.parse(argc, argv);
|
||||||
|
|
||||||
if (var == nullptr) {
|
if (var == nullptr) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue