Difference between revisions of "Sysctl (command)"
Jump to navigation
Jump to search
↑ https://github.com/prometheus/node_exporter
↑ https://github.com/moby/moby/pull/37701
Tags: Mobile web edit, Mobile edit |
|||
(29 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {{lowercase}} | |
− | * | + | <code>sysctl</code> configure kernel parameters at runtime. |
+ | * https://man7.org/linux/man-pages/man8/sysctl.8.html | ||
− | sysctl vm.[[ | + | * <code>sysctl -a, --all</code> Display all values currently available. |
+ | * <code>[[sysctl -p]]</code> Load in sysctl settings. | ||
+ | * <code>[[/etc/sysctl.d/]]</code> | ||
+ | * <code>[[/etc/sysctl.conf]]</code> | ||
+ | |||
+ | |||
+ | * <code>sysctl [[vm.]][[swappiness]]</code> | ||
+ | [[sysctl -w]] vm.[[nr_hugepages]] = 204832 | ||
+ | sysctl -w vm.[[max_map_count]]=262144 | ||
[[KVM]] [[VNC]] remote viewer | [[KVM]] [[VNC]] remote viewer | ||
[[iptables]] -t nat -A PREROUTING -i eno1 -p tcp --dport 5900 -j DNAT --to 127.0.0.1:5900 | [[iptables]] -t nat -A PREROUTING -i eno1 -p tcp --dport 5900 -j DNAT --to 127.0.0.1:5900 | ||
− | sysctl -w net.ipv4.ip_forward=1 | + | sysctl -w net.ipv4.[[ip_forward]]=1 |
sysctl -p [[/etc/sysctl.conf]] | sysctl -p [[/etc/sysctl.conf]] | ||
− | + | * <code>sysctl -w kernel.perf_event_paranoid=X ([[node exporter]] <ref>https://github.com/prometheus/node_exporter</ref>)</code> | |
Line 18: | Line 27: | ||
* <code>sysctl -w net.ipv6.conf.all.forwarding=1</code> | * <code>sysctl -w net.ipv6.conf.all.forwarding=1</code> | ||
+ | |||
+ | * <code>[[sysctl]] -q net.ipv4.conf.all.src_valid_mark=1</code> | ||
+ | |||
+ | * <code>[[sysctl -w]] vm.[[max_map_count]]=262144</code> | ||
* [[macOS]]: <code>[[sysctl]] machdep.cpu.features</code> | * [[macOS]]: <code>[[sysctl]] machdep.cpu.features</code> | ||
+ | |||
+ | * <code>net.ipv4.tcp_[[mtu]]_probing</code> ([[SSH2_MSG_KEX_ECDH_REPLY]]) | ||
+ | |||
+ | * <code>[[sysctl -w fs.file-max]]=100000</code> | ||
+ | |||
+ | * <code>sysctl -w [[vm.]]nr_hugepages = 204832</code> | ||
== Related terms == | == Related terms == | ||
* [[Docker]] added support for <code>sysctl</code> options in [[docker services]]<ref>https://github.com/moby/moby/pull/37701</ref> in docker (2019-07-22) | * [[Docker]] added support for <code>sysctl</code> options in [[docker services]]<ref>https://github.com/moby/moby/pull/37701</ref> in docker (2019-07-22) | ||
+ | * [[Tunning]] | ||
+ | * <code>[[sysctl]] fs.file-max</code> | ||
+ | * [[K8s 1.21]] (April 2021) added support for sysctl | ||
+ | * [[Redis values.yml]]: sysctl.enabled: false | ||
+ | * [[prlimit]] | ||
== See also == | == See also == | ||
* {{sysctl}} | * {{sysctl}} | ||
− | |||
− | |||
* {{Linux Kernel}} | * {{Linux Kernel}} | ||
[[Category:Linux commands]] | [[Category:Linux commands]] |
Latest revision as of 11:48, 24 January 2024
sysctl
configure kernel parameters at runtime.
sysctl -a, --all
Display all values currently available.sysctl -p
Load in sysctl settings./etc/sysctl.d/
/etc/sysctl.conf
sysctl vm.swappiness
sysctl -w vm.nr_hugepages = 204832 sysctl -w vm.max_map_count=262144
iptables -t nat -A PREROUTING -i eno1 -p tcp --dport 5900 -j DNAT --to 127.0.0.1:5900 sysctl -w net.ipv4.ip_forward=1 sysctl -p /etc/sysctl.conf
sysctl -w kernel.perf_event_paranoid=X (node exporter [1])
sysctl -w net.ipv4.ip_forward=1
sysctl -w net.ipv6.conf.all.forwarding=1
sysctl -q net.ipv4.conf.all.src_valid_mark=1
sysctl -w vm.max_map_count=262144
net.ipv4.tcp_mtu_probing
(SSH2_MSG_KEX_ECDH_REPLY)
sysctl -w fs.file-max=100000
sysctl -w vm.nr_hugepages = 204832
Related terms[edit]
- Docker added support for
sysctl
options in docker services[2] in docker (2019-07-22) - Tunning
sysctl fs.file-max
- K8s 1.21 (April 2021) added support for sysctl
- Redis values.yml: sysctl.enabled: false
- prlimit
See also[edit]
sysctl, -a, -p, -w
,vm.swappiness
,/etc/sysctl.conf
,/etc/sysctl.d/
,net.ipv4.ip_forward
, OOM,Kernel.shmmax
,prlimit
- Linux Kernel: namespaces, Cgroups, OOM, proc, Linux Kernel changelog,
sysctl, userfaultfd
, Grub, ENOSPC, ENOMEM, DKMS, syscall, Transparent huge pages, smatch, sysfs, vm.swappiness, CFS, Runlevel, Jens Axboe, Consistent Network Device Naming, Initial ramdisk (initrd),modprobe
, MTD, Linux Kernel vulnerabilities,/sys/kernel/
, KernelCare,unix://
, Data Plane Development Kit (DPDK)
Advertising: