2016-01-30 12:28:14 +02:00
|
|
|
# sysctl
|
|
|
|
|
|
|
|
> List and change kernel runtime variables.
|
2022-01-27 21:10:17 +07:00
|
|
|
> More information: <https://manned.org/sysctl.8>.
|
2016-01-30 12:28:14 +02:00
|
|
|
|
|
|
|
- Show all available variables and their values:
|
|
|
|
|
2025-04-20 00:21:53 +03:00
|
|
|
`sysctl {{[-a|--all]}}`
|
2016-01-30 12:28:14 +02:00
|
|
|
|
|
|
|
- Set a changeable kernel state variable:
|
|
|
|
|
2025-04-20 00:21:53 +03:00
|
|
|
`sysctl {{[-w|--write]}} {{section.tunable}}={{value}}`
|
2016-01-30 12:28:14 +02:00
|
|
|
|
|
|
|
- Get currently open file handlers:
|
|
|
|
|
|
|
|
`sysctl fs.file-nr`
|
|
|
|
|
|
|
|
- Get limit for simultaneous open files:
|
|
|
|
|
|
|
|
`sysctl fs.file-max`
|
|
|
|
|
2021-01-31 14:05:18 -03:00
|
|
|
- Apply changes from `/etc/sysctl.conf`:
|
2016-01-30 12:28:14 +02:00
|
|
|
|
2025-04-20 00:21:53 +03:00
|
|
|
`sysctl {{[-p|--load]}}`
|