Difference between revisions of "Sysctl (command)"

From wikieduonline
Jump to navigation Jump to search
 
(15 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
* <code>sysctl -a</code>
+
<code>sysctl</code> configure kernel parameters at runtime.
* <code>sysctl -p</code>
+
* https://man7.org/linux/man-pages/man8/sysctl.8.html
 +
 
 +
 
 +
* <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.d/]]</code>
 
* <code>[[/etc/sysctl.conf]]</code>
 
* <code>[[/etc/sysctl.conf]]</code>
  
  
* <code>sysctl vm.[[swappiness]]</code>
+
* <code>sysctl [[vm.]][[swappiness]]</code>
 +
[[sysctl -w]] vm.[[nr_hugepages]] = 204832
 +
sysctl -w vm.[[max_map_count]]=262144
  
  
Line 15: Line 21:
  
  
sysctl -w kernel.perf_event_paranoid=X ([[node exporter]] <ref>https://github.com/prometheus/node_exporter</ref>)
+
* <code>sysctl -w kernel.perf_event_paranoid=X ([[node exporter]] <ref>https://github.com/prometheus/node_exporter</ref>)</code>
  
  
Line 24: Line 30:
 
* <code>[[sysctl]] -q net.ipv4.conf.all.src_valid_mark=1</code>
 
* <code>[[sysctl]] -q net.ipv4.conf.all.src_valid_mark=1</code>
  
[[sysctl -w]] vm.[[max_map_count]]=262144
+
* <code>[[sysctl -w]] vm.[[max_map_count]]=262144</code>
  
  
Line 31: Line 37:
 
* <code>net.ipv4.tcp_[[mtu]]_probing</code> ([[SSH2_MSG_KEX_ECDH_REPLY]])
 
* <code>net.ipv4.tcp_[[mtu]]_probing</code> ([[SSH2_MSG_KEX_ECDH_REPLY]])
  
[[sysctl -w fs.file-max]]=100000
+
* <code>[[sysctl -w fs.file-max]]=100000</code>
 +
 
 +
* <code>sysctl -w [[vm.]]nr_hugepages = 204832</code>
  
 
== Related terms ==
 
== Related terms ==
Line 38: Line 46:
 
* <code>[[sysctl]] fs.file-max</code>
 
* <code>[[sysctl]] fs.file-max</code>
 
* [[K8s 1.21]] (April 2021) added support for sysctl
 
* [[K8s 1.21]] (April 2021) added support for sysctl
 +
* [[Redis values.yml]]: sysctl.enabled: false
 +
* [[prlimit]]
  
 
== See also ==
 
== See also ==
 
* {{sysctl}}
 
* {{sysctl}}
* {{procps}}
 
* {{ps}}
 
 
* {{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 -w vm.nr_hugepages = 204832
sysctl -w vm.max_map_count=262144


KVM VNC remote viewer

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 -q net.ipv4.conf.all.src_valid_mark=1


  • sysctl -w vm.nr_hugepages = 204832

Related terms[edit]

See also[edit]

  • https://github.com/prometheus/node_exporter
  • https://github.com/moby/moby/pull/37701
  • Advertising: