In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
In this issue, the editor will bring you about how to use the Sysctl command to adjust kernel parameters in Linux. The article is rich in content and analyzed and described from a professional point of view. I hope you can get something after reading this article.
The sysctl command is used to dynamically modify kernel run parameters while the kernel is running, and the available kernel parameters are in the directory / proc/sys. It includes some advanced options for TCP/IP stacks and virtual memory systems, which allow experienced administrators to improve eye-catching system performance. You can read and set more than five hundred system variables with sysctl.
1. Common usage
List all variables and view
Sysctl-a | less
Modify the value of a variable
Sysctl-w variable name = variable value # sysctl-w vm.max_map_count=262144
Read a specified variable, such as kernel.msgmnb:
[xt@butbueatiful ~] $sysctl kernel.msgmnb kern.maxproc: 65536
To set a specified variable, use syntax such as variable=value directly:
[xt@butbueatiful ~] $sudo sysctl kernel.msgmnb=1024kernel.msgmnb: 1024
You can use sysctl to modify system variables, or you can modify system variables by editing the sysctl.conf file. Sysctl.conf looks a lot like rc.conf. It sets the value in the form of variable=value. The specified value is set after the system enters multi-user mode. Not all variables can be set in this mode.
The sysctl variable is usually set as a string, number, or Boolean. (Boolean means 1 for 'yes',' and 0 for 'no').
Sysctl-w kernel.sysrq=0sysctl-w kernel.core_uses_pid=1sysctl-w net.ipv4.conf.default.accept_redirects=0sysctl-w net.ipv4.conf.default.accept_source_route=0sysctl-w net.ipv4.conf.default.rp_filter=1sysctl-w net.ipv4.tcp_syncookies=1sysctl-w net.ipv4.tcp_max_syn_backlog=2048sysctl-w net.ipv4.tcp_fin_timeout=30sysctl-w net.ipv4.tcp_synack_retries=2sysctl-w net.ipv4.tcp_keepalive_time=3600sysctl-w net.ipv4.tcp_window_scaling=1sysctl-w net.ipv4.tcp_sack=1
2. About the configuration of sysctl files
The sysctl settings are defined in the sur/lib/sysctl.d/, / run/sysctl.d, and / etc/sysctrl.d directories. Some software settings are located in the / usr/lib/sysctl.d directory. To override the entire file system parameters, create a new file with the same name in the / etc/sysctl.d directory, and then write your configuration. It's the same with creating your own configuration.
In the / etc/sysctl.d directory, create a new file and write your own configuration.
What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.
The above is how to use the Sysctl command to adjust kernel parameters in Linux. If you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.