提交 54366299 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!152 atune: refactor the code to generate yaml files and update csv and yaml files

Merge pull request !152 from hanxinke/master
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
# A-Tune is licensed under the Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a copy of Mulan PSL v2 at:
# http://license.coscl.org.cn/MulanPSL2
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
# PURPOSE.
# See the Mulan PSL v2 for more details.
# Create: 2020-07-30
"""
The tool to translate .excel file to .yaml files
Usage: python3 translate_xlsx2yaml.py [-h] [-i] [-o] [-t] [-p]
"""
import argparse
import os
import subprocess
import string
from enum import Enum
from io import StringIO
import io
import openpyxl
import glob
import shlex
class CsvAttr(Enum):
"""Enumerate the headers"""
name = 0
desc = 1
geti = 2
seti = 3
needrestart = 4
typei = 5
options = 6
dtype = 7
scope_min = 8
scope_max = 9
step = 10
items = 11
select = 12
class TuningObject:
"""Tuning Object"""
def __init__(self, obj_list, block_dev, network_dev):
self.name = obj_list[CsvAttr.name.value].strip()
self.desc = obj_list[CsvAttr.desc.value].strip()
self.get = obj_list[CsvAttr.geti.value].strip()
self.set = obj_list[CsvAttr.seti.value].strip()
self.needrestart = obj_list[CsvAttr.needrestart.value].strip()
self.type = obj_list[CsvAttr.typei.value].strip()
self.options = obj_list[CsvAttr.options.value].strip()
self.dtype = obj_list[CsvAttr.dtype.value].strip()
self.scope_min = obj_list[CsvAttr.scope_min.value].strip()
self.scope_max = obj_list[CsvAttr.scope_max.value].strip()
self.step = obj_list[CsvAttr.step.value].strip()
self.items = obj_list[CsvAttr.items.value].strip()
self.block_device = block_dev
self.network_device = network_dev
if '@name' in self.get:
self.get = self.get.replace('@name', self.name)
if '@name' in self.set:
self.set = self.set.replace('@name', self.name)
if '@block' in self.get:
self.get = self.get.replace('@block', self.block_device)
if '@block' in self.set:
self.set = self.set.replace('@block', self.block_device)
if '@netdev' in self.get:
self.get = self.get.replace('@netdev', self.network_device)
if '@netdev' in self.set:
self.set = self.set.replace('@netdev', self.network_device)
self.needrestart = self.needrestart.lower()
def exec_cmd(self, cmd, value):
"""
Execute the input command
:param cmd: input command
:param value: the value used in the command
:return: True or False, the results of the execution
"""
if 'echo' in self.set:
cmd1, cmd2 = cmd.split('>')
try:
file = open(cmd2.strip(), "w")
except PermissionError:
return False
process = subprocess.Popen(shlex.split(cmd1), stdout=file, shell=False)
process.wait()
result = str(process.returncode)
elif 'ifconfig' in self.set:
process = subprocess.Popen(shlex.split(cmd), shell=False)
process.wait()
result = str(process.returncode)
elif 'sysctl' in self.set:
result = subprocess.check_output(shlex.split(cmd), stderr=subprocess.STDOUT, shell=False).decode().strip()
else:
process = subprocess.Popen(shlex.split(cmd), shell=False)
process.wait()
result = str(process.returncode)
cmd_fail = False
if 'sysctl' in self.set:
if 'Invalid argument' in result:
cmd_fail = True
elif 'ethtool' in self.set:
if result != '0' and result != '80':
cmd_fail = True
else:
if result != '0':
cmd_fail = True
if cmd_fail:
print('Invalid Value for ', self.name, ' :', value, '. Make sure the value is in valid range!(', cmd, ')')
return False
return True
def valid_test_command(self, value, orig_value):
"""
Test the set command in excel
:param value: the value used in the set command
:param orig_value: the result of get command
:return: True or False, the result of execution set command
"""
if value == orig_value:
return True
cmd = self.set.replace('$value', value)
result = self.exec_cmd(cmd, value)
return result
def valid_test_good(self):
"""
Main check, check the command and given values.
:return: True or False, check result
"""
if self.type == 'continuous':
return True
get_cmd = self.get
count = get_cmd.count('|')
if count > 0:
get_cmds = get_cmd.split('|')
i = 0
for cmds in get_cmds:
if i == 0:
child = subprocess.Popen(shlex.split(cmds), shell=False, stdout=subprocess.PIPE)
elif i == count:
process = subprocess.Popen(shlex.split(cmds), stdin=child.stdout,
stdout=subprocess.PIPE, shell=False)
result = process.communicate()
else:
child = subprocess.Popen(shlex.split(cmds), shell=False, stdin=child.stdout, stdout=subprocess.PIPE)
i += 1
else:
process = subprocess.Popen(shlex.split(get_cmd), shell=False, stdout=subprocess.PIPE)
result = process.communicate()
orig_value = str(result)
if self.dtype == 'int':
result_min = self.valid_test_command(self.scope_min, orig_value)
result_max = self.valid_test_command(self.scope_max, orig_value)
if not result_min or not result_max:
return False
elif self.dtype == 'string':
dis_options = self.options.split(';')
for option in dis_options:
option = '\"' + option.strip() + '\"'
result = self.valid_test_command(option, orig_value)
if not result:
return False
else:
print("Invalid dtype of ", self.name, ":", self.dtype, ". Only support int and string")
return False
return True
def __repr__(self):
fstr = StringIO()
fstr.write(' -\n')
fstr.write(' name : \"' + self.name + '\"\n')
fstr.write(' info :\n')
fstr.write(' desc : \"' + self.desc + '\"\n')
fstr.write(' get : \"' + self.get + '\"\n')
fstr.write(' set : \"' + self.set + '\"\n')
fstr.write(' needrestart : \"' + self.needrestart + '\"\n')
fstr.write(' type : \"' + self.type + '\"\n')
if self.type == 'continuous':
fstr.write(' scope :\n')
fstr.write(' - ' + self.scope_min + '\n')
fstr.write(' - ' + self.scope_max + '\n')
if self.dtype == 'string':
fstr.write(' dtype : \"string\"\n')
else:
fstr.write(' dtype : \"int\"\n')
elif self.type == 'discrete':
if self.dtype == 'string':
fstr.write(' options :\n')
dis_options = self.options.split(';')
for option in dis_options:
fstr.write(' - \"' + option.strip() + '\"\n')
fstr.write(' dtype : \"string\"\n')
elif self.dtype == 'int':
fstr.write(' scope :\n')
fstr.write(' - ' + self.scope_min + '\n')
fstr.write(' - ' + self.scope_max + '\n')
fstr.write(' step : ' + self.step + '\n')
fstr.write(' items : \n')
if self.items != '':
dis_items = self.items.split(';')
for dit in dis_items:
fstr.write(' - ' + dit + '\n')
fstr.write(' dtype : \"int\"\n')
else:
pass
else:
pass
return fstr.getvalue()
class XLSX2YAML:
"""
Get objects from excel files
"""
def __init__(self, in_file_name, out_file_name, project_name, iterations):
with open(in_file_name, 'rb') as file:
in_mem_file = io.BytesIO(file.read())
self.workbook = openpyxl.load_workbook(in_mem_file, read_only=True)
self.out_file = open(out_file_name, 'w')
self.project_name = project_name
self.iterations = iterations
def __del__(self):
self.out_file.close()
def get_head(self):
"""
Generate the header of yaml file.
:return: string, the header of yaml file.
"""
fstr = StringIO()
fstr.write('project:' + ' \"' + self.project_name + '\"' + '\n')
fstr.write('maxiterations: ' + str(self.iterations) + '\n')
fstr.write('startworkload: \"\"\n')
fstr.write('stopworkload: \"\"\n')
fstr.write('object : \n')
return fstr.getvalue()
def read_line_tuning_object(self, worksheet, line):
"""
Get a line of excel into list.
:param worksheet: excel sheet.
:param line: the number of line to get.
:return: list, the tuning object.
"""
obj_list = []
name_ = worksheet[str('B' + str(line))].value
if name_ is None or name_.strip() == "":
return obj_list
cols = string.ascii_uppercase[1:15]
for col in cols:
val = worksheet[str(col + str(line))].value
if val is None:
val = ''
obj_list.append(str(val))
return obj_list
def translate(self, block_dev, network_dev, test):
"""
Translate excel to yaml.
:param block_dev: the name of block device.
:param network_dev: the name of network device.
:param test: whether test the commands in file or not.
:return: True or False, translation result.
"""
self.out_file.write(self.get_head())
sheetnames = self.workbook.sheetnames
worksheet = self.workbook[sheetnames[0]]
line = 2
obj_list = self.read_line_tuning_object(worksheet, line)
if not obj_list:
print("Empty workbook, translation stops:", self.out_file)
return False
while obj_list:
is_select = obj_list[CsvAttr.select.value].strip()
if is_select == 'yes':
tun_obj = TuningObject(obj_list, block_dev, network_dev)
if test == 'True':
valid = tun_obj.valid_test_good()
if not valid:
return False
if tun_obj.name != '':
self.out_file.write(str(tun_obj))
line = line + 1
obj_list = self.read_line_tuning_object(worksheet, line)
return True
def main(in_dir, out_dir, iterations, project_name, block_dev, network_dev, test):
"""
Translate .xlsx files to .yaml files.
:param in_dir: the folder of input excel files.
:param out_dir: the folder of output yaml files.
:param iterations: iterations of the project (> 10).
:param project_name: the name of the configuration project.
:param block_dev: the name of block device.
:param network_dev: the name of network device.
:param test: whether test the commands in file or not.
:return: None
"""
if iterations <= 10:
print('-t iterations must be > 10, the input is ', iterations)
return False
if not os.path.exists(in_dir):
print("Failed: The input directory is not existed:", in_dir)
return False
if not os.path.exists(out_dir):
print("Warning: The output directory is not existed:", out_dir)
return False
in_file_list = glob.glob((str(in_dir) + "*.xlsx"))
if not in_file_list:
print("No .xlsx files exist in the directory")
return False
for file in in_file_list:
in_file_name = file
out_file_name = file.replace(".xlsx", ".yaml")
if os.path.exists(str(out_dir) + out_file_name):
print("Warning: The output yaml file is already exist, overwrite it!--", out_file_name)
xlsx2yaml = XLSX2YAML((in_dir + in_file_name), (out_dir + out_file_name), project_name, iterations)
result = xlsx2yaml.translate(block_dev, network_dev, test)
if result:
print('Translation of ' + str(file) + ' SUCCEEDED!\n')
else:
print('Translation of' + str(file) + ' FAILED!\n')
return result
if __name__ == '__main__':
ARG_PARSER = argparse.ArgumentParser(description="translate excel files to yaml files")
ARG_PARSER.add_argument('-i', '--in_dir', metavar='INPUT DIRECTORY',
default="./", help='The folder of input excel files')
ARG_PARSER.add_argument('-o', '--out_dir', metavar='OUTPUT DIRECTORY',
default="./", help='The folder of output yaml files')
ARG_PARSER.add_argument('-t', '--iteration', metavar='ITERATIONS', type=int,
default="100", help='Iterations of the project (> 10)')
ARG_PARSER.add_argument('-p', '--prj_name', metavar='NAME',
default="example", help='The name of the project')
ARG_PARSER.add_argument('-bd', '--block_device', metavar='BLOCK DEVICE',
default="sda", help='The name of block device')
ARG_PARSER.add_argument('-nd', '--network_device', metavar='NETWORK DEVICE',
default="enp189s0f0", help='The name of network device')
ARG_PARSER.add_argument('-f', '--test', metavar='TEST COMMAND',
default="True", help='Whether test the command or not')
ARGS = ARG_PARSER.parse_args()
main(ARGS.in_dir, ARGS.out_dir, ARGS.iteration, ARGS.prj_name, ARGS.block_device, ARGS.network_device, ARGS.test)
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
# A-Tune is licensed under the Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a copy of Mulan PSL v2 at:
# http://license.coscl.org.cn/MulanPSL2
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
# PURPOSE.
# See the Mulan PSL v2 for more details.
# Create: 2020-08-14
......@@ -9,31 +9,26 @@
# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
# PURPOSE.
# See the Mulan PSL v2 for more details.
# Create: 2020-07-30
# Create: 2020-08-14
"""
The tool to translate .csv file to .yaml files
Usage: python3 translate_csv2yaml.py [-h] [-i] [-o] [-t] [-p]
Configure attribute in yaml file
"""
import csv
import argparse
import os
import subprocess
from enum import Enum
from io import StringIO
import glob
import shlex
class CsvAttr(Enum):
"""Enumerate the headers"""
class ConfigAttrName(Enum):
"""Enumerate config attribute"""
name = 0
desc = 1
geti = 2
seti = 3
needrestart = 4
typei = 5
get = 2
set = 3
need_restart = 4
type = 5
options = 6
dtype = 7
scope_min = 8
......@@ -43,40 +38,34 @@ class CsvAttr(Enum):
select = 12
class TuningObject:
"""Tuning Object"""
class ConfigAttribute:
"""config attribute in yaml"""
def __init__(self, obj_list, block_dev, network_dev):
self.name = obj_list[CsvAttr.name.value].strip()
self.desc = obj_list[CsvAttr.desc.value].strip()
self.get = obj_list[CsvAttr.geti.value].strip()
self.set = obj_list[CsvAttr.seti.value].strip()
self.needrestart = obj_list[CsvAttr.needrestart.value].strip()
self.type = obj_list[CsvAttr.typei.value].strip()
self.options = obj_list[CsvAttr.options.value].strip()
self.dtype = obj_list[CsvAttr.dtype.value].strip()
self.scope_min = obj_list[CsvAttr.scope_min.value].strip()
self.scope_max = obj_list[CsvAttr.scope_max.value].strip()
self.step = obj_list[CsvAttr.step.value].strip()
self.items = obj_list[CsvAttr.items.value].strip()
self.name = obj_list[ConfigAttrName.name.value].strip()
self.desc = obj_list[ConfigAttrName.desc.value].strip()
self.get = obj_list[ConfigAttrName.get.value].strip()
self.set = obj_list[ConfigAttrName.set.value].strip()
self.need_restart = obj_list[ConfigAttrName.need_restart.value].strip()
self.type = obj_list[ConfigAttrName.type.value].strip()
self.options = obj_list[ConfigAttrName.options.value].strip()
self.dtype = obj_list[ConfigAttrName.dtype.value].strip()
self.scope_min = obj_list[ConfigAttrName.scope_min.value].strip()
self.scope_max = obj_list[ConfigAttrName.scope_max.value].strip()
self.step = obj_list[ConfigAttrName.step.value].strip()
self.items = obj_list[ConfigAttrName.items.value].strip()
self.block_device = block_dev
self.network_device = network_dev
if '@name' in self.get:
self.get = self.get.replace('@name', self.name)
if '@name' in self.set:
self.set = self.set.replace('@name', self.name)
if '@block' in self.get:
self.get = self.get.replace('@block', self.block_device)
if '@block' in self.set:
self.set = self.set.replace('@block', self.block_device)
if '@netdev' in self.get:
self.get = self.get.replace('@netdev', self.network_device)
if '@netdev' in self.set:
self.set = self.set.replace('@netdev', self.network_device)
replace_map = {'@name': self.name, '@block': self.block_device,
'@netdev': self.network_device}
for key, value in replace_map.items():
if key in self.get:
self.get = self.get.replace(key, value)
if key in self.set:
self.set = self.set.replace(key, value)
self.needrestart = self.needrestart.lower()
self.need_restart = self.need_restart.lower()
def exec_cmd(self, cmd, value):
"""
......@@ -85,22 +74,19 @@ class TuningObject:
:param value: the value used in the command
:return: True or False, the results of the execution
"""
if 'echo' in self.set:
if 'echo ' in self.set and '>' in self.set:
cmd1, cmd2 = cmd.split('>')
try:
file = open(cmd2.strip(), "w")
except PermissionError:
return False
process = subprocess.Popen(shlex.split(cmd1), stdout=file, shell=False)
process.wait()
result = str(process.returncode)
elif 'ifconfig' in self.set:
with open(cmd2.strip(), 'w') as file:
process = subprocess.Popen(shlex.split(cmd1), stdout=file, shell=False)
process.wait()
result = str(process.returncode)
elif 'ifconfig ' in self.set:
process = subprocess.Popen(shlex.split(cmd), shell=False)
process.wait()
result = str(process.returncode)
elif 'sysctl' in self.set:
result = subprocess.check_output(shlex.split(cmd), stderr=subprocess.STDOUT, shell=False).decode().strip()
elif 'sysctl ' in self.set:
result = subprocess.check_output(shlex.split(cmd), stderr=subprocess.STDOUT,
shell=False).decode().strip()
else:
process = subprocess.Popen(shlex.split(cmd), shell=False)
process.wait()
......@@ -110,38 +96,19 @@ class TuningObject:
if 'sysctl' in self.set:
if 'Invalid argument' in result:
cmd_fail = True
elif 'ethtool' in self.set:
if result != '0' and result != '80':
cmd_fail = True
else:
if result != '0':
cmd_fail = True
if cmd_fail:
print('Invalid Value for ', self.name, ' :', value, '. Make sure the value is in valid range!(', cmd, ')')
print('Warning: %s invalid Value %s, make sure the value is in valid range.'
% (self.name, value))
return False
return True
def valid_test_command(self, value, orig_value):
def valid_test_attr(self):
"""
Test the set command in csv
:param value: the value used in the set command
:param orig_value: the result of get command
:return: True or False, the result of execution set command
"""
if value == orig_value:
return True
cmd = self.set.replace('$value', value)
result = self.exec_cmd(cmd, value)
return result
def valid_test_good(self):
"""
Main check, check the command and given values.
check the command and given attr.
:return: True or False, check result
"""
if self.type == 'continuous':
......@@ -149,42 +116,48 @@ class TuningObject:
get_cmd = self.get
count = get_cmd.count('|')
process = None
if count > 0:
get_cmds = get_cmd.split('|')
i = 0
for cmds in get_cmds:
if i == 0:
child = subprocess.Popen(shlex.split(cmds), shell=False, stdout=subprocess.PIPE)
elif i == count:
process = subprocess.Popen(shlex.split(cmds), stdin=child.stdout, stdout=subprocess.PIPE, shell=False)
result = process.communicate()
else:
child = subprocess.Popen(shlex.split(cmds), shell=False, stdin=child.stdout, stdout=subprocess.PIPE)
i += 1
for cmds in get_cmd.split('|'):
process = subprocess.Popen(shlex.split(cmds), shell=False, stdout=subprocess.PIPE,
stdin=None if process is None else process.stdout)
else:
process = subprocess.Popen(shlex.split(get_cmd), shell=False, stdout=subprocess.PIPE)
result = process.communicate()
orig_value = str(result)
result = process.communicate()
orig_value = bytes.decode(result[0]).replace('\n', ' ').strip()
if self.dtype == 'int':
result_min = self.valid_test_command(self.scope_min, orig_value)
result_max = self.valid_test_command(self.scope_max, orig_value)
if not result_min or not result_max:
return False
for value in [self.scope_min, self.scope_max]:
result = self.valid_test_command(value, orig_value)
if not result:
return False
elif self.dtype == 'string':
dis_options = self.options.split(';')
for option in dis_options:
option = '\"' + option.strip() + '\"'
result = self.valid_test_command(option, orig_value)
result = self.valid_test_command(option, '\"' + orig_value + '\"')
if not result:
return False
else:
print("Invalid dtype of ", self.name, ":", self.dtype, ". Only support int and string")
print("Warning: %s invalid dtype %s, only support int and string"
% (self.name, self.dtype))
return False
return True
def valid_test_command(self, value, orig_value):
"""
Test the set command
:param value: the value used in the set command
:param orig_value: the result of get command
:return: True or False, the result of execution set command
"""
if value == orig_value:
return True
cmd = self.set.replace('$value', value)
result = self.exec_cmd(cmd, value)
return result
def __repr__(self):
fstr = StringIO()
fstr.write(' -\n')
......@@ -193,7 +166,7 @@ class TuningObject:
fstr.write(' desc : \"' + self.desc + '\"\n')
fstr.write(' get : \"' + self.get + '\"\n')
fstr.write(' set : \"' + self.set + '\"\n')
fstr.write(' needrestart : \"' + self.needrestart + '\"\n')
fstr.write(' needrestart : \"' + self.need_restart + '\"\n')
fstr.write(' type : \"' + self.type + '\"\n')
if self.type == 'continuous':
......@@ -219,160 +192,14 @@ class TuningObject:
fstr.write(' items : \n')
if self.items != '':
dis_items = self.items.split(';')
for dit in dis_items:
fstr.write(' - ' + dit + '\n')
for item in dis_items:
fstr.write(' - ' + item + '\n')
fstr.write(' dtype : \"int\"\n')
else:
pass
print("Warning: %s invalid dtype %s, only support int and string"
% (self.name, self.dtype))
else:
pass
return fstr.getvalue()
print("Warning: %s invalid type %s, only support continuous and discrete"
% (self.name, self.type))
class XLSX2YAML:
"""
Get objects from excel files
"""
def __init__(self, in_file_name, out_file_name, project_name, iterations):
with open(in_file_name) as file:
reader = csv.reader(file)
self.rows = [row for row in reader]
self.out_file = open(out_file_name, 'w')
self.project_name = project_name
self.iterations = iterations
def __del__(self):
self.out_file.close()
def get_head(self):
"""
Generate the header of yaml file.
:return: string, the header of yaml file.
"""
fstr = StringIO()
fstr.write('project:' + ' \"' + self.project_name + '\"' + '\n')
fstr.write('maxiterations: ' + str(self.iterations) + '\n')
fstr.write('startworkload: \"\"\n')
fstr.write('stopworkload: \"\"\n')
fstr.write('object : \n')
return fstr.getvalue()
def read_line_tuning_object(self, line):
"""
Get a line of csv into list.
:param line: the number of line to get.
:return: list, the tuning object.
"""
obj_list = []
if line >= len(self.rows):
return obj_list
name_ = self.rows[line][1]
if name_ is None or name_.strip() == "":
return obj_list
for col in range(1, 14):
val = self.rows[line][col]
if val is None:
val = ''
obj_list.append(str(val))
return obj_list
def translate(self, block_dev, network_dev, test):
"""
Translate csv to yaml.
:param block_dev: block device name
:param network_dev: network device name
:param test: Whether test the commands or not
:return: True or False, the result of translation
"""
self.out_file.write(self.get_head())
line = 1
obj_list = self.read_line_tuning_object(line)
if not obj_list:
print("Empty workbook, translation stops:", self.out_file)
return False
while obj_list:
is_select = obj_list[CsvAttr.select.value].strip()
if is_select == 'yes':
tun_obj = TuningObject(obj_list, block_dev, network_dev)
if test == 'True':
valid = tun_obj.valid_test_good()
if not valid:
return False
if tun_obj.name != '':
self.out_file.write(str(tun_obj))
line = line + 1
obj_list = self.read_line_tuning_object(line)
return True
def main(in_dir, out_dir, iterations, project_name, block_dev, network_dev, test):
"""
Translate .csv files to .yaml files.
:param in_dir: the folder of input csv files.
:param out_dir: the folder of output yaml files.
:param iterations: iterations of the project (> 10).
:param project_name: the name of the configuration project.
:param block_dev: the name of block device.
:param network_dev: the name of network device.
:param test: Whether test the commands or not
:return: None
"""
if iterations <= 10:
print('-t iterations must be > 10, the input is ', iterations)
return False
if not os.path.exists(in_dir):
print("Failed: The input directory is not existed:", in_dir)
return False
if not os.path.exists(out_dir):
print("Warning: The output directory is not existed:", out_dir)
return False
in_file_list = glob.glob((str(in_dir) + "*.csv"))
if not in_file_list:
print("No .csv files exist in the directory")
return False
for file in in_file_list:
in_file_name = file
out_file_name = file.replace(".csv", ".yaml")
if os.path.exists(str(out_dir) + out_file_name):
print("Warning: The output yaml file is already exist, overwrite it!--", out_file_name)
xlsx2yaml = XLSX2YAML((in_dir + in_file_name), (out_dir + out_file_name),
project_name, iterations)
result = xlsx2yaml.translate(block_dev, network_dev, test)
if result:
print('Translation of ' + str(file) + ' SUCCEEDED!\n')
else:
print('Translation of' + str(file) + ' FAILED!\n')
return result
if __name__ == '__main__':
ARG_PARSER = argparse.ArgumentParser(description="translate excel files to yaml files")
ARG_PARSER.add_argument('-i', '--in_dir', metavar='INPUT DIRECTORY',
default="./", help='The folder of input excel files')
ARG_PARSER.add_argument('-o', '--out_dir', metavar='OUTPUT DIRECTORY',
default="./", help='The folder of output yaml files')
ARG_PARSER.add_argument('-t', '--iteration', metavar='ITERATIONS', type=int,
default="100", help='Iterations of the project (> 10)')
ARG_PARSER.add_argument('-p', '--prj_name', metavar='NAME',
default="example", help='The name of the project')
ARG_PARSER.add_argument('-bd', '--block_device', metavar='BLOCK DEVICE',
default="sda", help='The name of block device')
ARG_PARSER.add_argument('-nd', '--network_device', metavar='NETWORK DEVICE',
default="enp189s0f0", help='The name of network device')
ARG_PARSER.add_argument('-f', '--test', metavar='TEST COMMAND',
default="True", help='Whether test the command or not')
ARGS = ARG_PARSER.parse_args()
main(ARGS.in_dir, ARGS.out_dir, ARGS.iteration, ARGS.prj_name, ARGS.block_device, ARGS.network_device, ARGS.test)
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
# A-Tune is licensed under the Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a copy of Mulan PSL v2 at:
# http://license.coscl.org.cn/MulanPSL2
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
# PURPOSE.
# See the Mulan PSL v2 for more details.
# Create: 2020-08-14
"""
The tool to translate file to .yaml files
Usage: python3 translate.py [-h] [-i] [-o] [-t] [-p] [-b] [-n] [-s] [-f]
"""
import argparse
import ast
import os
import glob
from translate_csv2yaml import TranslateCsv2Yaml
from translate_xlsx2yaml import TranslateXlsx2Yaml
def main(in_dir, out_dir, iterations, project_name, block_dev, network_dev, test, file_extension):
"""
Translate .xlsx or .csv files to .yaml files.
:param in_dir: the folder of input files.
:param out_dir: the folder of output yaml files.
:param iterations: iterations of the project (> 10).
:param project_name: the name of the configuration project.
:param block_dev: the name of block device.
:param network_dev: the name of network device.
:param test: whether test the commands in file or not.
:param file_extension: The file extension converted to yaml files.
:return: None
"""
if iterations <= 10:
print('Failed: Iterations must be > 10, the input is %s' % iterations)
return
if not os.path.exists(in_dir):
print("Failed: The input directory (%s) is not existed" % in_dir)
return
if not os.path.exists(out_dir):
print("Failed: The output directory (%s) is not existed" % out_dir)
return
if not file_extension in ("xlsx", "csv"):
print("Failed: The file extension must be be xlsx or csv")
return
in_file_list = glob.glob((str(in_dir) + "*." + file_extension))
if not in_file_list:
print("Warning: No %s files exist in the directory" % file_extension)
return
for file in in_file_list:
in_file_name = file
in_file_basename = os.path.basename(file)
out_file_name = in_file_basename.replace("." + file_extension, ".yaml")
if os.path.exists(str(out_dir) + out_file_name):
print("Warning: The output yaml file (%s) is already exist,"
" overwrite it!--" % out_file_name)
if file_extension == "xlsx":
translate_yaml = TranslateXlsx2Yaml(os.path.join(in_dir, in_file_name),
os.path.join(out_dir, out_file_name),
project_name, iterations,
block_dev, network_dev, test)
else:
translate_yaml = TranslateCsv2Yaml(os.path.join(in_dir, in_file_name),
os.path.join(out_dir, out_file_name),
project_name, iterations,
block_dev, network_dev, test)
if translate_yaml.translate():
print('Translating %s SUCCEEDED!' % str(file))
else:
print('Translating %s FAILED!' % str(file))
if __name__ == '__main__':
ARG_PARSER = argparse.ArgumentParser(description="translate excel or csv files to yaml files")
ARG_PARSER.add_argument('-i', '--in_dir', metavar='INPUT DIRECTORY',
default="./", help='The folder of input excel or csv files')
ARG_PARSER.add_argument('-o', '--out_dir', metavar='OUTPUT DIRECTORY',
default="./", help='The folder of output yaml files')
ARG_PARSER.add_argument('-t', '--iteration', metavar='ITERATIONS', type=int,
default="100", help='Iterations of the project (> 10)')
ARG_PARSER.add_argument('-p', '--prj_name', metavar='NAME',
default="example", help='The name of the project')
ARG_PARSER.add_argument('-b', '--block_device', metavar='BLOCK DEVICE',
default="sda", help='The name of block device')
ARG_PARSER.add_argument('-n', '--network_device', metavar='NETWORK DEVICE',
default="enp189s0f0", help='The name of network device')
ARG_PARSER.add_argument('-s', '--test', metavar='TEST COMMAND',
type=ast.literal_eval, default=False,
help='Whether test the command or not, True or False')
ARG_PARSER.add_argument('-f', '--file_extension', metavar='FILE EXTENSION',
default="csv", help='The file extension converted to yaml files '
'can be xlsx or csv')
ARGS = ARG_PARSER.parse_args()
main(ARGS.in_dir, ARGS.out_dir, ARGS.iteration, ARGS.prj_name,
ARGS.block_device, ARGS.network_device, ARGS.test, ARGS.file_extension)
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
# A-Tune is licensed under the Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a copy of Mulan PSL v2 at:
# http://license.coscl.org.cn/MulanPSL2
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
# PURPOSE.
# See the Mulan PSL v2 for more details.
# Create: 2020-07-30
"""
translate .csv file to .yaml files
"""
import csv
from translate_yaml import TranslateYaml
class TranslateCsv2Yaml(TranslateYaml):
"""
The subclass for translating csv to .yaml files
"""
def __init__(self, in_file_name, out_file_name, project_name,
iterations, block_dev, network_dev, test):
super(TranslateCsv2Yaml, self).__init__(out_file_name, project_name,
iterations, block_dev, network_dev, test)
with open(in_file_name) as file:
reader = csv.reader(file)
self.rows = list(reader)
@staticmethod
def read_line(reader, line):
"""
Get a line from csv into list.
:param reader: the content of the csv to be read.
:param line: the number of line to get.
:return: list, the yaml object.
"""
obj_list = []
if line >= len(reader):
return obj_list
name_ = reader[line][1]
if name_ is None or name_.strip() == "":
return obj_list
for col in range(1, 14):
val = reader[line][col]
if val is None:
val = ''
obj_list.append(str(val))
return obj_list
def translate(self):
"""
Translate csv to yaml.
:return: True or False, translation result.
"""
line = 1
return self.write_yaml(self.rows, line)
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
# A-Tune is licensed under the Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a copy of Mulan PSL v2 at:
# http://license.coscl.org.cn/MulanPSL2
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
# PURPOSE.
# See the Mulan PSL v2 for more details.
# Create: 2020-07-30
"""
translate .xlsx file to .yaml files
"""
import string
import io
import openpyxl
from translate_yaml import TranslateYaml
class TranslateXlsx2Yaml(TranslateYaml):
"""
The subclass for translating xlsx to .yaml files
"""
def __init__(self, in_file_name, out_file_name, project_name,
iterations, block_dev, network_dev, test):
super(TranslateXlsx2Yaml, self).__init__(out_file_name, project_name,
iterations, block_dev, network_dev, test)
with open(in_file_name, 'rb') as file:
in_mem_file = io.BytesIO(file.read())
self.workbook = openpyxl.load_workbook(in_mem_file, read_only=True)
@staticmethod
def read_line(reader, line):
"""
Get a line from xlsx into list.
:param reader: the content of the xlsx to be read.
:param line: the number of line to get.
:return: list, the yaml object.
"""
obj_list = []
name_ = reader[str('B' + str(line))].value
if name_ is None or name_.strip() == "":
return obj_list
cols = string.ascii_uppercase[1:15]
for col in cols:
val = reader[str(col + str(line))].value
if val is None:
val = ''
obj_list.append(str(val))
return obj_list
def translate(self):
"""
Translate xlsx to yaml.
:return: True or False, translation result.
"""
sheetnames = self.workbook.sheetnames
worksheet = self.workbook[sheetnames[0]]
line = 2
return self.write_yaml(worksheet, line)
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
# A-Tune is licensed under the Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a copy of Mulan PSL v2 at:
# http://license.coscl.org.cn/MulanPSL2
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
# PURPOSE.
# See the Mulan PSL v2 for more details.
# Create: 2020-08-14
"""
translating file to .yaml files
"""
from io import StringIO
from config_attribute import ConfigAttrName, ConfigAttribute
class TranslateYaml:
"""The base class for translating file to .yaml files"""
def __init__(self, out_file_name, project_name, iterations, block_dev, network_dev, test):
"""
init TranslateYaml
:param out_file_name: the folder of output yaml files.
:param project_name: the name of the configuration project.
:param iterations: iterations of the project (> 10).
:param block_dev: the name of block device.
:param network_dev: the name of network device.
:param test: whether test the commands in file or not.
"""
self.out_file = open(out_file_name, 'w')
self.project_name = project_name
self.iterations = iterations
self.block_dev = block_dev
self.network_dev = network_dev
self.test = test
def __del__(self):
self.out_file.close()
def get_head(self):
"""
Generate the header of yaml file.
:return: string, the header of yaml file.
"""
fstr = StringIO()
fstr.write('project:' + ' \"' + self.project_name + '\"' + '\n')
fstr.write('maxiterations: ' + str(self.iterations) + '\n')
fstr.write('startworkload: \"\"\n')
fstr.write('stopworkload: \"\"\n')
fstr.write('object : \n')
return fstr.getvalue()
@staticmethod
def read_line(reader, line):
"""
Get a line into list.
:param reader: the content of the file to be read.
:param line: the number of line to get.
:return: list, the yaml object.
"""
print(reader, line)
return []
def translate(self):
"""
Translate file to yaml.
:return: True or False, translation result.
"""
print(self.project_name)
def write_yaml(self, content, line):
"""
write content to yaml.
:param content: the content written to yaml.
:param line: the line of content.
:return: True or False, translation result.
"""
self.out_file.write(self.get_head())
obj_list = self.read_line(content, line)
if not obj_list:
print("Empty workbook, stop translating %s" % self.out_file)
return False
while obj_list:
self.write_config_attr(obj_list)
line = line + 1
obj_list = self.read_line(content, line)
return True
def write_config_attr(self, obj_list):
"""
Write config attribute to yaml
:param obj_list: config attribute
:return: None
"""
is_select = obj_list[ConfigAttrName.select.value].strip()
if is_select == 'yes':
config_attr = ConfigAttribute(obj_list, self.block_dev, self.network_dev)
if self.test:
valid = config_attr.valid_test_attr()
if not valid:
return
if config_attr.name != '':
self.out_file.write(str(config_attr))
......@@ -9,17 +9,17 @@ Category,"name
(Maximum Value of the parameter)","step
(Step of the parameter value)","items
(Enumerated values out of parameter values. Use "";"" to split different values)",select (whether to select the parameter),
Kernel scheduling parameters,kernel.sched_migration_cost_ns,"This variable is used to determine whether a process is still hot. If the running time of a process is shorter than the value of this variable, the kernel considers that the code of the process is still in the cache. Therefore, the process is still hot and is not considered during migration.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,100000,5000000,100000,,yes,
,kernel.sched_cfs_bandwidth_slice_us,Fixed size of the time slice applied for from the global time pool,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1000,50000,1000,,yes,
,kernel.sched_wakeup_granularity_ns,"This variable indicates the base of the minimum time that a process should run after it is woken up. The smaller the base, the higher the probability of preemption.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1000000,100000000,1000000,,yes,
,kernel.sched_latency_ns,Maximum running time of a running process.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1000000,100000000,1000000,,yes,
,kernel.sched_nr_migrate,How Many Processes Can Be Moved to Another CPU at a Time When Load Balancing Is Performed in the Case of Multiple CPUs?,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1,128,1,,yes,
,kernel.sched_min_granularity_ns,"Minimum running time of a process on the CPU. During this time, the kernel does not proactively select other processes for scheduling (in nanoseconds).",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1000000,100000000,1000000,,yes,
,kernel.sched_tunable_scaling,"Update method used when the kernel attempts to adjust the values of sched_min_granularity, sched_latency, and sched_wakeup_granularity. The value 0 indicates that the value is not adjusted, and the value 1 indicates that the value is adjusted based on the number of CPUs, 2: The linear proportion is adjusted based on the number of CPUs.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1; 2,string,,,,,yes,
Kernel scheduling parameters,kernel.sched_migration_cost_ns,"This variable is used to determine whether a process is still hot. If the running time of a process is shorter than the value of this variable, the kernel considers that the code of the process is still in the cache. Therefore, the process is still hot and is not considered during migration.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,100000,5000000,100000,,yes,
,kernel.sched_cfs_bandwidth_slice_us,Fixed size of the time slice applied for from the global time pool,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1000,50000,1000,,yes,
,kernel.sched_wakeup_granularity_ns,"This variable indicates the base of the minimum time that a process should run after it is woken up. The smaller the base, the higher the probability of preemption.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1000000,100000000,1000000,,yes,
,kernel.sched_latency_ns,Maximum running time of a running process.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1000000,100000000,1000000,,yes,
,kernel.sched_nr_migrate,How Many Processes Can Be Moved to Another CPU at a Time When Load Balancing Is Performed in the Case of Multiple CPUs?,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1,128,1,,yes,
,kernel.sched_min_granularity_ns,"Minimum running time of a process on the CPU. During this time, the kernel does not proactively select other processes for scheduling (in nanoseconds).",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1000000,100000000,1000000,,yes,
,kernel.sched_tunable_scaling,"Update method used when the kernel attempts to adjust the values of sched_min_granularity, sched_latency, and sched_wakeup_granularity. The value 0 indicates that the value is not adjusted, and the value 1 indicates that the value is adjusted based on the number of CPUs, 2: The linear proportion is adjusted based on the number of CPUs.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1; 2,string,,,,,yes,
Network adapter parameters,transparent_hugepage.defrag,Enabling or Disabling Transparent Hugepages,cat /sys/kernel/mm/transparent_hugepage/defrag | sed -n 's/.*\[\(.*\)\].*/\1/p',echo $value > /sys/kernel/mm/transparent_hugepage/defrag,FALSE,discrete,always;defer;defer+madvise;madvise;never,string,,,,,yes,
,transparent_hugepage.enabled,Enabling or Disabling Transparent Hugepages,cat /sys/kernel/mm/transparent_hugepage/enabled | sed -n 's/.*\[\(.*\)\].*/\1/p',echo $value > /sys/kernel/mm/transparent_hugepage/enabled,FALSE,discrete,always; madvise; never,string,,,,,yes,
,net.netfilter.nf_conntrack_max,"Maximum number of tracing connections
When a container is used, the nf_conntrack module cannot be disabled. Therefore, kernel parameters related to nf_conntrack need to be added to the /etc/sysctl.conf file to prevent packet loss caused by full table records.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,67108864,1,,yes,
When a container is used, the nf_conntrack module cannot be disabled. Therefore, kernel parameters related to nf_conntrack need to be added to the /etc/sysctl.conf file to prevent packet loss caused by full table records.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,67108864,1,,yes,
,net.mtu,"Indicates the maximum transmission unit of the network,",ifconfig @netdev | grep mtu | awk '{print $4}',ifconfig @netdev mtu $value,FALSE,discrete,,int,500,9000,500,,yes,
,net.tx-frames,Configuring NIC Interrupt Combination,ethtool -c @netdev | grep tx-frames: | awk '{print $2}',ethtool -C @netdev tx-frames $value,FALSE,discrete,,int,0,64,2,,yes,
,net.rx-frames,Configuring NIC Interrupt Combination,ethtool -c @netdev | grep rx-frames: | awk '{print $2}',ethtool -C @netdev rx-frames $value,FALSE,discrete,,int,0,64,2,,yes,
......@@ -33,65 +33,65 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
,net.generic-receive-offload,Whether reassembling small packets into larger ones,"ethtool -k @netdev | grep ""generic-receive-offload"" | awk '{print $2}'",ethtool -K @netdev gro $value,FALSE,discrete,on;off,string,,,,,yes,
,net.generic-segmentation-offload,Whether reassembling small packets into larger ones,"ethtool -k @netdev | grep ""generic-segmentation-offload"" | awk '{print $2}'",ethtool -K @netdev gso $value,FALSE,discrete,on;off,string,,,,,yes,
,net.tcp-segmentation-offload,Wheth allow a device to segment a single frame into multiple frames with a data payload size specified in skb_shinfo()->gso_size.,"ethtool -k @netdev | grep ""tcp-segmentation-offload"" | awk '{print $2}'",ethtool -K @netdev tso $value,FALSE,discrete,on;off,string,,,,,yes,
,sunrpc.tcp_slot_table_entries,"The Linux NFS client controls the number of concurrent NFS requests. If this parameter is set to a small value, the I/O performance is poor. By default, the maximum value of this parameter for the compiled kernel is 256. You can increase the value of this parameter to achieve better performance.",sysctl @name,sysctl -w @name=$value,FALSE,discrete,,int,4,256,4,,no,
,sunrpc.udp_slot_table_entries,"The Linux NFS client controls the number of concurrent NFS requests. If this parameter is set to a small value, the I/O performance is poor. By default, the maximum value of this parameter for the compiled kernel is 256. You can increase the value of this parameter to achieve better performance.",sysctl @name,sysctl -w @name=$value,FALSE,discrete,,int,4,256,4,,no,
Kernel resource parameters,kernel.pid_max,Maximum process ID.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1048576,4194304,1048576,,yes,
,kernel.shmmni,Maximum number of shared memory segments in the system.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1024,16384,1024,,yes,
,kernel.shmmax,"The maximum size, in bytes, of the shared memory segment allowed by the system.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,17179869184,68719476736,17179869184,,yes,
,kernel.shmall,The total amount of shared memory available on the system in bytes,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1073741824,8589934592,1073741824,,yes,
,sunrpc.tcp_slot_table_entries,"The Linux NFS client controls the number of concurrent NFS requests. If this parameter is set to a small value, the I/O performance is poor. By default, the maximum value of this parameter for the compiled kernel is 256. You can increase the value of this parameter to achieve better performance.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,4,256,4,,no,
,sunrpc.udp_slot_table_entries,"The Linux NFS client controls the number of concurrent NFS requests. If this parameter is set to a small value, the I/O performance is poor. By default, the maximum value of this parameter for the compiled kernel is 256. You can increase the value of this parameter to achieve better performance.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,4,256,4,,no,
Kernel resource parameters,kernel.pid_max,Maximum process ID.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1048576,4194304,1048576,,yes,
,kernel.shmmni,Maximum number of shared memory segments in the system.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1024,16384,1024,,yes,
,kernel.shmmax,"The maximum size, in bytes, of the shared memory segment allowed by the system.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,17179869184,68719476736,17179869184,,yes,
,kernel.shmall,The total amount of shared memory available on the system in bytes,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1073741824,8589934592,1073741824,,yes,
,kernel.core_uses_pid,"Whether to add the application pid to the core file name as an extension.
0: no
1: add",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,kernel.msgmni,System Message Queue Length,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,8000,128000,8000,,yes,
,kernel.msgmax,Maximum number of bytes of a single message in a message queue.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,4096,1048576,4096,,yes,
,kernel.msgmnb,Maximum length of bytes in a single message queue,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,4096,1048576,4096,,yes,
1: add",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,kernel.msgmni,System Message Queue Length,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,8000,128000,8000,,yes,
,kernel.msgmax,Maximum number of bytes of a single message in a message queue.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,4096,1048576,4096,,yes,
,kernel.msgmnb,Maximum length of bytes in a single message queue,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,4096,1048576,4096,,yes,
,kernel.sem,"The file contains four values:
1. Maximum number of signals of the same type (semmsl)
2. Maximum number of signals in the system, =semmni*semmsl (semmns)
3. Maximum number of operations (maximum number of semaphores that can be invoked) contained in each system invoking (semopm)
4. Maximum number of signal types in the system. A signal identifier represents a type (semmni).",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,16000 512000000 256 16000;32000 1024000000 500 32000;64000 2048000000 1000 64000,string,,,,,yes,
,kernel.hung_task_timeout_secs,"Timeout interval of a hung_task (in seconds). When a process is in the TASK_UNINTERRUPTIBLE state for a period longer than the timeout interval, a hung_task occurs.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,30,1200,30,,yes,
4. Maximum number of signal types in the system. A signal identifier represents a type (semmni).",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,16000 512000000 256 16000;32000 1024000000 500 32000;64000 2048000000 1000 64000,string,,,,,yes,
,kernel.hung_task_timeout_secs,"Timeout interval of a hung_task (in seconds). When a process is in the TASK_UNINTERRUPTIBLE state for a period longer than the timeout interval, a hung_task occurs.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,30,1200,30,,yes,
,kernel.nmi_watchdog,"Enabling nmi_watchdog
0: disabled
1: enabled",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,kernel.sched_rt_runtime_us,"This parameter, together with sched_rt_period, determines the period of the real-time process.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,950000,1000000,10000,,yes,
,kernel.timer_migration,Disable Clock Migration,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,kernel.threads-max,Maximum number of processes (including threads) in the system,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,655360,65536000,655360,,yes,
,kernel.sysrq,"The file specifies a non-zero value, which activates the sysrq key on the keyboard.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
1: enabled",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,kernel.sched_rt_runtime_us,"This parameter, together with sched_rt_period, determines the period of the real-time process.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,950000,1000000,10000,,yes,
,kernel.timer_migration,Disable Clock Migration,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,kernel.threads-max,Maximum number of processes (including threads) in the system,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,655360,65536000,655360,,yes,
,kernel.sysrq,"The file specifies a non-zero value, which activates the sysrq key on the keyboard.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,kernel.sched_autogroup_enabled,"When enabled, the kernel creates task groups to optimize desktop program scheduling.
0: disabled
1: enabled",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,kernel.numa_balancing,Specifies whether to enable NUMA automatic balancing.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,kernel.randomize_va_space,Setting Memory Address Randomization,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,2,1,,yes,
1: enabled",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,kernel.numa_balancing,Specifies whether to enable NUMA automatic balancing.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,kernel.randomize_va_space,Setting Memory Address Randomization,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,2,1,,yes,
,kernel.dmesg_restrict,"Which users are restricted from viewing syslogs?
0: no restriction
1: Only privileged users can view the information.",sysctl @name | awk '{print $4}',sysctl -w @name=$value,FALSE,discrete,0;1,string,,,,,yes,
Virtual memory and buffer/cache parameters,vm.swappiness,A larger value indicates that the swap partition is used more actively. A smaller value indicates that the memory is used more actively.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,100,1,,yes,
,vm.vfs_cache_pressure,Indicates the tendency of the kernel to reclaim the memory used for directory and inode cache.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,500,50,,yes,
,vm.dirty_background_ratio,"When the percentage of dirty pages reaches dirty_background_ratio, the write function wakes up the flusher thread of the kernel to write back dirty page data until the percentage is less than the value of dirty_background_ratio.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,100,1,,yes,
,vm.dirty_ratio,The percentage of dirty data in the memory cannot exceed this value.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,100,1,,yes,
,vm.stat_interval,VM information update frequency (in seconds),sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1,100,1,,yes,
,vm.dirty_expire_centisecs,"Expiration time of dirty data. When the flusher thread of the kernel is woken up after the expiration time, dirty data is written back to the disk. The unit is 1% second.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,100,1000,100,,yes,
,vm.dirty_writeback_centisecs,Sets the interval for waking up the flusher kernel thread. This thread is used to write dirty pages back to the disk. The unit is 1% second.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,100,1000,100,,yes,
,vm.overcommit_ratio,"When overcommit_memory is set to 2, the percentage of physical RAM that is considered is set.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,100,10,,yes,
,vm.overcommit_memory,Indicates whether to allow excessive memory allocation. The process can allocate more memory than it actually uses.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,vm.min_free_kbytes,"Size of memory reserved in each memory area, in KB.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,10240,1024000,10240,,yes,
,vm.page-cluster,Number of pages written to the swap partition each time.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,8,1,,yes,
,vm.max_map_count,Defines the maximum memory area that a process can have.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,100000,10000000,100000,,yes,
,vm.zone_reclaim_mode,This parameter is valid only when CONFIG_NUMA is enabled. zone_reclaim_mode is used to control how to reclaim memory when the memory domain OOM is enabled.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1; 2; 4,string,,,,,yes,
,vm.watermark_scale_factor,"Controls the radical degree of the kswapd process, that is, how much memory needs to be released for the system (NUMA node) from wakeup to hibernation.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,10,1000,10,,yes,
,vm.numa_stat,"This command is used to set the data statistics during NUMA running. When the memory is insufficient, this command can be set to 0 to reduce the statistics precision.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,vm.drop_caches,Releases the cache. The cache is released each time the parameter is modified.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,1; 2; 3,string,,,,,yes,
File system parameters,fs.inotify.max_user_watches,Sets the number of processes for each user to run the inotifywait or inotifywatch command.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,4096,819200,4096,,yes,
,fs.nr_open,Maximum number of file handles that can be concurrently opened by a process,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,10240,1024000,10240,,yes,
,fs.file-max,Number of file handles that can be opened by all processes in the system at the same time,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,102400,10240000,102400,,yes,
,fs.aio-max-nr,Maximum number of AIO requests,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,102400,10240000,102400,,yes,
,fs.inotify.max_user_watches,Maximum number of monitoring instances,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,4096,65536,4096,,yes,
,fs.inotify.max_user_instances,Maximum number of inotify instances that can be started by each user,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,64,65535,64,,yes,
1: Only privileged users can view the information.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0;1,string,,,,,yes,
Virtual memory and buffer/cache parameters,vm.swappiness,A larger value indicates that the swap partition is used more actively. A smaller value indicates that the memory is used more actively.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,100,1,,yes,
,vm.vfs_cache_pressure,Indicates the tendency of the kernel to reclaim the memory used for directory and inode cache.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,500,50,,yes,
,vm.dirty_background_ratio,"When the percentage of dirty pages reaches dirty_background_ratio, the write function wakes up the flusher thread of the kernel to write back dirty page data until the percentage is less than the value of dirty_background_ratio.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,100,1,,yes,
,vm.dirty_ratio,The percentage of dirty data in the memory cannot exceed this value.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,100,1,,yes,
,vm.stat_interval,VM information update frequency (in seconds),sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1,100,1,,yes,
,vm.dirty_expire_centisecs,"Expiration time of dirty data. When the flusher thread of the kernel is woken up after the expiration time, dirty data is written back to the disk. The unit is 1% second.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,100,1000,100,,yes,
,vm.dirty_writeback_centisecs,Sets the interval for waking up the flusher kernel thread. This thread is used to write dirty pages back to the disk. The unit is 1% second.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,100,1000,100,,yes,
,vm.overcommit_ratio,"When overcommit_memory is set to 2, the percentage of physical RAM that is considered is set.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,100,10,,yes,
,vm.overcommit_memory,Indicates whether to allow excessive memory allocation. The process can allocate more memory than it actually uses.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,vm.min_free_kbytes,"Size of memory reserved in each memory area, in KB.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,10240,1024000,10240,,yes,
,vm.page-cluster,Number of pages written to the swap partition each time.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,8,1,,yes,
,vm.max_map_count,Defines the maximum memory area that a process can have.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,100000,10000000,100000,,yes,
,vm.zone_reclaim_mode,This parameter is valid only when CONFIG_NUMA is enabled. zone_reclaim_mode is used to control how to reclaim memory when the memory domain OOM is enabled.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1; 2; 4,string,,,,,yes,
,vm.watermark_scale_factor,"Controls the radical degree of the kswapd process, that is, how much memory needs to be released for the system (NUMA node) from wakeup to hibernation.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,10,1000,10,,yes,
,vm.numa_stat,"This command is used to set the data statistics during NUMA running. When the memory is insufficient, this command can be set to 0 to reduce the statistics precision.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,vm.drop_caches,Releases the cache. The cache is released each time the parameter is modified.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,1; 2; 3,string,,,,,yes,
File system parameters,fs.inotify.max_user_watches,Sets the number of processes for each user to run the inotifywait or inotifywatch command.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,4096,819200,4096,,yes,
,fs.nr_open,Maximum number of file handles that can be concurrently opened by a process,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,10240,1024000,10240,,yes,
,fs.file-max,Number of file handles that can be opened by all processes in the system at the same time,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,102400,10240000,102400,,yes,
,fs.aio-max-nr,Maximum number of AIO requests,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,102400,10240000,102400,,yes,
,fs.inotify.max_user_watches,Maximum number of monitoring instances,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,4096,65536,4096,,yes,
,fs.inotify.max_user_instances,Maximum number of inotify instances that can be started by each user,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,64,65535,64,,yes,
,fs.suid_dumpable,"This value can be used to query and set the core dump mode for setuid or otherwise protected/tainted binaries.
0: default
1: debug
2: suidsafe",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,2,1,,yes,
2: suidsafe",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,2,1,,yes,
Block storage device parameters,blockdev,Disk prefetch settings,/sbin/blockdev --getra /dev/@block,/sbin/blockdev --setra $value /dev/@block,FALSE,discrete,,int,0,2147483648,8,,yes,
,block.low_latency,Enables (1) or disables (0) the low latency mode,cat /sys/block/@block/queue/iosched/low_latency,echo $value > /sys/block/@block/queue/iosched/low_latency,FALSE,discrete,0;1,string,,,,,no,
,block.fifo_batch,"This parameter is valid only for the Deadline scheduling policy.
......@@ -137,116 +137,116 @@ If set to 0, the mixed polling mode is used, and the kernel attempts to guess wh
,block.rq_affinity,Whether I/O can be performed on different processors is not limited to the processor that sends the I/O request.,cat /sys/block/@block/queue/rq_affinity,echo $value > /sys/block/@block/queue/rq_affinity,FALSE,discrete,0; 1; 2,string,,,,,yes,
,block.add_random,Some I/O events affect the entropy pool of /dev/random.,cat /sys/block/@block/queue/add_random,echo $value > /sys/block/@block/queue/add_random,FALSE,discrete,0; 1,string,,,,,yes,
,block.rotational,"Whether the storage device is a mechanical hard disk. If the storage device is a solid state disk, set this parameter to 0.",cat /sys/block/@block/queue/rotational,echo $value > /sys/block/@block/queue/rotational,FALSE,discrete,0; 1,string,,,,,yes,
,block.scheduler,Configure I/O scheduling. Deadline or noop is more suitable for MySQL database scenarios.,cat /sys/block/@block/queue/scheduler,echo $value > /sys/block/@block/queue/scheduler,FALSE,discrete,deadline; cfq; noop,string,,,,,yes,
,block.scheduler,Configure I/O scheduling. Deadline or noop is more suitable for MySQL database scenarios.,cat /sys/block/@block/queue/scheduler | sed -n 's/.*\[\(.*\)\].*/\1/p',echo $value > /sys/block/@block/queue/scheduler,FALSE,discrete,mq-deadline; kyber; bfq; none,string,,,,,yes,
,block.write_cache,Whether to use the write back or write through cache policy,cat /sys/block/@block/queue/write_cache,echo $value > /sys/block/@block/queue/write_cache,FALSE,discrete,write back; write through,string,,,,,yes,
,block.nomerges,"Most workloads benefit from request merges. However, disabling merges helps for debugging purposes. You can set this parameter to 0 to disable combination. Enabled by default (set to 1).",cat /sys/block/@block/queue/nomerges,echo $value > /sys/block/@block/queue/nomerges,FALSE,discrete,0; 1; 2,string,,,,,yes,
Parameters related to the network software stack,net.core.netdev_budget,Number of network packets processed in each software interrupt,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,100,1000,100,,yes,
,net.core.optmem_max,Maximum size of the buffer allowed by each socket(in bytes). ,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,20480,204800,20480,,yes,
Parameters related to the network software stack,net.core.netdev_budget,Number of network packets processed in each software interrupt,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,100,1000,100,,yes,
,net.core.optmem_max,Maximum size of the buffer allowed by each socket(in bytes). ,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,20480,204800,20480,,yes,
,net.core.wmem_max,"The maximum size of the system socket write buffer is increased to prevent buffer overflow caused by a large number of new connections. As a result, connections cannot be established.
The default value is 229376. You are advised to change the value to 16777216. ",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1048576,67108864,1048576,,yes,
The default value is 229376. You are advised to change the value to 16777216. ",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1048576,67108864,1048576,,yes,
,net.core.wmem_default,"Default TCP send window size (bytes)
",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,8192,1048576,8192,,yes,
,net.core.rmem_default,Sets the default buffer size (bytes) of the receive socket. ,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,8192,1048576,8192,,yes,
",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,8192,1048576,8192,,yes,
,net.core.rmem_default,Sets the default buffer size (bytes) of the receive socket. ,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,8192,1048576,8192,,yes,
,net.core.rmem_max,"Maximum system socket read buffer
The default value is 229376. You are advised to change the value to 16777216.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1048576,67108864,1048576,,yes,
,net.core.netdev_max_backlog,Maximum number of packets that can be sent to the queue when each network interface receives packets faster than the kernel processes them ,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1000,100000,1000,,yes,
The default value is 229376. You are advised to change the value to 16777216.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1048576,67108864,1048576,,yes,
,net.core.netdev_max_backlog,Maximum number of packets that can be sent to the queue when each network interface receives packets faster than the kernel processes them ,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1000,100000,1000,,yes,
,net.ipv4.tcp_thin_linear_timeouts,"Check whether the TCP stream is thin after the retransmission times out.
",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0;1,string,,,,,yes,
",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0;1,string,,,,,yes,
,net.unix.max_dgram_qlen,"Maximum number of datagrams in a UDP queue
",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,128,1048576,128,,yes,
",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,128,1048576,128,,yes,
,net.core.somaxconn,"Defines the maximum length of the listening queue of each port in the system. This is a global parameter.
The default value is 128. You are advised to change the value to 1024. ",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,128,65536,128,,yes,
The default value is 128. You are advised to change the value to 1024. ",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,128,65536,128,,yes,
,net.core.busy_poll,"Timeout interval for performing the poll and select operations on network devices (us) by default. The value is determined by the number of sockets.
",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,200,10,,yes,
,net.core.busy_read,Timeout interval for reading data frames in the device frame queue (us) by default. The recommended value is 50. ,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,200,10,,yes,
,net.core.dev_weight,Maximum number of network packets that can be processed by each CPU in an NAPI interrupt ,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,16,1024,16,,yes,
,net.ipv4.tcp_keepalive_intvl,Indicates the frequency of sending TCP probe packets. The value multiplied by tcp_keepalive_probes indicates the duration when no TCP connection is available.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,30,300,15,,yes,
,net.ipv4.tcp_keepalive_probes,This file indicates the maximum number of times that TCP keepalive detection is performed before a TCP connection is discarded. Keep-alive connections are sent only when the SO_KEEPALIVE socket option is turned on. ,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,3,144,3,,yes,
,net.ipv4.tcp_keepalive_time,Interval for sending keepalive detection messages(in seconds). This parameter is used to check whether the TCP connection is valid. ,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,600,36000,600,,yes,
,net.ipv4.tcp_tw_reuse,"The value 1 indicates that TIME-WAIT sockets can be used for new TCP connections, and the value 0 indicates that TIME-WAIT sockets are disabled. ",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0;1;2,string,,,,,yes,
,net.ipv4.tcp_window_scaling,"The window scaling defined in RFC 1323 is enabled. To support a TCP window larger than 64 KB, this parameter must be set to 1. The maximum size of a TCP window is 1 GB. This parameter takes effect only when both parties of a TCP connection are enabled. ",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0;1,string,,,,,yes,
,net.ipv4.tcp_fin_timeout,Maximum duration for a socket to remain in the FIN_WAIT_2 state.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1,120,1,,yes,
",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,200,10,,yes,
,net.core.busy_read,Timeout interval for reading data frames in the device frame queue (us) by default. The recommended value is 50. ,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,200,10,,yes,
,net.core.dev_weight,Maximum number of network packets that can be processed by each CPU in an NAPI interrupt ,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,16,1024,16,,yes,
,net.ipv4.tcp_keepalive_intvl,Indicates the frequency of sending TCP probe packets. The value multiplied by tcp_keepalive_probes indicates the duration when no TCP connection is available.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,30,300,15,,yes,
,net.ipv4.tcp_keepalive_probes,This file indicates the maximum number of times that TCP keepalive detection is performed before a TCP connection is discarded. Keep-alive connections are sent only when the SO_KEEPALIVE socket option is turned on. ,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,3,144,3,,yes,
,net.ipv4.tcp_keepalive_time,Interval for sending keepalive detection messages(in seconds). This parameter is used to check whether the TCP connection is valid. ,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,600,36000,600,,yes,
,net.ipv4.tcp_tw_reuse,"The value 1 indicates that TIME-WAIT sockets can be used for new TCP connections, and the value 0 indicates that TIME-WAIT sockets are disabled. ",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0;1;2,string,,,,,yes,
,net.ipv4.tcp_window_scaling,"The window scaling defined in RFC 1323 is enabled. To support a TCP window larger than 64 KB, this parameter must be set to 1. The maximum size of a TCP window is 1 GB. This parameter takes effect only when both parties of a TCP connection are enabled. ",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0;1,string,,,,,yes,
,net.ipv4.tcp_fin_timeout,Maximum duration for a socket to remain in the FIN_WAIT_2 state.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1,120,1,,yes,
,net.ipv4.udp_mem,"The file saves three values:
low: When the number of memory pages used by UDP is less than the value of this parameter, UDP does not release memory.
assure: When the number of memory pages used by UDP exceeds the value of this parameter, UDP attempts to stabilize the memory usage and enters the pressure mode. When the memory usage is less than the value of low, UDP exits the pressure mode.
high: indicates the number of pages that can be used by all UDP sockets to queue and buffer datagrams.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,12582912 16777216 25165824;25165824 33554432 50331648;50331648 100663296,string,,,,,yes,
,net.ipv4.tcp_mem,"TCP overall cache setting, which controls all TCP memory usage (in pages). The parameter indicates the no-pressure value of the TCP overall memory, the threshold for enabling the pressure mode, and the maximum usage value in sequence. This parameter is used to control whether the new cache is successfully allocated.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,6168306 8224411 12336612;12336612 16448822 24673224,string,,,,,yes,
,net.ipv4.tcp_rmem,"Size of the read buffer. The first value is the minimum value of the read buffer, the third value is the maximum value, and the middle value is the default value. The default value is 4096 87380 6291456. You are advised to change the value to 4096 87380 16777216.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,4096 16384 4194304;4096 32768 8388608;4096 65536 16777216,string,,,,,yes,
,net.ipv4.tcp_wmem,"Size of the write buffer. The first value is the minimum value of the read buffer, the third value is the maximum value, and the middle value is the default value. The default value is 4096 16384 4194304. You are advised to change the value to 4096 65536 16777216.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,4096 16384 4194304;4096 32768 8388608;4096 65536 16777216,string,,,,,yes,
,net.ipv4.tcp_fastopen,Whether to enable the TCP quick open mode is to avoid the three-way handshake of hot requests. This greatly improves the performance in the scenario where small objects are moved.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,1; 2; 4,string,,,,,yes,
high: indicates the number of pages that can be used by all UDP sockets to queue and buffer datagrams.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,12582912 16777216 25165824;25165824 33554432 50331648;50331648 100663296,string,,,,,yes,
,net.ipv4.tcp_mem,"TCP overall cache setting, which controls all TCP memory usage (in pages). The parameter indicates the no-pressure value of the TCP overall memory, the threshold for enabling the pressure mode, and the maximum usage value in sequence. This parameter is used to control whether the new cache is successfully allocated.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,6168306 8224411 12336612;12336612 16448822 24673224,string,,,,,yes,
,net.ipv4.tcp_rmem,"Size of the read buffer. The first value is the minimum value of the read buffer, the third value is the maximum value, and the middle value is the default value. The default value is 4096 87380 6291456. You are advised to change the value to 4096 87380 16777216.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,4096 16384 4194304;4096 32768 8388608;4096 65536 16777216,string,,,,,yes,
,net.ipv4.tcp_wmem,"Size of the write buffer. The first value is the minimum value of the read buffer, the third value is the maximum value, and the middle value is the default value. The default value is 4096 16384 4194304. You are advised to change the value to 4096 65536 16777216.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,4096 16384 4194304;4096 32768 8388608;4096 65536 16777216,string,,,,,yes,
,net.ipv4.tcp_fastopen,Whether to enable the TCP quick open mode is to avoid the three-way handshake of hot requests. This greatly improves the performance in the scenario where small objects are moved.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,1; 2; 4,string,,,,,yes,
,net.ipv4.tcp_synack_retries,"For the remote connection request SYN, the kernel sends a SYN + ACK packet to acknowledge the receipt of the previous SYN connection request packet.
It's called a three-way handshake. This parameter determines the number of SYN+ACK packets sent by the kernel before the kernel discards the connection.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,3,64,1,,yes,
,net.ipv4.tcp_syn_retries,"Number of times that the local device retransmits TCP SYN packets due to timeout. The value cannot be greater than 255. This parameter is valid only for outgoing connections. For incoming connections, this parameter is controlled by tcp_retries1.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,3,64,1,,yes,
It's called a three-way handshake. This parameter determines the number of SYN+ACK packets sent by the kernel before the kernel discards the connection.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,3,64,1,,yes,
,net.ipv4.tcp_syn_retries,"Number of times that the local device retransmits TCP SYN packets due to timeout. The value cannot be greater than 255. This parameter is valid only for outgoing connections. For incoming connections, this parameter is controlled by tcp_retries1.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,3,64,1,,yes,
,net.ipv4.tcp_moderate_rcvbuf,"Whether to adjust the receive buffer when receiving data
0: no adjustment
1: yes",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
1: yes",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.ipv4.tcp_timestamps,"Indicates whether to enable the calculation of the RTT in a more accurate way than timeout retransmission (see RFC 1323). This option should be enabled for better performance.
0: no
1: enabled",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
1: enabled",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.ipv4.tcp_dsack,"Indicates whether to allow TCP to send two identical SACKs.
0: disabled
1: enabled",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.ipv4.tcp_fack,Enables the forwarding acknowledgment. The selective acknowledgment (SACK) can be performed to reduce the occurrence of congestion. This option should also be enabled.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
1: enabled",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.ipv4.tcp_fack,Enables the forwarding acknowledgment. The selective acknowledgment (SACK) can be performed to reduce the occurrence of congestion. This option should also be enabled.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.ipv4.tcp_sack,"Indicates whether to enable the selective acknowledgment function. This function improves the performance by selectively responding to out-of-order received packets. In this way, the sender can send only lost packet segments. This function should be enabled for WAN communication, however, this increases the CPU usage.
0: no
1: enabled",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
1: enabled",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.ipv4.tcp_low_latency,"Allows the TCP/IP stack to adapt to low latency in high throughput scenarios. This option is generally disabled. (But when building a Beowulf cluster, it helps to open it.)
0: disabled
1: enabled",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.ipv4.tcp_adv_win_scale,Calculating the Buffer Overhead,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,4,1,,yes,
,net.ipv4.route.max_size,"Maximum number of entries in the routing cache. If the number of entries in the routing cache exceeds the maximum, the old entries are cleared.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,67108864,2080374784,67108864,,yes,
1: enabled",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.ipv4.tcp_adv_win_scale,Calculating the Buffer Overhead,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,4,1,,yes,
,net.ipv4.route.max_size,"Maximum number of entries in the routing cache. If the number of entries in the routing cache exceeds the maximum, the old entries are cleared.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,67108864,2080374784,67108864,,yes,
,net.ipv4.tcp_max_tw_buckets,"Reduce the number of TIME_WAIT connections to prevent excessive TIME_WAIT connections from occupying network resources and increasing the latency.
The default value is 2048. You are advised to change the value to 360000.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,32768,1048576,32768,,yes,
The default value is 2048. You are advised to change the value to 360000.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,32768,1048576,32768,,yes,
,net.ipv4.tcp_max_syn_backlog,"Indicates the length of the SYN queue. A larger queue length can accommodate more network connections waiting for connections.
The default value is 2048. You are advised to change the value to 8192.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1024,262144,1024,,yes,
,net.ipv4.tcp_max_orphans,"Number of sockets that can be processed by the system and do not belong to any process. When a large number of connections need to be quickly established, pay attention to this parameter.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,65536,16777216,65536,,yes,
,net.ipv4.tcp_ecn,Indicates whether to enable the direct TCP congestion notification function. 0: disabled; 1: enabled,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1; 2,string,,,,,yes,
The default value is 2048. You are advised to change the value to 8192.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1024,262144,1024,,yes,
,net.ipv4.tcp_max_orphans,"Number of sockets that can be processed by the system and do not belong to any process. When a large number of connections need to be quickly established, pay attention to this parameter.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,65536,16777216,65536,,yes,
,net.ipv4.tcp_ecn,Indicates whether to enable the direct TCP congestion notification function. 0: disabled; 1: enabled,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1; 2,string,,,,,yes,
,net.ipv4.ip_forward,"Indicates whether to enable IPv4 IP forwarding.
0: disabled
1: enabled",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.ipv4.conf.default.rp_filter,The kernel sets the policy for responding to ARP queries.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.ipv4.ip_local_port_range,The range of available ports has been increased to prevent performance deterioration caused by continuous search of available ports for new connections when a large number of connections occupy ports.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,32768 60999; 1024 65535; 8192 65535,string,,,,,yes,
,net.ipv4.tcp_no_metrics_save,"After a TCP connection is closed, the saved parameters can be used to initialize the connection when the same connection is created next time as long as dst_entry is valid.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.ipv4.ip_default_ttl,Specifies the lifetime of IP packets sent from the local device. The value is an integer ranging from 0 to 128. The default value is 64.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,8,128,8,,yes,
,net.ipv4.ip_no_pmtu_disc,Setting the MTU for Automatic Socket Detection,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.ipv4.tcp_retries2,The number of retries required before discarding an active (established traffic condition) TCP connection. The default value is 15.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,3,30,1,,yes,
,net.ipv4.tcp_orphan_retries,Number of retries before the local end discards the TCP connection. The default value is 7.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,15,1,,yes,
,net.ipv4.tcp_syncookies,Indicates whether to enable the TCP synchronization label (syncookie).,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.ipv4.tcp_reordering,Maximum number of reordered data packets in TCP flows,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,2,10,1,,yes,
,net.ipv4.tcp_retrans_collapse,"Provides compatibility for bugs on some printers. (Generally, this support is not required. You can disable it.)",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.ipv4.tcp_congestion_control,TCP congestion scheduling algorithm,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,cubic; reno; bbr,string,,,,,yes,
1: enabled",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.ipv4.conf.default.rp_filter,The kernel sets the policy for responding to ARP queries.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.ipv4.ip_local_port_range,The range of available ports has been increased to prevent performance deterioration caused by continuous search of available ports for new connections when a large number of connections occupy ports.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,32768 60999; 1024 65535; 8192 65535,string,,,,,yes,
,net.ipv4.tcp_no_metrics_save,"After a TCP connection is closed, the saved parameters can be used to initialize the connection when the same connection is created next time as long as dst_entry is valid.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.ipv4.ip_default_ttl,Specifies the lifetime of IP packets sent from the local device. The value is an integer ranging from 0 to 128. The default value is 64.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,8,128,8,,yes,
,net.ipv4.ip_no_pmtu_disc,Setting the MTU for Automatic Socket Detection,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.ipv4.tcp_retries2,The number of retries required before discarding an active (established traffic condition) TCP connection. The default value is 15.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,3,30,1,,yes,
,net.ipv4.tcp_orphan_retries,Number of retries before the local end discards the TCP connection. The default value is 7.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,15,1,,yes,
,net.ipv4.tcp_syncookies,Indicates whether to enable the TCP synchronization label (syncookie).,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.ipv4.tcp_reordering,Maximum number of reordered data packets in TCP flows,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,2,10,1,,yes,
,net.ipv4.tcp_retrans_collapse,"Provides compatibility for bugs on some printers. (Generally, this support is not required. You can disable it.)",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.ipv4.tcp_congestion_control,TCP congestion scheduling algorithm,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,cubic; reno; bbr,string,,,,,yes,
,net.ipv4.conf.default.promote_secondaries,"0: When the primary IP address of an interface is removed, all secondary IP addresses are deleted.
1: When the primary IP address of an interface is removed, the secondary IP address becomes the primary IP address.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
1: When the primary IP address of an interface is removed, the secondary IP address becomes the primary IP address.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.ipv4.conf.all.promote_secondaries,"0: When the primary IP address of an interface is removed, all secondary IP addresses are deleted.
1: When the primary IP address of an interface is removed, the secondary IP address becomes the primary IP address.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
1: When the primary IP address of an interface is removed, the secondary IP address becomes the primary IP address.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.ipv4.conf.all.accept_redirects,"Receives and sends ICMP redirection messages. The default value is True for hosts and False for routers.
0: disabled
1: yes",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
1: yes",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.ipv4.conf.default.accept_redirects,"Receives and sends ICMP redirection messages. The default value is True for hosts and False for routers.
0: disabled
1: yes",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
1: yes",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.ipv4.conf.all.secure_redirects,"Receives only ICMP redirect messages sent to gateways in the default gateway list.
0: disabled
1: yes",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
1: yes",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.ipv4.conf.default.secure_redirects,"Receives only ICMP redirect messages sent to gateways in the default gateway list.
0: disabled
1: yes",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
1: yes",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.ipv4.icmp_echo_ignore_broadcasts,"Ignore all received ICMP Echo request broadcasts.
0: not ignore
1: ignore",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.nf_conntrack_max,Maximum number of ip_conntrack structures in the memory,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,65536,1048576,65536,,yes,
,net.netfilter.nf_conntrack_tcp_timeout_established,Timeout interval for TCP in the established state (s),sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,108000,1728000,108000,,yes,
,net.netfilter.nf_conntrack_tcp_timeout_close_wait,Timeout interval for TCP in close wait state (s),sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,15,240,15,,yes,
,net.netfilter.nf_conntrack_tcp_timeout_fin_wait,Timeout interval for TCP in the fin wait state (s),sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,30,480,30,,yes,bad command line argument(s)
,net.netfilter.nf_conntrack_tcp_timeout_time_wait,Timeout interval for TCP in time wait state (s),sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,30,480,30,,yes,
1: ignore",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.nf_conntrack_max,Maximum number of ip_conntrack structures in the memory,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,65536,1048576,65536,,yes,
,net.netfilter.nf_conntrack_tcp_timeout_established,Timeout interval for TCP in the established state (s),sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,108000,1728000,108000,,yes,
,net.netfilter.nf_conntrack_tcp_timeout_close_wait,Timeout interval for TCP in close wait state (s),sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,15,240,15,,yes,
,net.netfilter.nf_conntrack_tcp_timeout_fin_wait,Timeout interval for TCP in the fin wait state (s),sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,30,480,30,,yes,bad command line argument(s)
,net.netfilter.nf_conntrack_tcp_timeout_time_wait,Timeout interval for TCP in time wait state (s),sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,30,480,30,,yes,
,net.ipv4.conf.default.forwarding,"Enable the forwarding function on the interface.
0: disabled
1: yes",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.core.rps_sock_flow_entries,RFS (Receiver Flow Control) extends the performance of RPS to increase the CPU cache hit ratio and reduce network latency.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,131072,1024,,yes,
,net.ipv4.tcp_min_tso_segs,Minimal number of segments per TSO frame.,sysctl @name | awk '{print $4}',sysctl -w @name=$value,FALSE,continuous,,int,1,16,1,,yes,
1: yes",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes,
,net.core.rps_sock_flow_entries,RFS (Receiver Flow Control) extends the performance of RPS to increase the CPU cache hit ratio and reduce network latency.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,131072,1024,,yes,
,net.ipv4.tcp_min_tso_segs,Minimal number of segments per TSO frame.,sysctl -n @name,sysctl -w @name=$value,FALSE,continuous,,int,1,16,1,,yes,
others,login.UserTasksMax,Limit the maximum number of operating system tasks that can be run concurrently by each user,"cat /etc/systemd/logind.conf | grep -w ""^UserTasksMax"" | awk -F ""="" '{print$2}'","sed -i ""s/UserTasksMax=.*/UserTasksMax=$value/"" /etc/systemd/logind.conf",FALSE,continuous,,int,1024,1048576,,,yes,
,ulimit.nofile,Maximum number of files that can be used by a user.,ulimit -n,ulimit -n $value,FALSE,discrete,,int,1024,10240,1,,yes,
Hardware-related,prefetcher,"Hardware prefetch policy. The value 0 indicates that the policy is disabled, and the value 15 indicates that the policy is enabled.",cat /sys/class/misc/prefetch/policy,echo $value > /sys/class/misc/prefetch/policy,FALSE,discrete,0; 15,int,0,15,1,,yes,
......@@ -294,19 +294,19 @@ Hardware-related,prefetcher,"Hardware prefetch policy. The value 0 indicates tha
,reg_funcdis_comb,Whether to merge write operations whose size is less than 128 bytes. 0--enable 1--disables the merge function of the write operation.,cat /sys/class/misc/prefetch/@name,echo $value > /sys/class/misc/prefetch/@name,FALSE,discrete,0; 1,string,,,,,yes,
nginx,nginx.access_log,Enabling or Disabling nginx access_log,"cat /etc/nginx/nginx.conf | grep ""access_log"" | awk -F ';' '{print $1}' | awk '{$1="""";print}'| awk '$1=$1'","sed -i ""s#access_log.*#access_log $value;#g"" /etc/nginx/nginx.conf",FALSE,discrete,/var/log/nginx/access.log main;off,string,,,,,yes,
,nginx.error_log,Enabling or Disabling nginx error_log,"cat /etc/nginx/nginx.conf | grep ""error_log"" | awk -F ';' '{print $1}' | awk '{$1="""";print}' | awk '$1=$1'","sed -i ""s#error_log.*#error_log $value;#g"" /etc/nginx/nginx.conf",FALSE,discrete,/var/log/nginx/access.log main;/dev/null,string,,,,,yes,
mariadb,mariadb.key_buffer_size,Index parameters of the myisam storage engine,cat /etc/my.cnf | grep key_buffer_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/key_buffer_size.*/key_buffer_size = $value/g' /etc/my.cnf,FALSE,discrete,,int,"1,048,576?","536,870,912","1,048,576?",,yes,
,mariadb.max_allowed_packet,Maximum number of received packets,cat /etc/my.cnf | grep max_allowed_packet | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/max_allowed_packet.*/max_allowed_packet = $value/g' /etc/my.cnf,FALSE,discrete,,int,"1,048,576?","1,048,576?00","1,048,576?",,yes,
mariadb,mariadb.key_buffer_size,Index parameters of the myisam storage engine,cat /etc/my.cnf | grep key_buffer_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/key_buffer_size.*/key_buffer_size = $value/g' /etc/my.cnf,FALSE,discrete,,int,1048576,536870912,1048576,,yes,
,mariadb.max_allowed_packet,Maximum number of received packets,cat /etc/my.cnf | grep max_allowed_packet | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/max_allowed_packet.*/max_allowed_packet = $value/g' /etc/my.cnf,FALSE,discrete,,int,1048576,104857600,1048576,,yes,
,mariadb.table_open_cache,Table cache for storing data,cat /etc/my.cnf | grep table_open_cache | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/table_open_cache.*/table_open_cache = $value/g' /etc/my.cnf,FALSE,discrete,,int,16,1000000,2,,yes,
,mariadb.back_log,The number of new requests stored in the stack,cat /etc/my.cnf | grep back_log | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/back_log.*/back_log = $value/g' /etc/my.cnf,FALSE,continuous,,int,16,65536,,,yes,
,mariadb.sort_buffer_size,Cache used for sorting,cat /etc/my.cnf | grep sort_buffer_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/sort_buffer_size.*/sort_buffer_size = $value/g' /etc/my.cnf,FALSE,discrete,,int,256,"1,048,576?00",1024,,yes,
,mariadb.read_buffer_size,the buffer allocated to each thread during sequential table scanning.,cat /etc/my.cnf | grep read_buffer_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/read_buffer_size.*/read_buffer_size = $value/g' /etc/my.cnf,FALSE,discrete,,int,1024,"1,048,576?00",1024,,yes,
,mariadb.read_rnd_buffer_size,the buffer allocated to each thread when the table is read randomly,cat /etc/my.cnf | grep read_rnd_buffer_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/read_rnd_buffer_size.*/read_rnd_buffer_size = $value/g' /etc/my.cnf,FALSE,discrete,,int,1024,"1,048,576?00",1024,,yes,
,mariadb.myisam_sort_buffer_size,the buffer required for reordering when the MyISAM table changes,cat /etc/my.cnf | grep myisam_sort_buffer_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/myisam_sort_buffer_size.*/myisam_sort_buffer_size = $value/g' /etc/my.cnf,FALSE,discrete,,int,1024,"1,048,576?00",1024,,yes,
,mariadb.sort_buffer_size,Cache used for sorting,cat /etc/my.cnf | grep sort_buffer_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/sort_buffer_size.*/sort_buffer_size = $value/g' /etc/my.cnf,FALSE,discrete,,int,256,104857600,1024,,yes,
,mariadb.read_buffer_size,the buffer allocated to each thread during sequential table scanning.,cat /etc/my.cnf | grep read_buffer_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/read_buffer_size.*/read_buffer_size = $value/g' /etc/my.cnf,FALSE,discrete,,int,1024,104857600,1024,,yes,
,mariadb.read_rnd_buffer_size,the buffer allocated to each thread when the table is read randomly,cat /etc/my.cnf | grep read_rnd_buffer_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/read_rnd_buffer_size.*/read_rnd_buffer_size = $value/g' /etc/my.cnf,FALSE,discrete,,int,1024,104857600,1024,,yes,
,mariadb.myisam_sort_buffer_size,the buffer required for reordering when the MyISAM table changes,cat /etc/my.cnf | grep myisam_sort_buffer_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/myisam_sort_buffer_size.*/myisam_sort_buffer_size = $value/g' /etc/my.cnf,FALSE,discrete,,int,1024,104857600,1024,,yes,
,mariadb.thread_cache_size,Number of threads saved in the cache that are reused,cat /etc/my.cnf | grep thread_cache_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/thread_cache_size.*/thread_cache_size = $value/g' /etc/my.cnf,FALSE,continuous,,int,8,1000,,,yes,
,mariadb.max_connections,the max number of connections,cat /etc/my.cnf | grep max_connections | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/max_connections.*/max_connections = $value/g' /etc/my.cnf,FALSE,continuous,,int,10,65536,,,yes,
,mariadb.max_heap_table_size,size of a memory table that can be created,cat /etc/my.cnf | grep max_heap_table_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/max_heap_table_size.*/max_heap_table_size = $value/g' /etc/my.cnf,FALSE,discrete,,int,1024,"1,048,576?00",1024,,yes,
,mariadb.innodb_buffer_pool_size,size of innodb buffer pool,cat /etc/my.cnf | grep innodb_buffer_pool_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/innodb_buffer_pool_size.*/innodb_buffer_pool_size = $value/g' /etc/my.cnf,FALSE,discrete,,int,1024,"137,438,953,472?",1024,,yes,
,mariadb.innodb_log_buffer_size,size of innodb log buffer,cat /etc/my.cnf | grep innodb_log_buffer_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/innodb_log_buffer_size.*/innodb_log_buffer_size = $value/g' /etc/my.cnf,FALSE,discrete,,int,"1,048,576?","1,048,576?00","1,048,576?",,yes,
,mariadb.max_heap_table_size,size of a memory table that can be created,cat /etc/my.cnf | grep max_heap_table_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/max_heap_table_size.*/max_heap_table_size = $value/g' /etc/my.cnf,FALSE,discrete,,int,1024,104857600,1024,,yes,
,mariadb.innodb_buffer_pool_size,size of innodb buffer pool,cat /etc/my.cnf | grep innodb_buffer_pool_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/innodb_buffer_pool_size.*/innodb_buffer_pool_size = $value/g' /etc/my.cnf,FALSE,discrete,,int,1024,1.37E+11,1024,,yes,
,mariadb.innodb_log_buffer_size,size of innodb log buffer,cat /etc/my.cnf | grep innodb_log_buffer_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/innodb_log_buffer_size.*/innodb_log_buffer_size = $value/g' /etc/my.cnf,FALSE,discrete,,int,1048576,104857600,1048576,,yes,
redis,redis.tcp-backlog,tcp backlog,cat /etc/redis.conf | grep tcp-backlog | awk '{print $2}',sed -i 's/tcp-backlog.*/tcp-backlog $value/g' /etc/redis.conf,FALSE,continuous,,int,16,65536,,,yes,
,redis.tcp-keepalive,closes the connection after holding for a few seconds,cat /etc/redis.conf | grep tcp-keepalive | awk '{print $2}',sed -i 's/tcp-keepalive.*/tcp-keepalive $value/g' /etc/redis.conf,FALSE,continuous,,int,0,3600,,,yes,
,redis.supervised ,service supervise,cat /etc/redis.conf | grep supervised | awk '{print $2}',sed -i 's/supervised .*/supervised $value/g' /etc/redis.conf,FALSE,discrete,no;upstart;systemd;auto,string,,,,,yes,
......
......@@ -9,16 +9,16 @@ Category,"name
(Maximum Value of the parameter)","step
(Step of the parameter value)","items
(Enumerated values out of parameter values. Use "";"" to split different values)",select (whether to select the parameter),Remarks
mariadb,mariadb.key_buffer_size,Index parameters of the myisam storage engine,cat /etc/my.cnf | grep key_buffer_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/key_buffer_size.*/key_buffer_size = $value/g' /etc/my.cnf,false,discrete,,int,1048576?,536870912,1048576?,,yes,
,mariadb.max_allowed_packet,Maximum number of received packets,cat /etc/my.cnf | grep max_allowed_packet | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/max_allowed_packet.*/max_allowed_packet = $value/g' /etc/my.cnf,false,discrete,,int,1048576?,1048576?00,1048576?,,yes,
,mariadb.table_open_cache,Table cache for storing data,cat /etc/my.cnf | grep table_open_cache | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/table_open_cache.*/table_open_cache = $value/g' /etc/my.cnf,false,discrete,,int,16,1000000,2,,yes,
,mariadb.back_log,The number of new requests stored in the stack,cat /etc/my.cnf | grep back_log | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/back_log.*/back_log = $value/g' /etc/my.cnf,false,continuous,,int,16,65536,,,yes,
,mariadb.sort_buffer_size,Cache used for sorting,cat /etc/my.cnf | grep sort_buffer_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/sort_buffer_size.*/sort_buffer_size = $value/g' /etc/my.cnf,false,discrete,,int,256,1048576?00,1024,,yes,
,mariadb.read_buffer_size,the buffer allocated to each thread during sequential table scanning.,cat /etc/my.cnf | grep read_buffer_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/read_buffer_size.*/read_buffer_size = $value/g' /etc/my.cnf,false,discrete,,int,1024,1048576?00,1024,,yes,
,mariadb.read_rnd_buffer_size,the buffer allocated to each thread when the table is read randomly,cat /etc/my.cnf | grep read_rnd_buffer_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/read_rnd_buffer_size.*/read_rnd_buffer_size = $value/g' /etc/my.cnf,false,discrete,,int,1024,1048576?00,1024,,yes,
,mariadb.myisam_sort_buffer_size,the buffer required for reordering when the MyISAM table changes,cat /etc/my.cnf | grep myisam_sort_buffer_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/myisam_sort_buffer_size.*/myisam_sort_buffer_size = $value/g' /etc/my.cnf,false,discrete,,int,1024,1048576?00,1024,,yes,
,mariadb.thread_cache_size,Number of threads saved in the cache that are reused,cat /etc/my.cnf | grep thread_cache_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/thread_cache_size.*/thread_cache_size = $value/g' /etc/my.cnf,false,continuous,,int,8,1000,,,yes,
,mariadb.max_connections,the max number of connections,cat /etc/my.cnf | grep max_connections | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/max_connections.*/max_connections = $value/g' /etc/my.cnf,false,continuous,,int,10,65536,,,yes,
,mariadb.max_heap_table_size,size of a memory table that can be created,cat /etc/my.cnf | grep max_heap_table_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/max_heap_table_size.*/max_heap_table_size = $value/g' /etc/my.cnf,false,discrete,,int,1024,1048576?00,1024,,yes,
,mariadb.innodb_buffer_pool_size,size of innodb buffer pool,cat /etc/my.cnf | grep innodb_buffer_pool_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/innodb_buffer_pool_size.*/innodb_buffer_pool_size = $value/g' /etc/my.cnf,false,discrete,,int,1024,137438953472?,1024,,yes,
,mariadb.innodb_log_buffer_size,size of innodb log buffer,cat /etc/my.cnf | grep innodb_log_buffer_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/innodb_log_buffer_size.*/innodb_log_buffer_size = $value/g' /etc/my.cnf,false,discrete,,int,1048576?,1048576?00,1048576?,,yes,
mariadb,mariadb.key_buffer_size,Index parameters of the myisam storage engine,cat /etc/my.cnf | grep key_buffer_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/key_buffer_size.*/key_buffer_size = $value/g' /etc/my.cnf,FALSE,discrete,,int,1048576,536870912,1048576,,yes,
,mariadb.max_allowed_packet,Maximum number of received packets,cat /etc/my.cnf | grep max_allowed_packet | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/max_allowed_packet.*/max_allowed_packet = $value/g' /etc/my.cnf,FALSE,discrete,,int,1048576,104857600,1048576,,yes,
,mariadb.table_open_cache,Table cache for storing data,cat /etc/my.cnf | grep table_open_cache | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/table_open_cache.*/table_open_cache = $value/g' /etc/my.cnf,FALSE,discrete,,int,16,1000000,2,,yes,
,mariadb.back_log,The number of new requests stored in the stack,cat /etc/my.cnf | grep back_log | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/back_log.*/back_log = $value/g' /etc/my.cnf,FALSE,continuous,,int,16,65536,,,yes,
,mariadb.sort_buffer_size,Cache used for sorting,cat /etc/my.cnf | grep sort_buffer_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/sort_buffer_size.*/sort_buffer_size = $value/g' /etc/my.cnf,FALSE,discrete,,int,256,104857600,1024,,yes,
,mariadb.read_buffer_size,the buffer allocated to each thread during sequential table scanning.,cat /etc/my.cnf | grep read_buffer_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/read_buffer_size.*/read_buffer_size = $value/g' /etc/my.cnf,FALSE,discrete,,int,1024,104857600,1024,,yes,
,mariadb.read_rnd_buffer_size,the buffer allocated to each thread when the table is read randomly,cat /etc/my.cnf | grep read_rnd_buffer_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/read_rnd_buffer_size.*/read_rnd_buffer_size = $value/g' /etc/my.cnf,FALSE,discrete,,int,1024,104857600,1024,,yes,
,mariadb.myisam_sort_buffer_size,the buffer required for reordering when the MyISAM table changes,cat /etc/my.cnf | grep myisam_sort_buffer_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/myisam_sort_buffer_size.*/myisam_sort_buffer_size = $value/g' /etc/my.cnf,FALSE,discrete,,int,1024,104857600,1024,,yes,
,mariadb.thread_cache_size,Number of threads saved in the cache that are reused,cat /etc/my.cnf | grep thread_cache_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/thread_cache_size.*/thread_cache_size = $value/g' /etc/my.cnf,FALSE,continuous,,int,8,1000,,,yes,
,mariadb.max_connections,the max number of connections,cat /etc/my.cnf | grep max_connections | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/max_connections.*/max_connections = $value/g' /etc/my.cnf,FALSE,continuous,,int,10,65536,,,yes,
,mariadb.max_heap_table_size,size of a memory table that can be created,cat /etc/my.cnf | grep max_heap_table_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/max_heap_table_size.*/max_heap_table_size = $value/g' /etc/my.cnf,FALSE,discrete,,int,1024,104857600,1024,,yes,
,mariadb.innodb_buffer_pool_size,size of innodb buffer pool,cat /etc/my.cnf | grep innodb_buffer_pool_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/innodb_buffer_pool_size.*/innodb_buffer_pool_size = $value/g' /etc/my.cnf,FALSE,discrete,,int,1024,1.37E+11,1024,,yes,
,mariadb.innodb_log_buffer_size,size of innodb log buffer,cat /etc/my.cnf | grep innodb_log_buffer_size | awk -F '=' '{print $2}' | awk '$1=$1',sed -i 's/innodb_log_buffer_size.*/innodb_log_buffer_size = $value/g' /etc/my.cnf,FALSE,discrete,,int,1048576,104857600,1048576,,yes,
......@@ -9,17 +9,17 @@ Category,"name
(Maximum Value of the parameter)","step
(Step of the parameter value)","items
(Enumerated values out of parameter values. Use "";"" to split different values)",select (whether to select the parameter)
Kernel scheduling parameters,kernel.sched_migration_cost_ns,"This variable is used to determine whether a process is still hot. If the running time of a process is shorter than the value of this variable, the kernel considers that the code of the process is still in the cache. Therefore, the process is still hot and is not considered during migration.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,100000,5000000,100000,,yes
,kernel.sched_cfs_bandwidth_slice_us,Fixed size of the time slice applied for from the global time pool,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1000,50000,1000,,yes
,kernel.sched_wakeup_granularity_ns,"This variable indicates the base of the minimum time that a process should run after it is woken up. The smaller the base, the higher the probability of preemption.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1000000,100000000,1000000,,yes
,kernel.sched_latency_ns,Maximum running time of a running process.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1000000,100000000,1000000,,yes
,kernel.sched_nr_migrate,How Many Processes Can Be Moved to Another CPU at a Time When Load Balancing Is Performed in the Case of Multiple CPUs?,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1,128,1,,yes
,kernel.sched_min_granularity_ns,"Minimum running time of a process on the CPU. During this time, the kernel does not proactively select other processes for scheduling (in nanoseconds).",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1000000,100000000,1000000,,yes
,kernel.sched_tunable_scaling,"Update method used when the kernel attempts to adjust the values of sched_min_granularity, sched_latency, and sched_wakeup_granularity. The value 0 indicates that the value is not adjusted, and the value 1 indicates that the value is adjusted based on the number of CPUs, 2: The linear proportion is adjusted based on the number of CPUs.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1; 2,string,,,,,yes
Kernel scheduling parameters,kernel.sched_migration_cost_ns,"This variable is used to determine whether a process is still hot. If the running time of a process is shorter than the value of this variable, the kernel considers that the code of the process is still in the cache. Therefore, the process is still hot and is not considered during migration.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,100000,5000000,100000,,yes
,kernel.sched_cfs_bandwidth_slice_us,Fixed size of the time slice applied for from the global time pool,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1000,50000,1000,,yes
,kernel.sched_wakeup_granularity_ns,"This variable indicates the base of the minimum time that a process should run after it is woken up. The smaller the base, the higher the probability of preemption.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1000000,100000000,1000000,,yes
,kernel.sched_latency_ns,Maximum running time of a running process.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1000000,100000000,1000000,,yes
,kernel.sched_nr_migrate,How Many Processes Can Be Moved to Another CPU at a Time When Load Balancing Is Performed in the Case of Multiple CPUs?,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1,128,1,,yes
,kernel.sched_min_granularity_ns,"Minimum running time of a process on the CPU. During this time, the kernel does not proactively select other processes for scheduling (in nanoseconds).",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1000000,100000000,1000000,,yes
,kernel.sched_tunable_scaling,"Update method used when the kernel attempts to adjust the values of sched_min_granularity, sched_latency, and sched_wakeup_granularity. The value 0 indicates that the value is not adjusted, and the value 1 indicates that the value is adjusted based on the number of CPUs, 2: The linear proportion is adjusted based on the number of CPUs.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1; 2,string,,,,,yes
Network adapter parameters,transparent_hugepage.defrag,Enabling or Disabling Transparent Hugepages,cat /sys/kernel/mm/transparent_hugepage/defrag | sed -n 's/.*\[\(.*\)\].*/\1/p',echo $value > /sys/kernel/mm/transparent_hugepage/defrag,FALSE,discrete,always;defer;defer+madvise;madvise;never,string,,,,,yes
,transparent_hugepage.enabled,Enabling or Disabling Transparent Hugepages,cat /sys/kernel/mm/transparent_hugepage/enabled | sed -n 's/.*\[\(.*\)\].*/\1/p',echo $value > /sys/kernel/mm/transparent_hugepage/enabled,FALSE,discrete,always; madvise; never,string,,,,,yes
,net.netfilter.nf_conntrack_max,"Maximum number of tracing connections
When a container is used, the nf_conntrack module cannot be disabled. Therefore, kernel parameters related to nf_conntrack need to be added to the /etc/sysctl.conf file to prevent packet loss caused by full table records.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,67108864,1,,yes
When a container is used, the nf_conntrack module cannot be disabled. Therefore, kernel parameters related to nf_conntrack need to be added to the /etc/sysctl.conf file to prevent packet loss caused by full table records.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,67108864,1,,yes
,net.mtu,"Indicates the maximum transmission unit of the network,",ifconfig @netdev | grep mtu | awk '{print $4}',ifconfig @netdev mtu $value,FALSE,discrete,,int,500,9000,500,,yes
,net.tx-frames,Configuring NIC Interrupt Combination,ethtool -c @netdev | grep tx-frames: | awk '{print $2}',ethtool -C @netdev tx-frames $value,FALSE,discrete,,int,0,64,2,,yes
,net.rx-frames,Configuring NIC Interrupt Combination,ethtool -c @netdev | grep rx-frames: | awk '{print $2}',ethtool -C @netdev rx-frames $value,FALSE,discrete,,int,0,64,2,,yes
......@@ -33,65 +33,65 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
,net.generic-receive-offload,Whether reassembling small packets into larger ones,"ethtool -k @netdev | grep ""generic-receive-offload"" | awk '{print $2}'",ethtool -K @netdev gro $value,FALSE,discrete,on;off,string,,,,,yes
,net.generic-segmentation-offload,Whether reassembling small packets into larger ones,"ethtool -k @netdev | grep ""generic-segmentation-offload"" | awk '{print $2}'",ethtool -K @netdev gso $value,FALSE,discrete,on;off,string,,,,,yes
,net.tcp-segmentation-offload,Wheth allow a device to segment a single frame into multiple frames with a data payload size specified in skb_shinfo()->gso_size.,"ethtool -k @netdev | grep ""tcp-segmentation-offload"" | awk '{print $2}'",ethtool -K @netdev tso $value,FALSE,discrete,on;off,string,,,,,yes
,sunrpc.tcp_slot_table_entries,"The Linux NFS client controls the number of concurrent NFS requests. If this parameter is set to a small value, the I/O performance is poor. By default, the maximum value of this parameter for the compiled kernel is 256. You can increase the value of this parameter to achieve better performance.",sysctl @name,sysctl -w @name=$value,FALSE,discrete,,int,4,256,4,,no
,sunrpc.udp_slot_table_entries,"The Linux NFS client controls the number of concurrent NFS requests. If this parameter is set to a small value, the I/O performance is poor. By default, the maximum value of this parameter for the compiled kernel is 256. You can increase the value of this parameter to achieve better performance.",sysctl @name,sysctl -w @name=$value,FALSE,discrete,,int,4,256,4,,no
Kernel resource parameters,kernel.pid_max,Maximum process ID.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1048576,4194304,1048576,,yes
,kernel.shmmni,Maximum number of shared memory segments in the system.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1024,16384,1024,,yes
,kernel.shmmax,"The maximum size, in bytes, of the shared memory segment allowed by the system.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,17179869184,68719476736,17179869184,,yes
,kernel.shmall,The total amount of shared memory available on the system in bytes,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1073741824,8589934592,1073741824,,yes
,sunrpc.tcp_slot_table_entries,"The Linux NFS client controls the number of concurrent NFS requests. If this parameter is set to a small value, the I/O performance is poor. By default, the maximum value of this parameter for the compiled kernel is 256. You can increase the value of this parameter to achieve better performance.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,4,256,4,,no
,sunrpc.udp_slot_table_entries,"The Linux NFS client controls the number of concurrent NFS requests. If this parameter is set to a small value, the I/O performance is poor. By default, the maximum value of this parameter for the compiled kernel is 256. You can increase the value of this parameter to achieve better performance.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,4,256,4,,no
Kernel resource parameters,kernel.pid_max,Maximum process ID.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1048576,4194304,1048576,,yes
,kernel.shmmni,Maximum number of shared memory segments in the system.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1024,16384,1024,,yes
,kernel.shmmax,"The maximum size, in bytes, of the shared memory segment allowed by the system.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,17179869184,68719476736,17179869184,,yes
,kernel.shmall,The total amount of shared memory available on the system in bytes,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1073741824,8589934592,1073741824,,yes
,kernel.core_uses_pid,"Whether to add the application pid to the core file name as an extension.
0: no
1: add",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,kernel.msgmni,System Message Queue Length,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,8000,128000,8000,,yes
,kernel.msgmax,Maximum number of bytes of a single message in a message queue.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,4096,1048576,4096,,yes
,kernel.msgmnb,Maximum length of bytes in a single message queue,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,4096,1048576,4096,,yes
1: add",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,kernel.msgmni,System Message Queue Length,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,8000,128000,8000,,yes
,kernel.msgmax,Maximum number of bytes of a single message in a message queue.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,4096,1048576,4096,,yes
,kernel.msgmnb,Maximum length of bytes in a single message queue,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,4096,1048576,4096,,yes
,kernel.sem,"The file contains four values:
1. Maximum number of signals of the same type (semmsl)
2. Maximum number of signals in the system, =semmni*semmsl (semmns)
3. Maximum number of operations (maximum number of semaphores that can be invoked) contained in each system invoking (semopm)
4. Maximum number of signal types in the system. A signal identifier represents a type (semmni).",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,16000 512000000 256 16000;32000 1024000000 500 32000;64000 2048000000 1000 64000,string,,,,,yes
,kernel.hung_task_timeout_secs,"Timeout interval of a hung_task (in seconds). When a process is in the TASK_UNINTERRUPTIBLE state for a period longer than the timeout interval, a hung_task occurs.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,30,1200,30,,yes
4. Maximum number of signal types in the system. A signal identifier represents a type (semmni).",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,16000 512000000 256 16000;32000 1024000000 500 32000;64000 2048000000 1000 64000,string,,,,,yes
,kernel.hung_task_timeout_secs,"Timeout interval of a hung_task (in seconds). When a process is in the TASK_UNINTERRUPTIBLE state for a period longer than the timeout interval, a hung_task occurs.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,30,1200,30,,yes
,kernel.nmi_watchdog,"Enabling nmi_watchdog
0: disabled
1: enabled",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,kernel.sched_rt_runtime_us,"This parameter, together with sched_rt_period, determines the period of the real-time process.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,950000,1000000,10000,,yes
,kernel.timer_migration,Disable Clock Migration,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,kernel.threads-max,Maximum number of processes (including threads) in the system,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,655360,65536000,655360,,yes
,kernel.sysrq,"The file specifies a non-zero value, which activates the sysrq key on the keyboard.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
1: enabled",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,kernel.sched_rt_runtime_us,"This parameter, together with sched_rt_period, determines the period of the real-time process.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,950000,1000000,10000,,yes
,kernel.timer_migration,Disable Clock Migration,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,kernel.threads-max,Maximum number of processes (including threads) in the system,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,655360,65536000,655360,,yes
,kernel.sysrq,"The file specifies a non-zero value, which activates the sysrq key on the keyboard.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,kernel.sched_autogroup_enabled,"When enabled, the kernel creates task groups to optimize desktop program scheduling.
0: disabled
1: enabled",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,kernel.numa_balancing,Specifies whether to enable NUMA automatic balancing.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,kernel.randomize_va_space,Setting Memory Address Randomization,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,2,1,,yes
1: enabled",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,kernel.numa_balancing,Specifies whether to enable NUMA automatic balancing.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,kernel.randomize_va_space,Setting Memory Address Randomization,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,2,1,,yes
,kernel.dmesg_restrict,"Which users are restricted from viewing syslogs?
0: no restriction
1: Only privileged users can view the information.",sysctl @name | awk '{print $4}',sysctl -w @name=$value,FALSE,discrete,0;1,string,,,,,yes
Virtual memory and buffer/cache parameters,vm.swappiness,A larger value indicates that the swap partition is used more actively. A smaller value indicates that the memory is used more actively.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,100,1,,yes
,vm.vfs_cache_pressure,Indicates the tendency of the kernel to reclaim the memory used for directory and inode cache.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,500,50,,yes
,vm.dirty_background_ratio,"When the percentage of dirty pages reaches dirty_background_ratio, the write function wakes up the flusher thread of the kernel to write back dirty page data until the percentage is less than the value of dirty_background_ratio.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,100,1,,yes
,vm.dirty_ratio,The percentage of dirty data in the memory cannot exceed this value.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,100,1,,yes
,vm.stat_interval,VM information update frequency (in seconds),sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1,100,1,,yes
,vm.dirty_expire_centisecs,"Expiration time of dirty data. When the flusher thread of the kernel is woken up after the expiration time, dirty data is written back to the disk. The unit is 1% second.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,100,1000,100,,yes
,vm.dirty_writeback_centisecs,Sets the interval for waking up the flusher kernel thread. This thread is used to write dirty pages back to the disk. The unit is 1% second.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,100,1000,100,,yes
,vm.overcommit_ratio,"When overcommit_memory is set to 2, the percentage of physical RAM that is considered is set.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,100,10,,yes
,vm.overcommit_memory,Indicates whether to allow excessive memory allocation. The process can allocate more memory than it actually uses.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,vm.min_free_kbytes,"Size of memory reserved in each memory area, in KB.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,10240,1024000,10240,,yes
,vm.page-cluster,Number of pages written to the swap partition each time.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,8,1,,yes
,vm.max_map_count,Defines the maximum memory area that a process can have.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,100000,10000000,100000,,yes
,vm.zone_reclaim_mode,This parameter is valid only when CONFIG_NUMA is enabled. zone_reclaim_mode is used to control how to reclaim memory when the memory domain OOM is enabled.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1; 2; 4,string,,,,,yes
,vm.watermark_scale_factor,"Controls the radical degree of the kswapd process, that is, how much memory needs to be released for the system (NUMA node) from wakeup to hibernation.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,10,1000,10,,yes
,vm.numa_stat,"This command is used to set the data statistics during NUMA running. When the memory is insufficient, this command can be set to 0 to reduce the statistics precision.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,vm.drop_caches,Releases the cache. The cache is released each time the parameter is modified.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,1; 2; 3,string,,,,,yes
File system parameters,fs.inotify.max_user_watches,Sets the number of processes for each user to run the inotifywait or inotifywatch command.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,4096,819200,4096,,yes
,fs.nr_open,Maximum number of file handles that can be concurrently opened by a process,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,10240,1024000,10240,,yes
,fs.file-max,Number of file handles that can be opened by all processes in the system at the same time,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,102400,10240000,102400,,yes
,fs.aio-max-nr,Maximum number of AIO requests,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,102400,10240000,102400,,yes
,fs.inotify.max_user_watches,Maximum number of monitoring instances,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,4096,65536,4096,,yes
,fs.inotify.max_user_instances,Maximum number of inotify instances that can be started by each user,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,64,65535,64,,yes
1: Only privileged users can view the information.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0;1,string,,,,,yes
Virtual memory and buffer/cache parameters,vm.swappiness,A larger value indicates that the swap partition is used more actively. A smaller value indicates that the memory is used more actively.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,100,1,,yes
,vm.vfs_cache_pressure,Indicates the tendency of the kernel to reclaim the memory used for directory and inode cache.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,500,50,,yes
,vm.dirty_background_ratio,"When the percentage of dirty pages reaches dirty_background_ratio, the write function wakes up the flusher thread of the kernel to write back dirty page data until the percentage is less than the value of dirty_background_ratio.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,100,1,,yes
,vm.dirty_ratio,The percentage of dirty data in the memory cannot exceed this value.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,100,1,,yes
,vm.stat_interval,VM information update frequency (in seconds),sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1,100,1,,yes
,vm.dirty_expire_centisecs,"Expiration time of dirty data. When the flusher thread of the kernel is woken up after the expiration time, dirty data is written back to the disk. The unit is 1% second.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,100,1000,100,,yes
,vm.dirty_writeback_centisecs,Sets the interval for waking up the flusher kernel thread. This thread is used to write dirty pages back to the disk. The unit is 1% second.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,100,1000,100,,yes
,vm.overcommit_ratio,"When overcommit_memory is set to 2, the percentage of physical RAM that is considered is set.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,100,10,,yes
,vm.overcommit_memory,Indicates whether to allow excessive memory allocation. The process can allocate more memory than it actually uses.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,vm.min_free_kbytes,"Size of memory reserved in each memory area, in KB.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,10240,1024000,10240,,yes
,vm.page-cluster,Number of pages written to the swap partition each time.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,8,1,,yes
,vm.max_map_count,Defines the maximum memory area that a process can have.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,100000,10000000,100000,,yes
,vm.zone_reclaim_mode,This parameter is valid only when CONFIG_NUMA is enabled. zone_reclaim_mode is used to control how to reclaim memory when the memory domain OOM is enabled.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1; 2; 4,string,,,,,yes
,vm.watermark_scale_factor,"Controls the radical degree of the kswapd process, that is, how much memory needs to be released for the system (NUMA node) from wakeup to hibernation.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,10,1000,10,,yes
,vm.numa_stat,"This command is used to set the data statistics during NUMA running. When the memory is insufficient, this command can be set to 0 to reduce the statistics precision.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,vm.drop_caches,Releases the cache. The cache is released each time the parameter is modified.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,1; 2; 3,string,,,,,yes
File system parameters,fs.inotify.max_user_watches,Sets the number of processes for each user to run the inotifywait or inotifywatch command.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,4096,819200,4096,,yes
,fs.nr_open,Maximum number of file handles that can be concurrently opened by a process,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,10240,1024000,10240,,yes
,fs.file-max,Number of file handles that can be opened by all processes in the system at the same time,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,102400,10240000,102400,,yes
,fs.aio-max-nr,Maximum number of AIO requests,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,102400,10240000,102400,,yes
,fs.inotify.max_user_watches,Maximum number of monitoring instances,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,4096,65536,4096,,yes
,fs.inotify.max_user_instances,Maximum number of inotify instances that can be started by each user,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,64,65535,64,,yes
,fs.suid_dumpable,"This value can be used to query and set the core dump mode for setuid or otherwise protected/tainted binaries.
0: default
1: debug
2: suidsafe",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,2,1,,yes
2: suidsafe",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,2,1,,yes
Block storage device parameters,blockdev,Disk prefetch settings,/sbin/blockdev --getra /dev/@block,/sbin/blockdev --setra $value /dev/@block,FALSE,discrete,,int,0,2147483648,8,,yes
,block.low_latency,Enables (1) or disables (0) the low latency mode,cat /sys/block/@block/queue/iosched/low_latency,echo $value > /sys/block/@block/queue/iosched/low_latency,FALSE,discrete,0;1,string,,,,,no
,block.fifo_batch,"This parameter is valid only for the Deadline scheduling policy.
......@@ -137,115 +137,115 @@ If set to 0, the mixed polling mode is used, and the kernel attempts to guess wh
,block.rq_affinity,Whether I/O can be performed on different processors is not limited to the processor that sends the I/O request.,cat /sys/block/@block/queue/rq_affinity,echo $value > /sys/block/@block/queue/rq_affinity,FALSE,discrete,0; 1; 2,string,,,,,yes
,block.add_random,Some I/O events affect the entropy pool of /dev/random.,cat /sys/block/@block/queue/add_random,echo $value > /sys/block/@block/queue/add_random,FALSE,discrete,0; 1,string,,,,,yes
,block.rotational,"Whether the storage device is a mechanical hard disk. If the storage device is a solid state disk, set this parameter to 0.",cat /sys/block/@block/queue/rotational,echo $value > /sys/block/@block/queue/rotational,FALSE,discrete,0; 1,string,,,,,yes
,block.scheduler,Configure I/O scheduling. Deadline or noop is more suitable for MySQL database scenarios.,cat /sys/block/@block/queue/scheduler,echo $value > /sys/block/@block/queue/scheduler,FALSE,discrete,deadline; cfq; noop,string,,,,,yes
,block.scheduler,Configure I/O scheduling. Deadline or noop is more suitable for MySQL database scenarios.,cat /sys/block/@block/queue/scheduler | sed -n 's/.*\[\(.*\)\].*/\1/p',echo $value > /sys/block/@block/queue/scheduler,FALSE,discrete,mq-deadline; kyber; bfq; none,string,,,,,yes
,block.write_cache,Whether to use the write back or write through cache policy,cat /sys/block/@block/queue/write_cache,echo $value > /sys/block/@block/queue/write_cache,FALSE,discrete,write back; write through,string,,,,,yes
,block.nomerges,"Most workloads benefit from request merges. However, disabling merges helps for debugging purposes. You can set this parameter to 0 to disable combination. Enabled by default (set to 1).",cat /sys/block/@block/queue/nomerges,echo $value > /sys/block/@block/queue/nomerges,FALSE,discrete,0; 1; 2,string,,,,,yes
Parameters related to the network software stack,net.core.netdev_budget,Number of network packets processed in each software interrupt,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,100,1000,100,,yes
,net.core.optmem_max,Maximum size of the buffer allowed by each socket(in bytes). ,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,20480,204800,20480,,yes
Parameters related to the network software stack,net.core.netdev_budget,Number of network packets processed in each software interrupt,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,100,1000,100,,yes
,net.core.optmem_max,Maximum size of the buffer allowed by each socket(in bytes). ,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,20480,204800,20480,,yes
,net.core.wmem_max,"The maximum size of the system socket write buffer is increased to prevent buffer overflow caused by a large number of new connections. As a result, connections cannot be established.
The default value is 229376. You are advised to change the value to 16777216. ",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1048576,67108864,1048576,,yes
The default value is 229376. You are advised to change the value to 16777216. ",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1048576,67108864,1048576,,yes
,net.core.wmem_default,"Default TCP send window size (bytes)
",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,8192,1048576,8192,,yes
,net.core.rmem_default,Sets the default buffer size (bytes) of the receive socket. ,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,8192,1048576,8192,,yes
",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,8192,1048576,8192,,yes
,net.core.rmem_default,Sets the default buffer size (bytes) of the receive socket. ,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,8192,1048576,8192,,yes
,net.core.rmem_max,"Maximum system socket read buffer
The default value is 229376. You are advised to change the value to 16777216.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1048576,67108864,1048576,,yes
,net.core.netdev_max_backlog,Maximum number of packets that can be sent to the queue when each network interface receives packets faster than the kernel processes them ,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1000,100000,1000,,yes
The default value is 229376. You are advised to change the value to 16777216.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1048576,67108864,1048576,,yes
,net.core.netdev_max_backlog,Maximum number of packets that can be sent to the queue when each network interface receives packets faster than the kernel processes them ,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1000,100000,1000,,yes
,net.ipv4.tcp_thin_linear_timeouts,"Check whether the TCP stream is thin after the retransmission times out.
",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0;1,string,,,,,yes
",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0;1,string,,,,,yes
,net.unix.max_dgram_qlen,"Maximum number of datagrams in a UDP queue
",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,128,1048576,128,,yes
",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,128,1048576,128,,yes
,net.core.somaxconn,"Defines the maximum length of the listening queue of each port in the system. This is a global parameter.
The default value is 128. You are advised to change the value to 1024. ",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,128,65536,128,,yes
The default value is 128. You are advised to change the value to 1024. ",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,128,65536,128,,yes
,net.core.busy_poll,"Timeout interval for performing the poll and select operations on network devices (us) by default. The value is determined by the number of sockets.
",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,200,10,,yes
,net.core.busy_read,Timeout interval for reading data frames in the device frame queue (us) by default. The recommended value is 50. ,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,200,10,,yes
,net.core.dev_weight,Maximum number of network packets that can be processed by each CPU in an NAPI interrupt ,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,16,1024,16,,yes
,net.ipv4.tcp_keepalive_intvl,Indicates the frequency of sending TCP probe packets. The value multiplied by tcp_keepalive_probes indicates the duration when no TCP connection is available.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,30,300,15,,yes
,net.ipv4.tcp_keepalive_probes,This file indicates the maximum number of times that TCP keepalive detection is performed before a TCP connection is discarded. Keep-alive connections are sent only when the SO_KEEPALIVE socket option is turned on. ,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,3,144,3,,yes
,net.ipv4.tcp_keepalive_time,Interval for sending keepalive detection messages(in seconds). This parameter is used to check whether the TCP connection is valid. ,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,600,36000,600,,yes
,net.ipv4.tcp_tw_reuse,"The value 1 indicates that TIME-WAIT sockets can be used for new TCP connections, and the value 0 indicates that TIME-WAIT sockets are disabled. ",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0;1;2,string,,,,,yes
,net.ipv4.tcp_window_scaling,"The window scaling defined in RFC 1323 is enabled. To support a TCP window larger than 64 KB, this parameter must be set to 1. The maximum size of a TCP window is 1 GB. This parameter takes effect only when both parties of a TCP connection are enabled. ",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0;1,string,,,,,yes
,net.ipv4.tcp_fin_timeout,Maximum duration for a socket to remain in the FIN_WAIT_2 state.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1,120,1,,yes
",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,200,10,,yes
,net.core.busy_read,Timeout interval for reading data frames in the device frame queue (us) by default. The recommended value is 50. ,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,200,10,,yes
,net.core.dev_weight,Maximum number of network packets that can be processed by each CPU in an NAPI interrupt ,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,16,1024,16,,yes
,net.ipv4.tcp_keepalive_intvl,Indicates the frequency of sending TCP probe packets. The value multiplied by tcp_keepalive_probes indicates the duration when no TCP connection is available.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,30,300,15,,yes
,net.ipv4.tcp_keepalive_probes,This file indicates the maximum number of times that TCP keepalive detection is performed before a TCP connection is discarded. Keep-alive connections are sent only when the SO_KEEPALIVE socket option is turned on. ,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,3,144,3,,yes
,net.ipv4.tcp_keepalive_time,Interval for sending keepalive detection messages(in seconds). This parameter is used to check whether the TCP connection is valid. ,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,600,36000,600,,yes
,net.ipv4.tcp_tw_reuse,"The value 1 indicates that TIME-WAIT sockets can be used for new TCP connections, and the value 0 indicates that TIME-WAIT sockets are disabled. ",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0;1;2,string,,,,,yes
,net.ipv4.tcp_window_scaling,"The window scaling defined in RFC 1323 is enabled. To support a TCP window larger than 64 KB, this parameter must be set to 1. The maximum size of a TCP window is 1 GB. This parameter takes effect only when both parties of a TCP connection are enabled. ",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0;1,string,,,,,yes
,net.ipv4.tcp_fin_timeout,Maximum duration for a socket to remain in the FIN_WAIT_2 state.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1,120,1,,yes
,net.ipv4.udp_mem,"The file saves three values:
low: When the number of memory pages used by UDP is less than the value of this parameter, UDP does not release memory.
assure: When the number of memory pages used by UDP exceeds the value of this parameter, UDP attempts to stabilize the memory usage and enters the pressure mode. When the memory usage is less than the value of low, UDP exits the pressure mode.
high: indicates the number of pages that can be used by all UDP sockets to queue and buffer datagrams.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,12582912 16777216 25165824;25165824 33554432 50331648;50331648 100663296,string,,,,,yes
,net.ipv4.tcp_mem,"TCP overall cache setting, which controls all TCP memory usage (in pages). The parameter indicates the no-pressure value of the TCP overall memory, the threshold for enabling the pressure mode, and the maximum usage value in sequence. This parameter is used to control whether the new cache is successfully allocated.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,6168306 8224411 12336612;12336612 16448822 24673224,string,,,,,yes
,net.ipv4.tcp_rmem,"Size of the read buffer. The first value is the minimum value of the read buffer, the third value is the maximum value, and the middle value is the default value. The default value is 4096 87380 6291456. You are advised to change the value to 4096 87380 16777216.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,4096 16384 4194304;4096 32768 8388608;4096 65536 16777216,string,,,,,yes
,net.ipv4.tcp_wmem,"Size of the write buffer. The first value is the minimum value of the read buffer, the third value is the maximum value, and the middle value is the default value. The default value is 4096 16384 4194304. You are advised to change the value to 4096 65536 16777216.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,4096 16384 4194304;4096 32768 8388608;4096 65536 16777216,string,,,,,yes
,net.ipv4.tcp_fastopen,Whether to enable the TCP quick open mode is to avoid the three-way handshake of hot requests. This greatly improves the performance in the scenario where small objects are moved.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,1; 2; 4,string,,,,,yes
high: indicates the number of pages that can be used by all UDP sockets to queue and buffer datagrams.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,12582912 16777216 25165824;25165824 33554432 50331648;50331648 100663296,string,,,,,yes
,net.ipv4.tcp_mem,"TCP overall cache setting, which controls all TCP memory usage (in pages). The parameter indicates the no-pressure value of the TCP overall memory, the threshold for enabling the pressure mode, and the maximum usage value in sequence. This parameter is used to control whether the new cache is successfully allocated.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,6168306 8224411 12336612;12336612 16448822 24673224,string,,,,,yes
,net.ipv4.tcp_rmem,"Size of the read buffer. The first value is the minimum value of the read buffer, the third value is the maximum value, and the middle value is the default value. The default value is 4096 87380 6291456. You are advised to change the value to 4096 87380 16777216.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,4096 16384 4194304;4096 32768 8388608;4096 65536 16777216,string,,,,,yes
,net.ipv4.tcp_wmem,"Size of the write buffer. The first value is the minimum value of the read buffer, the third value is the maximum value, and the middle value is the default value. The default value is 4096 16384 4194304. You are advised to change the value to 4096 65536 16777216.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,4096 16384 4194304;4096 32768 8388608;4096 65536 16777216,string,,,,,yes
,net.ipv4.tcp_fastopen,Whether to enable the TCP quick open mode is to avoid the three-way handshake of hot requests. This greatly improves the performance in the scenario where small objects are moved.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,1; 2; 4,string,,,,,yes
,net.ipv4.tcp_synack_retries,"For the remote connection request SYN, the kernel sends a SYN + ACK packet to acknowledge the receipt of the previous SYN connection request packet.
It's called a three-way handshake. This parameter determines the number of SYN+ACK packets sent by the kernel before the kernel discards the connection.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,3,64,1,,yes
,net.ipv4.tcp_syn_retries,"Number of times that the local device retransmits TCP SYN packets due to timeout. The value cannot be greater than 255. This parameter is valid only for outgoing connections. For incoming connections, this parameter is controlled by tcp_retries1.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,3,64,1,,yes
It's called a three-way handshake. This parameter determines the number of SYN+ACK packets sent by the kernel before the kernel discards the connection.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,3,64,1,,yes
,net.ipv4.tcp_syn_retries,"Number of times that the local device retransmits TCP SYN packets due to timeout. The value cannot be greater than 255. This parameter is valid only for outgoing connections. For incoming connections, this parameter is controlled by tcp_retries1.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,3,64,1,,yes
,net.ipv4.tcp_moderate_rcvbuf,"Whether to adjust the receive buffer when receiving data
0: no adjustment
1: yes",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
1: yes",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.ipv4.tcp_timestamps,"Indicates whether to enable the calculation of the RTT in a more accurate way than timeout retransmission (see RFC 1323). This option should be enabled for better performance.
0: no
1: enabled",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
1: enabled",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.ipv4.tcp_dsack,"Indicates whether to allow TCP to send two identical SACKs.
0: disabled
1: enabled",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.ipv4.tcp_fack,Enables the forwarding acknowledgment. The selective acknowledgment (SACK) can be performed to reduce the occurrence of congestion. This option should also be enabled.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
1: enabled",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.ipv4.tcp_fack,Enables the forwarding acknowledgment. The selective acknowledgment (SACK) can be performed to reduce the occurrence of congestion. This option should also be enabled.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.ipv4.tcp_sack,"Indicates whether to enable the selective acknowledgment function. This function improves the performance by selectively responding to out-of-order received packets. In this way, the sender can send only lost packet segments. This function should be enabled for WAN communication, however, this increases the CPU usage.
0: no
1: enabled",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
1: enabled",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.ipv4.tcp_low_latency,"Allows the TCP/IP stack to adapt to low latency in high throughput scenarios. This option is generally disabled. (But when building a Beowulf cluster, it helps to open it.)
0: disabled
1: enabled",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.ipv4.tcp_adv_win_scale,Calculating the Buffer Overhead,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,4,1,,yes
,net.ipv4.route.max_size,"Maximum number of entries in the routing cache. If the number of entries in the routing cache exceeds the maximum, the old entries are cleared.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,67108864,2080374784,67108864,,yes
1: enabled",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.ipv4.tcp_adv_win_scale,Calculating the Buffer Overhead,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,4,1,,yes
,net.ipv4.route.max_size,"Maximum number of entries in the routing cache. If the number of entries in the routing cache exceeds the maximum, the old entries are cleared.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,67108864,2080374784,67108864,,yes
,net.ipv4.tcp_max_tw_buckets,"Reduce the number of TIME_WAIT connections to prevent excessive TIME_WAIT connections from occupying network resources and increasing the latency.
The default value is 2048. You are advised to change the value to 360000.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,32768,1048576,32768,,yes
The default value is 2048. You are advised to change the value to 360000.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,32768,1048576,32768,,yes
,net.ipv4.tcp_max_syn_backlog,"Indicates the length of the SYN queue. A larger queue length can accommodate more network connections waiting for connections.
The default value is 2048. You are advised to change the value to 8192.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,1024,262144,1024,,yes
,net.ipv4.tcp_max_orphans,"Number of sockets that can be processed by the system and do not belong to any process. When a large number of connections need to be quickly established, pay attention to this parameter.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,65536,16777216,65536,,yes
,net.ipv4.tcp_ecn,Indicates whether to enable the direct TCP congestion notification function. 0: disabled; 1: enabled,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1; 2,string,,,,,yes
The default value is 2048. You are advised to change the value to 8192.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,1024,262144,1024,,yes
,net.ipv4.tcp_max_orphans,"Number of sockets that can be processed by the system and do not belong to any process. When a large number of connections need to be quickly established, pay attention to this parameter.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,65536,16777216,65536,,yes
,net.ipv4.tcp_ecn,Indicates whether to enable the direct TCP congestion notification function. 0: disabled; 1: enabled,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1; 2,string,,,,,yes
,net.ipv4.ip_forward,"Indicates whether to enable IPv4 IP forwarding.
0: disabled
1: enabled",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.ipv4.conf.default.rp_filter,The kernel sets the policy for responding to ARP queries.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.ipv4.ip_local_port_range,The range of available ports has been increased to prevent performance deterioration caused by continuous search of available ports for new connections when a large number of connections occupy ports.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,32768 60999; 1024 65535; 8192 65535,string,,,,,yes
,net.ipv4.tcp_no_metrics_save,"After a TCP connection is closed, the saved parameters can be used to initialize the connection when the same connection is created next time as long as dst_entry is valid.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.ipv4.ip_default_ttl,Specifies the lifetime of IP packets sent from the local device. The value is an integer ranging from 0 to 128. The default value is 64.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,8,128,8,,yes
,net.ipv4.ip_no_pmtu_disc,Setting the MTU for Automatic Socket Detection,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.ipv4.tcp_retries2,The number of retries required before discarding an active (established traffic condition) TCP connection. The default value is 15.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,3,30,1,,yes
,net.ipv4.tcp_orphan_retries,Number of retries before the local end discards the TCP connection. The default value is 7.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,15,1,,yes
,net.ipv4.tcp_syncookies,Indicates whether to enable the TCP synchronization label (syncookie).,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.ipv4.tcp_reordering,Maximum number of reordered data packets in TCP flows,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,2,10,1,,yes
,net.ipv4.tcp_retrans_collapse,"Provides compatibility for bugs on some printers. (Generally, this support is not required. You can disable it.)",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.ipv4.tcp_congestion_control,TCP congestion scheduling algorithm,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,cubic; reno; bbr,string,,,,,yes
1: enabled",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.ipv4.conf.default.rp_filter,The kernel sets the policy for responding to ARP queries.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.ipv4.ip_local_port_range,The range of available ports has been increased to prevent performance deterioration caused by continuous search of available ports for new connections when a large number of connections occupy ports.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,32768 60999; 1024 65535; 8192 65535,string,,,,,yes
,net.ipv4.tcp_no_metrics_save,"After a TCP connection is closed, the saved parameters can be used to initialize the connection when the same connection is created next time as long as dst_entry is valid.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.ipv4.ip_default_ttl,Specifies the lifetime of IP packets sent from the local device. The value is an integer ranging from 0 to 128. The default value is 64.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,8,128,8,,yes
,net.ipv4.ip_no_pmtu_disc,Setting the MTU for Automatic Socket Detection,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.ipv4.tcp_retries2,The number of retries required before discarding an active (established traffic condition) TCP connection. The default value is 15.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,3,30,1,,yes
,net.ipv4.tcp_orphan_retries,Number of retries before the local end discards the TCP connection. The default value is 7.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,15,1,,yes
,net.ipv4.tcp_syncookies,Indicates whether to enable the TCP synchronization label (syncookie).,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.ipv4.tcp_reordering,Maximum number of reordered data packets in TCP flows,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,2,10,1,,yes
,net.ipv4.tcp_retrans_collapse,"Provides compatibility for bugs on some printers. (Generally, this support is not required. You can disable it.)",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.ipv4.tcp_congestion_control,TCP congestion scheduling algorithm,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,cubic; reno; bbr,string,,,,,yes
,net.ipv4.conf.default.promote_secondaries,"0: When the primary IP address of an interface is removed, all secondary IP addresses are deleted.
1: When the primary IP address of an interface is removed, the secondary IP address becomes the primary IP address.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
1: When the primary IP address of an interface is removed, the secondary IP address becomes the primary IP address.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.ipv4.conf.all.promote_secondaries,"0: When the primary IP address of an interface is removed, all secondary IP addresses are deleted.
1: When the primary IP address of an interface is removed, the secondary IP address becomes the primary IP address.",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
1: When the primary IP address of an interface is removed, the secondary IP address becomes the primary IP address.",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.ipv4.conf.all.accept_redirects,"Receives and sends ICMP redirection messages. The default value is True for hosts and False for routers.
0: disabled
1: yes",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
1: yes",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.ipv4.conf.default.accept_redirects,"Receives and sends ICMP redirection messages. The default value is True for hosts and False for routers.
0: disabled
1: yes",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
1: yes",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.ipv4.conf.all.secure_redirects,"Receives only ICMP redirect messages sent to gateways in the default gateway list.
0: disabled
1: yes",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
1: yes",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.ipv4.conf.default.secure_redirects,"Receives only ICMP redirect messages sent to gateways in the default gateway list.
0: disabled
1: yes",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
1: yes",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.ipv4.icmp_echo_ignore_broadcasts,"Ignore all received ICMP Echo request broadcasts.
0: not ignore
1: ignore",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.nf_conntrack_max,Maximum number of ip_conntrack structures in the memory,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,65536,1048576,65536,,yes
,net.netfilter.nf_conntrack_tcp_timeout_established,Timeout interval for TCP in the established state (s),sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,108000,1728000,108000,,yes
,net.netfilter.nf_conntrack_tcp_timeout_close_wait,Timeout interval for TCP in close wait state (s),sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,15,240,15,,yes
,net.netfilter.nf_conntrack_tcp_timeout_fin_wait,Timeout interval for TCP in the fin wait state (s),sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,30,480,30,,yes
,net.netfilter.nf_conntrack_tcp_timeout_time_wait,Timeout interval for TCP in time wait state (s),sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,30,480,30,,yes
1: ignore",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.nf_conntrack_max,Maximum number of ip_conntrack structures in the memory,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,65536,1048576,65536,,yes
,net.netfilter.nf_conntrack_tcp_timeout_established,Timeout interval for TCP in the established state (s),sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,108000,1728000,108000,,yes
,net.netfilter.nf_conntrack_tcp_timeout_close_wait,Timeout interval for TCP in close wait state (s),sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,15,240,15,,yes
,net.netfilter.nf_conntrack_tcp_timeout_fin_wait,Timeout interval for TCP in the fin wait state (s),sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,30,480,30,,yes
,net.netfilter.nf_conntrack_tcp_timeout_time_wait,Timeout interval for TCP in time wait state (s),sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,30,480,30,,yes
,net.ipv4.conf.default.forwarding,"Enable the forwarding function on the interface.
0: disabled
1: yes",sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.core.rps_sock_flow_entries,RFS (Receiver Flow Control) extends the performance of RPS to increase the CPU cache hit ratio and reduce network latency.,sysctl @name | awk '{print $3}',sysctl -w @name=$value,FALSE,discrete,,int,0,131072,1024,,yes
,net.ipv4.tcp_min_tso_segs,Minimal number of segments per TSO frame.,sysctl @name | awk '{print $4}',sysctl -w @name=$value,FALSE,continuous,,int,1,16,1,,yes
1: yes",sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,0; 1,string,,,,,yes
,net.core.rps_sock_flow_entries,RFS (Receiver Flow Control) extends the performance of RPS to increase the CPU cache hit ratio and reduce network latency.,sysctl -n @name,sysctl -w @name=$value,FALSE,discrete,,int,0,131072,1024,,yes
,net.ipv4.tcp_min_tso_segs,Minimal number of segments per TSO frame.,sysctl -n @name,sysctl -w @name=$value,FALSE,continuous,,int,1,16,1,,yes
others,login.UserTasksMax,Limit the maximum number of operating system tasks that can be run concurrently by each user,"cat /etc/systemd/logind.conf | grep -w ""^UserTasksMax"" | awk -F ""="" '{print$2}'","sed -i ""s/UserTasksMax=.*/UserTasksMax=$value/"" /etc/systemd/logind.conf",FALSE,continuous,,int,1024,1048576,,,yes
,ulimit.nofile,Maximum number of files that can be used by a user.,ulimit -n,ulimit -n $value,FALSE,discrete,,int,1024,10240,1,,yes
......@@ -12,9 +12,9 @@ object :
needrestart : "false"
type : "discrete"
scope :
- 1,048,576‬
- 1048576
- 536870912
step : 1,048,576‬
step : 1048576
items :
dtype : "int"
-
......@@ -26,9 +26,9 @@ object :
needrestart : "false"
type : "discrete"
scope :
- 1,048,576‬
- 1,048,576‬00
step : 1,048,576‬
- 1048576
- 104857600
step : 1048576
items :
dtype : "int"
-
......@@ -67,7 +67,7 @@ object :
type : "discrete"
scope :
- 256
- 1,048,576‬00
- 104857600
step : 1024
items :
dtype : "int"
......@@ -81,7 +81,7 @@ object :
type : "discrete"
scope :
- 1024
- 1,048,576‬00
- 104857600
step : 1024
items :
dtype : "int"
......@@ -95,7 +95,7 @@ object :
type : "discrete"
scope :
- 1024
- 1,048,576‬00
- 104857600
step : 1024
items :
dtype : "int"
......@@ -109,7 +109,7 @@ object :
type : "discrete"
scope :
- 1024
- 1,048,576‬00
- 104857600
step : 1024
items :
dtype : "int"
......@@ -147,7 +147,7 @@ object :
type : "discrete"
scope :
- 1024
- 1,048,576‬00
- 104857600
step : 1024
items :
dtype : "int"
......@@ -161,7 +161,7 @@ object :
type : "discrete"
scope :
- 1024
- 137,438,953,472‬
- 1.37E+11
step : 1024
items :
dtype : "int"
......@@ -174,8 +174,8 @@ object :
needrestart : "false"
type : "discrete"
scope :
- 1,048,576‬
- 1,048,576‬00
step : 1,048,576‬
- 1048576
- 104857600
step : 1048576
items :
dtype : "int"
......@@ -7,7 +7,7 @@ object :
name : "kernel.sched_migration_cost_ns"
info :
desc : "This variable is used to determine whether a process is still hot. If the running time of a process is shorter than the value of this variable, the kernel considers that the code of the process is still in the cache. Therefore, the process is still hot and is not considered during migration."
get : "sysctl kernel.sched_migration_cost_ns | awk '{print $3}'"
get : "sysctl -n kernel.sched_migration_cost_ns"
set : "sysctl -w kernel.sched_migration_cost_ns=$value"
needrestart : "false"
type : "discrete"
......@@ -21,7 +21,7 @@ object :
name : "kernel.sched_cfs_bandwidth_slice_us"
info :
desc : "Fixed size of the time slice applied for from the global time pool"
get : "sysctl kernel.sched_cfs_bandwidth_slice_us | awk '{print $3}'"
get : "sysctl -n kernel.sched_cfs_bandwidth_slice_us"
set : "sysctl -w kernel.sched_cfs_bandwidth_slice_us=$value"
needrestart : "false"
type : "discrete"
......@@ -35,7 +35,7 @@ object :
name : "kernel.sched_wakeup_granularity_ns"
info :
desc : "This variable indicates the base of the minimum time that a process should run after it is woken up. The smaller the base, the higher the probability of preemption."
get : "sysctl kernel.sched_wakeup_granularity_ns | awk '{print $3}'"
get : "sysctl -n kernel.sched_wakeup_granularity_ns"
set : "sysctl -w kernel.sched_wakeup_granularity_ns=$value"
needrestart : "false"
type : "discrete"
......@@ -49,7 +49,7 @@ object :
name : "kernel.sched_latency_ns"
info :
desc : "Maximum running time of a running process."
get : "sysctl kernel.sched_latency_ns | awk '{print $3}'"
get : "sysctl -n kernel.sched_latency_ns"
set : "sysctl -w kernel.sched_latency_ns=$value"
needrestart : "false"
type : "discrete"
......@@ -63,7 +63,7 @@ object :
name : "kernel.sched_nr_migrate"
info :
desc : "How Many Processes Can Be Moved to Another CPU at a Time When Load Balancing Is Performed in the Case of Multiple CPUs?"
get : "sysctl kernel.sched_nr_migrate | awk '{print $3}'"
get : "sysctl -n kernel.sched_nr_migrate"
set : "sysctl -w kernel.sched_nr_migrate=$value"
needrestart : "false"
type : "discrete"
......@@ -77,7 +77,7 @@ object :
name : "kernel.sched_min_granularity_ns"
info :
desc : "Minimum running time of a process on the CPU. During this time, the kernel does not proactively select other processes for scheduling (in nanoseconds)."
get : "sysctl kernel.sched_min_granularity_ns | awk '{print $3}'"
get : "sysctl -n kernel.sched_min_granularity_ns"
set : "sysctl -w kernel.sched_min_granularity_ns=$value"
needrestart : "false"
type : "discrete"
......@@ -91,7 +91,7 @@ object :
name : "kernel.sched_tunable_scaling"
info :
desc : "Update method used when the kernel attempts to adjust the values of sched_min_granularity, sched_latency, and sched_wakeup_granularity. The value 0 indicates that the value is not adjusted, and the value 1 indicates that the value is adjusted based on the number of CPUs, 2: The linear proportion is adjusted based on the number of CPUs."
get : "sysctl kernel.sched_tunable_scaling | awk '{print $3}'"
get : "sysctl -n kernel.sched_tunable_scaling"
set : "sysctl -w kernel.sched_tunable_scaling=$value"
needrestart : "false"
type : "discrete"
......@@ -133,7 +133,7 @@ object :
info :
desc : "Maximum number of tracing connections
When a container is used, the nf_conntrack module cannot be disabled. Therefore, kernel parameters related to nf_conntrack need to be added to the /etc/sysctl.conf file to prevent packet loss caused by full table records."
get : "sysctl net.netfilter.nf_conntrack_max | awk '{print $3}'"
get : "sysctl -n net.netfilter.nf_conntrack_max"
set : "sysctl -w net.netfilter.nf_conntrack_max=$value"
needrestart : "false"
type : "discrete"
......@@ -319,7 +319,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.pid_max"
info :
desc : "Maximum process ID."
get : "sysctl kernel.pid_max | awk '{print $3}'"
get : "sysctl -n kernel.pid_max"
set : "sysctl -w kernel.pid_max=$value"
needrestart : "false"
type : "discrete"
......@@ -333,7 +333,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.shmmni"
info :
desc : "Maximum number of shared memory segments in the system."
get : "sysctl kernel.shmmni | awk '{print $3}'"
get : "sysctl -n kernel.shmmni"
set : "sysctl -w kernel.shmmni=$value"
needrestart : "false"
type : "discrete"
......@@ -347,7 +347,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.shmmax"
info :
desc : "The maximum size, in bytes, of the shared memory segment allowed by the system."
get : "sysctl kernel.shmmax | awk '{print $3}'"
get : "sysctl -n kernel.shmmax"
set : "sysctl -w kernel.shmmax=$value"
needrestart : "false"
type : "discrete"
......@@ -361,7 +361,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.shmall"
info :
desc : "The total amount of shared memory available on the system in bytes"
get : "sysctl kernel.shmall | awk '{print $3}'"
get : "sysctl -n kernel.shmall"
set : "sysctl -w kernel.shmall=$value"
needrestart : "false"
type : "discrete"
......@@ -377,7 +377,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
desc : "Whether to add the application pid to the core file name as an extension.
0: no
1: add"
get : "sysctl kernel.core_uses_pid | awk '{print $3}'"
get : "sysctl -n kernel.core_uses_pid"
set : "sysctl -w kernel.core_uses_pid=$value"
needrestart : "false"
type : "discrete"
......@@ -389,7 +389,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.msgmni"
info :
desc : "System Message Queue Length"
get : "sysctl kernel.msgmni | awk '{print $3}'"
get : "sysctl -n kernel.msgmni"
set : "sysctl -w kernel.msgmni=$value"
needrestart : "false"
type : "discrete"
......@@ -403,7 +403,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.msgmax"
info :
desc : "Maximum number of bytes of a single message in a message queue."
get : "sysctl kernel.msgmax | awk '{print $3}'"
get : "sysctl -n kernel.msgmax"
set : "sysctl -w kernel.msgmax=$value"
needrestart : "false"
type : "discrete"
......@@ -417,7 +417,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.msgmnb"
info :
desc : "Maximum length of bytes in a single message queue"
get : "sysctl kernel.msgmnb | awk '{print $3}'"
get : "sysctl -n kernel.msgmnb"
set : "sysctl -w kernel.msgmnb=$value"
needrestart : "false"
type : "discrete"
......@@ -435,7 +435,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
2. Maximum number of signals in the system, =semmni*semmsl (semmns)
3. Maximum number of operations (maximum number of semaphores that can be invoked) contained in each system invoking (semopm)
4. Maximum number of signal types in the system. A signal identifier represents a type (semmni)."
get : "sysctl kernel.sem | awk '{print $3}'"
get : "sysctl -n kernel.sem"
set : "sysctl -w kernel.sem=$value"
needrestart : "false"
type : "discrete"
......@@ -448,7 +448,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.hung_task_timeout_secs"
info :
desc : "Timeout interval of a hung_task (in seconds). When a process is in the TASK_UNINTERRUPTIBLE state for a period longer than the timeout interval, a hung_task occurs."
get : "sysctl kernel.hung_task_timeout_secs | awk '{print $3}'"
get : "sysctl -n kernel.hung_task_timeout_secs"
set : "sysctl -w kernel.hung_task_timeout_secs=$value"
needrestart : "false"
type : "discrete"
......@@ -464,7 +464,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
desc : "Enabling nmi_watchdog
0: disabled
1: enabled"
get : "sysctl kernel.nmi_watchdog | awk '{print $3}'"
get : "sysctl -n kernel.nmi_watchdog"
set : "sysctl -w kernel.nmi_watchdog=$value"
needrestart : "false"
type : "discrete"
......@@ -476,7 +476,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.sched_rt_runtime_us"
info :
desc : "This parameter, together with sched_rt_period, determines the period of the real-time process."
get : "sysctl kernel.sched_rt_runtime_us | awk '{print $3}'"
get : "sysctl -n kernel.sched_rt_runtime_us"
set : "sysctl -w kernel.sched_rt_runtime_us=$value"
needrestart : "false"
type : "discrete"
......@@ -490,7 +490,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.timer_migration"
info :
desc : "Disable Clock Migration"
get : "sysctl kernel.timer_migration | awk '{print $3}'"
get : "sysctl -n kernel.timer_migration"
set : "sysctl -w kernel.timer_migration=$value"
needrestart : "false"
type : "discrete"
......@@ -502,7 +502,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.threads-max"
info :
desc : "Maximum number of processes (including threads) in the system"
get : "sysctl kernel.threads-max | awk '{print $3}'"
get : "sysctl -n kernel.threads-max"
set : "sysctl -w kernel.threads-max=$value"
needrestart : "false"
type : "discrete"
......@@ -516,7 +516,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.sysrq"
info :
desc : "The file specifies a non-zero value, which activates the sysrq key on the keyboard."
get : "sysctl kernel.sysrq | awk '{print $3}'"
get : "sysctl -n kernel.sysrq"
set : "sysctl -w kernel.sysrq=$value"
needrestart : "false"
type : "discrete"
......@@ -530,7 +530,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
desc : "When enabled, the kernel creates task groups to optimize desktop program scheduling.
0: disabled
1: enabled"
get : "sysctl kernel.sched_autogroup_enabled | awk '{print $3}'"
get : "sysctl -n kernel.sched_autogroup_enabled"
set : "sysctl -w kernel.sched_autogroup_enabled=$value"
needrestart : "false"
type : "discrete"
......@@ -542,7 +542,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.numa_balancing"
info :
desc : "Specifies whether to enable NUMA automatic balancing."
get : "sysctl kernel.numa_balancing | awk '{print $3}'"
get : "sysctl -n kernel.numa_balancing"
set : "sysctl -w kernel.numa_balancing=$value"
needrestart : "false"
type : "discrete"
......@@ -554,7 +554,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.randomize_va_space"
info :
desc : "Setting Memory Address Randomization"
get : "sysctl kernel.randomize_va_space | awk '{print $3}'"
get : "sysctl -n kernel.randomize_va_space"
set : "sysctl -w kernel.randomize_va_space=$value"
needrestart : "false"
type : "discrete"
......@@ -570,7 +570,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
desc : "Which users are restricted from viewing syslogs?
0: no restriction
1: Only privileged users can view the information."
get : "sysctl kernel.dmesg_restrict | awk '{print $4}'"
get : "sysctl -n kernel.dmesg_restrict"
set : "sysctl -w kernel.dmesg_restrict=$value"
needrestart : "false"
type : "discrete"
......@@ -582,7 +582,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.swappiness"
info :
desc : "A larger value indicates that the swap partition is used more actively. A smaller value indicates that the memory is used more actively."
get : "sysctl vm.swappiness | awk '{print $3}'"
get : "sysctl -n vm.swappiness"
set : "sysctl -w vm.swappiness=$value"
needrestart : "false"
type : "discrete"
......@@ -596,7 +596,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.vfs_cache_pressure"
info :
desc : "Indicates the tendency of the kernel to reclaim the memory used for directory and inode cache."
get : "sysctl vm.vfs_cache_pressure | awk '{print $3}'"
get : "sysctl -n vm.vfs_cache_pressure"
set : "sysctl -w vm.vfs_cache_pressure=$value"
needrestart : "false"
type : "discrete"
......@@ -610,7 +610,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.dirty_background_ratio"
info :
desc : "When the percentage of dirty pages reaches dirty_background_ratio, the write function wakes up the flusher thread of the kernel to write back dirty page data until the percentage is less than the value of dirty_background_ratio."
get : "sysctl vm.dirty_background_ratio | awk '{print $3}'"
get : "sysctl -n vm.dirty_background_ratio"
set : "sysctl -w vm.dirty_background_ratio=$value"
needrestart : "false"
type : "discrete"
......@@ -624,7 +624,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.dirty_ratio"
info :
desc : "The percentage of dirty data in the memory cannot exceed this value."
get : "sysctl vm.dirty_ratio | awk '{print $3}'"
get : "sysctl -n vm.dirty_ratio"
set : "sysctl -w vm.dirty_ratio=$value"
needrestart : "false"
type : "discrete"
......@@ -638,7 +638,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.stat_interval"
info :
desc : "VM information update frequency (in seconds)"
get : "sysctl vm.stat_interval | awk '{print $3}'"
get : "sysctl -n vm.stat_interval"
set : "sysctl -w vm.stat_interval=$value"
needrestart : "false"
type : "discrete"
......@@ -652,7 +652,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.dirty_expire_centisecs"
info :
desc : "Expiration time of dirty data. When the flusher thread of the kernel is woken up after the expiration time, dirty data is written back to the disk. The unit is 1% second."
get : "sysctl vm.dirty_expire_centisecs | awk '{print $3}'"
get : "sysctl -n vm.dirty_expire_centisecs"
set : "sysctl -w vm.dirty_expire_centisecs=$value"
needrestart : "false"
type : "discrete"
......@@ -666,7 +666,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.dirty_writeback_centisecs"
info :
desc : "Sets the interval for waking up the flusher kernel thread. This thread is used to write dirty pages back to the disk. The unit is 1% second."
get : "sysctl vm.dirty_writeback_centisecs | awk '{print $3}'"
get : "sysctl -n vm.dirty_writeback_centisecs"
set : "sysctl -w vm.dirty_writeback_centisecs=$value"
needrestart : "false"
type : "discrete"
......@@ -680,7 +680,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.overcommit_ratio"
info :
desc : "When overcommit_memory is set to 2, the percentage of physical RAM that is considered is set."
get : "sysctl vm.overcommit_ratio | awk '{print $3}'"
get : "sysctl -n vm.overcommit_ratio"
set : "sysctl -w vm.overcommit_ratio=$value"
needrestart : "false"
type : "discrete"
......@@ -694,7 +694,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.overcommit_memory"
info :
desc : "Indicates whether to allow excessive memory allocation. The process can allocate more memory than it actually uses."
get : "sysctl vm.overcommit_memory | awk '{print $3}'"
get : "sysctl -n vm.overcommit_memory"
set : "sysctl -w vm.overcommit_memory=$value"
needrestart : "false"
type : "discrete"
......@@ -706,7 +706,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.min_free_kbytes"
info :
desc : "Size of memory reserved in each memory area, in KB."
get : "sysctl vm.min_free_kbytes | awk '{print $3}'"
get : "sysctl -n vm.min_free_kbytes"
set : "sysctl -w vm.min_free_kbytes=$value"
needrestart : "false"
type : "discrete"
......@@ -720,7 +720,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.page-cluster"
info :
desc : "Number of pages written to the swap partition each time."
get : "sysctl vm.page-cluster | awk '{print $3}'"
get : "sysctl -n vm.page-cluster"
set : "sysctl -w vm.page-cluster=$value"
needrestart : "false"
type : "discrete"
......@@ -734,7 +734,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.max_map_count"
info :
desc : "Defines the maximum memory area that a process can have."
get : "sysctl vm.max_map_count | awk '{print $3}'"
get : "sysctl -n vm.max_map_count"
set : "sysctl -w vm.max_map_count=$value"
needrestart : "false"
type : "discrete"
......@@ -748,7 +748,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.zone_reclaim_mode"
info :
desc : "This parameter is valid only when CONFIG_NUMA is enabled. zone_reclaim_mode is used to control how to reclaim memory when the memory domain OOM is enabled."
get : "sysctl vm.zone_reclaim_mode | awk '{print $3}'"
get : "sysctl -n vm.zone_reclaim_mode"
set : "sysctl -w vm.zone_reclaim_mode=$value"
needrestart : "false"
type : "discrete"
......@@ -762,7 +762,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.watermark_scale_factor"
info :
desc : "Controls the radical degree of the kswapd process, that is, how much memory needs to be released for the system (NUMA node) from wakeup to hibernation."
get : "sysctl vm.watermark_scale_factor | awk '{print $3}'"
get : "sysctl -n vm.watermark_scale_factor"
set : "sysctl -w vm.watermark_scale_factor=$value"
needrestart : "false"
type : "discrete"
......@@ -776,7 +776,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.numa_stat"
info :
desc : "This command is used to set the data statistics during NUMA running. When the memory is insufficient, this command can be set to 0 to reduce the statistics precision."
get : "sysctl vm.numa_stat | awk '{print $3}'"
get : "sysctl -n vm.numa_stat"
set : "sysctl -w vm.numa_stat=$value"
needrestart : "false"
type : "discrete"
......@@ -788,7 +788,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.drop_caches"
info :
desc : "Releases the cache. The cache is released each time the parameter is modified."
get : "sysctl vm.drop_caches | awk '{print $3}'"
get : "sysctl -n vm.drop_caches"
set : "sysctl -w vm.drop_caches=$value"
needrestart : "false"
type : "discrete"
......@@ -801,7 +801,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "fs.inotify.max_user_watches"
info :
desc : "Sets the number of processes for each user to run the inotifywait or inotifywatch command."
get : "sysctl fs.inotify.max_user_watches | awk '{print $3}'"
get : "sysctl -n fs.inotify.max_user_watches"
set : "sysctl -w fs.inotify.max_user_watches=$value"
needrestart : "false"
type : "discrete"
......@@ -815,7 +815,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "fs.nr_open"
info :
desc : "Maximum number of file handles that can be concurrently opened by a process"
get : "sysctl fs.nr_open | awk '{print $3}'"
get : "sysctl -n fs.nr_open"
set : "sysctl -w fs.nr_open=$value"
needrestart : "false"
type : "discrete"
......@@ -829,7 +829,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "fs.file-max"
info :
desc : "Number of file handles that can be opened by all processes in the system at the same time"
get : "sysctl fs.file-max | awk '{print $3}'"
get : "sysctl -n fs.file-max"
set : "sysctl -w fs.file-max=$value"
needrestart : "false"
type : "discrete"
......@@ -843,7 +843,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "fs.aio-max-nr"
info :
desc : "Maximum number of AIO requests"
get : "sysctl fs.aio-max-nr | awk '{print $3}'"
get : "sysctl -n fs.aio-max-nr"
set : "sysctl -w fs.aio-max-nr=$value"
needrestart : "false"
type : "discrete"
......@@ -857,7 +857,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "fs.inotify.max_user_watches"
info :
desc : "Maximum number of monitoring instances"
get : "sysctl fs.inotify.max_user_watches | awk '{print $3}'"
get : "sysctl -n fs.inotify.max_user_watches"
set : "sysctl -w fs.inotify.max_user_watches=$value"
needrestart : "false"
type : "discrete"
......@@ -871,7 +871,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "fs.inotify.max_user_instances"
info :
desc : "Maximum number of inotify instances that can be started by each user"
get : "sysctl fs.inotify.max_user_instances | awk '{print $3}'"
get : "sysctl -n fs.inotify.max_user_instances"
set : "sysctl -w fs.inotify.max_user_instances=$value"
needrestart : "false"
type : "discrete"
......@@ -888,7 +888,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
0: default
1: debug
2: suidsafe"
get : "sysctl fs.suid_dumpable | awk '{print $3}'"
get : "sysctl -n fs.suid_dumpable"
set : "sysctl -w fs.suid_dumpable=$value"
needrestart : "false"
type : "discrete"
......@@ -1067,14 +1067,15 @@ This parameter specifies the number of read requests that can be sent after the
name : "block.scheduler"
info :
desc : "Configure I/O scheduling. Deadline or noop is more suitable for MySQL database scenarios."
get : "cat /sys/block/sda/queue/scheduler"
get : "cat /sys/block/sda/queue/scheduler | sed -n 's/.*\[\(.*\)\].*/\1/p'"
set : "echo $value > /sys/block/sda/queue/scheduler"
needrestart : "false"
type : "discrete"
options :
- "deadline"
- "cfq"
- "noop"
- "mq-deadline"
- "kyber"
- "bfq"
- "none"
dtype : "string"
-
name : "block.write_cache"
......@@ -1105,7 +1106,7 @@ This parameter specifies the number of read requests that can be sent after the
name : "net.core.netdev_budget"
info :
desc : "Number of network packets processed in each software interrupt"
get : "sysctl net.core.netdev_budget | awk '{print $3}'"
get : "sysctl -n net.core.netdev_budget"
set : "sysctl -w net.core.netdev_budget=$value"
needrestart : "false"
type : "discrete"
......@@ -1119,7 +1120,7 @@ This parameter specifies the number of read requests that can be sent after the
name : "net.core.optmem_max"
info :
desc : "Maximum size of the buffer allowed by each socket(in bytes)."
get : "sysctl net.core.optmem_max | awk '{print $3}'"
get : "sysctl -n net.core.optmem_max"
set : "sysctl -w net.core.optmem_max=$value"
needrestart : "false"
type : "discrete"
......@@ -1134,7 +1135,7 @@ This parameter specifies the number of read requests that can be sent after the
info :
desc : "The maximum size of the system socket write buffer is increased to prevent buffer overflow caused by a large number of new connections. As a result, connections cannot be established.
The default value is 229376. You are advised to change the value to 16777216."
get : "sysctl net.core.wmem_max | awk '{print $3}'"
get : "sysctl -n net.core.wmem_max"
set : "sysctl -w net.core.wmem_max=$value"
needrestart : "false"
type : "discrete"
......@@ -1148,7 +1149,7 @@ The default value is 229376. You are advised to change the value to 16777216."
name : "net.core.wmem_default"
info :
desc : "Default TCP send window size (bytes)"
get : "sysctl net.core.wmem_default | awk '{print $3}'"
get : "sysctl -n net.core.wmem_default"
set : "sysctl -w net.core.wmem_default=$value"
needrestart : "false"
type : "discrete"
......@@ -1162,7 +1163,7 @@ The default value is 229376. You are advised to change the value to 16777216."
name : "net.core.rmem_default"
info :
desc : "Sets the default buffer size (bytes) of the receive socket."
get : "sysctl net.core.rmem_default | awk '{print $3}'"
get : "sysctl -n net.core.rmem_default"
set : "sysctl -w net.core.rmem_default=$value"
needrestart : "false"
type : "discrete"
......@@ -1177,7 +1178,7 @@ The default value is 229376. You are advised to change the value to 16777216."
info :
desc : "Maximum system socket read buffer
The default value is 229376. You are advised to change the value to 16777216."
get : "sysctl net.core.rmem_max | awk '{print $3}'"
get : "sysctl -n net.core.rmem_max"
set : "sysctl -w net.core.rmem_max=$value"
needrestart : "false"
type : "discrete"
......@@ -1191,7 +1192,7 @@ The default value is 229376. You are advised to change the value to 16777216."
name : "net.core.netdev_max_backlog"
info :
desc : "Maximum number of packets that can be sent to the queue when each network interface receives packets faster than the kernel processes them"
get : "sysctl net.core.netdev_max_backlog | awk '{print $3}'"
get : "sysctl -n net.core.netdev_max_backlog"
set : "sysctl -w net.core.netdev_max_backlog=$value"
needrestart : "false"
type : "discrete"
......@@ -1205,7 +1206,7 @@ The default value is 229376. You are advised to change the value to 16777216."
name : "net.ipv4.tcp_thin_linear_timeouts"
info :
desc : "Check whether the TCP stream is thin after the retransmission times out."
get : "sysctl net.ipv4.tcp_thin_linear_timeouts | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_thin_linear_timeouts"
set : "sysctl -w net.ipv4.tcp_thin_linear_timeouts=$value"
needrestart : "false"
type : "discrete"
......@@ -1217,7 +1218,7 @@ The default value is 229376. You are advised to change the value to 16777216."
name : "net.unix.max_dgram_qlen"
info :
desc : "Maximum number of datagrams in a UDP queue"
get : "sysctl net.unix.max_dgram_qlen | awk '{print $3}'"
get : "sysctl -n net.unix.max_dgram_qlen"
set : "sysctl -w net.unix.max_dgram_qlen=$value"
needrestart : "false"
type : "discrete"
......@@ -1232,7 +1233,7 @@ The default value is 229376. You are advised to change the value to 16777216."
info :
desc : "Defines the maximum length of the listening queue of each port in the system. This is a global parameter.
The default value is 128. You are advised to change the value to 1024."
get : "sysctl net.core.somaxconn | awk '{print $3}'"
get : "sysctl -n net.core.somaxconn"
set : "sysctl -w net.core.somaxconn=$value"
needrestart : "false"
type : "discrete"
......@@ -1246,7 +1247,7 @@ The default value is 128. You are advised to change the value to 1024."
name : "net.core.busy_poll"
info :
desc : "Timeout interval for performing the poll and select operations on network devices (us) by default. The value is determined by the number of sockets."
get : "sysctl net.core.busy_poll | awk '{print $3}'"
get : "sysctl -n net.core.busy_poll"
set : "sysctl -w net.core.busy_poll=$value"
needrestart : "false"
type : "discrete"
......@@ -1260,7 +1261,7 @@ The default value is 128. You are advised to change the value to 1024."
name : "net.core.busy_read"
info :
desc : "Timeout interval for reading data frames in the device frame queue (us) by default. The recommended value is 50."
get : "sysctl net.core.busy_read | awk '{print $3}'"
get : "sysctl -n net.core.busy_read"
set : "sysctl -w net.core.busy_read=$value"
needrestart : "false"
type : "discrete"
......@@ -1274,7 +1275,7 @@ The default value is 128. You are advised to change the value to 1024."
name : "net.core.dev_weight"
info :
desc : "Maximum number of network packets that can be processed by each CPU in an NAPI interrupt"
get : "sysctl net.core.dev_weight | awk '{print $3}'"
get : "sysctl -n net.core.dev_weight"
set : "sysctl -w net.core.dev_weight=$value"
needrestart : "false"
type : "discrete"
......@@ -1288,7 +1289,7 @@ The default value is 128. You are advised to change the value to 1024."
name : "net.ipv4.tcp_keepalive_intvl"
info :
desc : "Indicates the frequency of sending TCP probe packets. The value multiplied by tcp_keepalive_probes indicates the duration when no TCP connection is available."
get : "sysctl net.ipv4.tcp_keepalive_intvl | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_keepalive_intvl"
set : "sysctl -w net.ipv4.tcp_keepalive_intvl=$value"
needrestart : "false"
type : "discrete"
......@@ -1302,7 +1303,7 @@ The default value is 128. You are advised to change the value to 1024."
name : "net.ipv4.tcp_keepalive_probes"
info :
desc : "This file indicates the maximum number of times that TCP keepalive detection is performed before a TCP connection is discarded. Keep-alive connections are sent only when the SO_KEEPALIVE socket option is turned on."
get : "sysctl net.ipv4.tcp_keepalive_probes | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_keepalive_probes"
set : "sysctl -w net.ipv4.tcp_keepalive_probes=$value"
needrestart : "false"
type : "discrete"
......@@ -1316,7 +1317,7 @@ The default value is 128. You are advised to change the value to 1024."
name : "net.ipv4.tcp_keepalive_time"
info :
desc : "Interval for sending keepalive detection messages(in seconds). This parameter is used to check whether the TCP connection is valid."
get : "sysctl net.ipv4.tcp_keepalive_time | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_keepalive_time"
set : "sysctl -w net.ipv4.tcp_keepalive_time=$value"
needrestart : "false"
type : "discrete"
......@@ -1330,7 +1331,7 @@ The default value is 128. You are advised to change the value to 1024."
name : "net.ipv4.tcp_tw_reuse"
info :
desc : "The value 1 indicates that TIME-WAIT sockets can be used for new TCP connections, and the value 0 indicates that TIME-WAIT sockets are disabled."
get : "sysctl net.ipv4.tcp_tw_reuse | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_tw_reuse"
set : "sysctl -w net.ipv4.tcp_tw_reuse=$value"
needrestart : "false"
type : "discrete"
......@@ -1343,7 +1344,7 @@ The default value is 128. You are advised to change the value to 1024."
name : "net.ipv4.tcp_window_scaling"
info :
desc : "The window scaling defined in RFC 1323 is enabled. To support a TCP window larger than 64 KB, this parameter must be set to 1. The maximum size of a TCP window is 1 GB. This parameter takes effect only when both parties of a TCP connection are enabled."
get : "sysctl net.ipv4.tcp_window_scaling | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_window_scaling"
set : "sysctl -w net.ipv4.tcp_window_scaling=$value"
needrestart : "false"
type : "discrete"
......@@ -1355,7 +1356,7 @@ The default value is 128. You are advised to change the value to 1024."
name : "net.ipv4.tcp_fin_timeout"
info :
desc : "Maximum duration for a socket to remain in the FIN_WAIT_2 state."
get : "sysctl net.ipv4.tcp_fin_timeout | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_fin_timeout"
set : "sysctl -w net.ipv4.tcp_fin_timeout=$value"
needrestart : "false"
type : "discrete"
......@@ -1372,7 +1373,7 @@ The default value is 128. You are advised to change the value to 1024."
low: When the number of memory pages used by UDP is less than the value of this parameter, UDP does not release memory.
assure: When the number of memory pages used by UDP exceeds the value of this parameter, UDP attempts to stabilize the memory usage and enters the pressure mode. When the memory usage is less than the value of low, UDP exits the pressure mode.
high: indicates the number of pages that can be used by all UDP sockets to queue and buffer datagrams."
get : "sysctl net.ipv4.udp_mem | awk '{print $3}'"
get : "sysctl -n net.ipv4.udp_mem"
set : "sysctl -w net.ipv4.udp_mem=$value"
needrestart : "false"
type : "discrete"
......@@ -1385,7 +1386,7 @@ high: indicates the number of pages that can be used by all UDP sockets to queue
name : "net.ipv4.tcp_mem"
info :
desc : "TCP overall cache setting, which controls all TCP memory usage (in pages). The parameter indicates the no-pressure value of the TCP overall memory, the threshold for enabling the pressure mode, and the maximum usage value in sequence. This parameter is used to control whether the new cache is successfully allocated."
get : "sysctl net.ipv4.tcp_mem | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_mem"
set : "sysctl -w net.ipv4.tcp_mem=$value"
needrestart : "false"
type : "discrete"
......@@ -1397,7 +1398,7 @@ high: indicates the number of pages that can be used by all UDP sockets to queue
name : "net.ipv4.tcp_rmem"
info :
desc : "Size of the read buffer. The first value is the minimum value of the read buffer, the third value is the maximum value, and the middle value is the default value. The default value is 4096 87380 6291456. You are advised to change the value to 4096 87380 16777216."
get : "sysctl net.ipv4.tcp_rmem | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_rmem"
set : "sysctl -w net.ipv4.tcp_rmem=$value"
needrestart : "false"
type : "discrete"
......@@ -1410,7 +1411,7 @@ high: indicates the number of pages that can be used by all UDP sockets to queue
name : "net.ipv4.tcp_wmem"
info :
desc : "Size of the write buffer. The first value is the minimum value of the read buffer, the third value is the maximum value, and the middle value is the default value. The default value is 4096 16384 4194304. You are advised to change the value to 4096 65536 16777216."
get : "sysctl net.ipv4.tcp_wmem | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_wmem"
set : "sysctl -w net.ipv4.tcp_wmem=$value"
needrestart : "false"
type : "discrete"
......@@ -1423,7 +1424,7 @@ high: indicates the number of pages that can be used by all UDP sockets to queue
name : "net.ipv4.tcp_fastopen"
info :
desc : "Whether to enable the TCP quick open mode is to avoid the three-way handshake of hot requests. This greatly improves the performance in the scenario where small objects are moved."
get : "sysctl net.ipv4.tcp_fastopen | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_fastopen"
set : "sysctl -w net.ipv4.tcp_fastopen=$value"
needrestart : "false"
type : "discrete"
......@@ -1437,7 +1438,7 @@ high: indicates the number of pages that can be used by all UDP sockets to queue
info :
desc : "For the remote connection request SYN, the kernel sends a SYN + ACK packet to acknowledge the receipt of the previous SYN connection request packet.
It's called a three-way handshake. This parameter determines the number of SYN+ACK packets sent by the kernel before the kernel discards the connection."
get : "sysctl net.ipv4.tcp_synack_retries | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_synack_retries"
set : "sysctl -w net.ipv4.tcp_synack_retries=$value"
needrestart : "false"
type : "discrete"
......@@ -1451,7 +1452,7 @@ It's called a three-way handshake. This parameter determines the number of SYN+A
name : "net.ipv4.tcp_syn_retries"
info :
desc : "Number of times that the local device retransmits TCP SYN packets due to timeout. The value cannot be greater than 255. This parameter is valid only for outgoing connections. For incoming connections, this parameter is controlled by tcp_retries1."
get : "sysctl net.ipv4.tcp_syn_retries | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_syn_retries"
set : "sysctl -w net.ipv4.tcp_syn_retries=$value"
needrestart : "false"
type : "discrete"
......@@ -1467,7 +1468,7 @@ It's called a three-way handshake. This parameter determines the number of SYN+A
desc : "Whether to adjust the receive buffer when receiving data
0: no adjustment
1: yes"
get : "sysctl net.ipv4.tcp_moderate_rcvbuf | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_moderate_rcvbuf"
set : "sysctl -w net.ipv4.tcp_moderate_rcvbuf=$value"
needrestart : "false"
type : "discrete"
......@@ -1481,7 +1482,7 @@ It's called a three-way handshake. This parameter determines the number of SYN+A
desc : "Indicates whether to enable the calculation of the RTT in a more accurate way than timeout retransmission (see RFC 1323). This option should be enabled for better performance.
0: no
1: enabled"
get : "sysctl net.ipv4.tcp_timestamps | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_timestamps"
set : "sysctl -w net.ipv4.tcp_timestamps=$value"
needrestart : "false"
type : "discrete"
......@@ -1495,7 +1496,7 @@ It's called a three-way handshake. This parameter determines the number of SYN+A
desc : "Indicates whether to allow TCP to send two identical SACKs.
0: disabled
1: enabled"
get : "sysctl net.ipv4.tcp_dsack | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_dsack"
set : "sysctl -w net.ipv4.tcp_dsack=$value"
needrestart : "false"
type : "discrete"
......@@ -1507,7 +1508,7 @@ It's called a three-way handshake. This parameter determines the number of SYN+A
name : "net.ipv4.tcp_fack"
info :
desc : "Enables the forwarding acknowledgment. The selective acknowledgment (SACK) can be performed to reduce the occurrence of congestion. This option should also be enabled."
get : "sysctl net.ipv4.tcp_fack | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_fack"
set : "sysctl -w net.ipv4.tcp_fack=$value"
needrestart : "false"
type : "discrete"
......@@ -1521,7 +1522,7 @@ It's called a three-way handshake. This parameter determines the number of SYN+A
desc : "Indicates whether to enable the selective acknowledgment function. This function improves the performance by selectively responding to out-of-order received packets. In this way, the sender can send only lost packet segments. This function should be enabled for WAN communication, however, this increases the CPU usage.
0: no
1: enabled"
get : "sysctl net.ipv4.tcp_sack | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_sack"
set : "sysctl -w net.ipv4.tcp_sack=$value"
needrestart : "false"
type : "discrete"
......@@ -1535,7 +1536,7 @@ It's called a three-way handshake. This parameter determines the number of SYN+A
desc : "Allows the TCP/IP stack to adapt to low latency in high throughput scenarios. This option is generally disabled. (But when building a Beowulf cluster, it helps to open it.)
0: disabled
1: enabled"
get : "sysctl net.ipv4.tcp_low_latency | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_low_latency"
set : "sysctl -w net.ipv4.tcp_low_latency=$value"
needrestart : "false"
type : "discrete"
......@@ -1547,7 +1548,7 @@ It's called a three-way handshake. This parameter determines the number of SYN+A
name : "net.ipv4.tcp_adv_win_scale"
info :
desc : "Calculating the Buffer Overhead"
get : "sysctl net.ipv4.tcp_adv_win_scale | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_adv_win_scale"
set : "sysctl -w net.ipv4.tcp_adv_win_scale=$value"
needrestart : "false"
type : "discrete"
......@@ -1561,7 +1562,7 @@ It's called a three-way handshake. This parameter determines the number of SYN+A
name : "net.ipv4.route.max_size"
info :
desc : "Maximum number of entries in the routing cache. If the number of entries in the routing cache exceeds the maximum, the old entries are cleared."
get : "sysctl net.ipv4.route.max_size | awk '{print $3}'"
get : "sysctl -n net.ipv4.route.max_size"
set : "sysctl -w net.ipv4.route.max_size=$value"
needrestart : "false"
type : "discrete"
......@@ -1576,7 +1577,7 @@ It's called a three-way handshake. This parameter determines the number of SYN+A
info :
desc : "Reduce the number of TIME_WAIT connections to prevent excessive TIME_WAIT connections from occupying network resources and increasing the latency.
The default value is 2048. You are advised to change the value to 360000."
get : "sysctl net.ipv4.tcp_max_tw_buckets | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_max_tw_buckets"
set : "sysctl -w net.ipv4.tcp_max_tw_buckets=$value"
needrestart : "false"
type : "discrete"
......@@ -1591,7 +1592,7 @@ The default value is 2048. You are advised to change the value to 360000."
info :
desc : "Indicates the length of the SYN queue. A larger queue length can accommodate more network connections waiting for connections.
The default value is 2048. You are advised to change the value to 8192."
get : "sysctl net.ipv4.tcp_max_syn_backlog | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_max_syn_backlog"
set : "sysctl -w net.ipv4.tcp_max_syn_backlog=$value"
needrestart : "false"
type : "discrete"
......@@ -1605,7 +1606,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.tcp_max_orphans"
info :
desc : "Number of sockets that can be processed by the system and do not belong to any process. When a large number of connections need to be quickly established, pay attention to this parameter."
get : "sysctl net.ipv4.tcp_max_orphans | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_max_orphans"
set : "sysctl -w net.ipv4.tcp_max_orphans=$value"
needrestart : "false"
type : "discrete"
......@@ -1619,7 +1620,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.tcp_ecn"
info :
desc : "Indicates whether to enable the direct TCP congestion notification function. 0: disabled; 1: enabled"
get : "sysctl net.ipv4.tcp_ecn | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_ecn"
set : "sysctl -w net.ipv4.tcp_ecn=$value"
needrestart : "false"
type : "discrete"
......@@ -1634,7 +1635,7 @@ The default value is 2048. You are advised to change the value to 8192."
desc : "Indicates whether to enable IPv4 IP forwarding.
0: disabled
1: enabled"
get : "sysctl net.ipv4.ip_forward | awk '{print $3}'"
get : "sysctl -n net.ipv4.ip_forward"
set : "sysctl -w net.ipv4.ip_forward=$value"
needrestart : "false"
type : "discrete"
......@@ -1646,7 +1647,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.conf.default.rp_filter"
info :
desc : "The kernel sets the policy for responding to ARP queries."
get : "sysctl net.ipv4.conf.default.rp_filter | awk '{print $3}'"
get : "sysctl -n net.ipv4.conf.default.rp_filter"
set : "sysctl -w net.ipv4.conf.default.rp_filter=$value"
needrestart : "false"
type : "discrete"
......@@ -1658,7 +1659,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.ip_local_port_range"
info :
desc : "The range of available ports has been increased to prevent performance deterioration caused by continuous search of available ports for new connections when a large number of connections occupy ports."
get : "sysctl net.ipv4.ip_local_port_range | awk '{print $3}'"
get : "sysctl -n net.ipv4.ip_local_port_range"
set : "sysctl -w net.ipv4.ip_local_port_range=$value"
needrestart : "false"
type : "discrete"
......@@ -1671,7 +1672,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.tcp_no_metrics_save"
info :
desc : "After a TCP connection is closed, the saved parameters can be used to initialize the connection when the same connection is created next time as long as dst_entry is valid."
get : "sysctl net.ipv4.tcp_no_metrics_save | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_no_metrics_save"
set : "sysctl -w net.ipv4.tcp_no_metrics_save=$value"
needrestart : "false"
type : "discrete"
......@@ -1683,7 +1684,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.ip_default_ttl"
info :
desc : "Specifies the lifetime of IP packets sent from the local device. The value is an integer ranging from 0 to 128. The default value is 64."
get : "sysctl net.ipv4.ip_default_ttl | awk '{print $3}'"
get : "sysctl -n net.ipv4.ip_default_ttl"
set : "sysctl -w net.ipv4.ip_default_ttl=$value"
needrestart : "false"
type : "discrete"
......@@ -1697,7 +1698,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.ip_no_pmtu_disc"
info :
desc : "Setting the MTU for Automatic Socket Detection"
get : "sysctl net.ipv4.ip_no_pmtu_disc | awk '{print $3}'"
get : "sysctl -n net.ipv4.ip_no_pmtu_disc"
set : "sysctl -w net.ipv4.ip_no_pmtu_disc=$value"
needrestart : "false"
type : "discrete"
......@@ -1709,7 +1710,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.tcp_retries2"
info :
desc : "The number of retries required before discarding an active (established traffic condition) TCP connection. The default value is 15."
get : "sysctl net.ipv4.tcp_retries2 | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_retries2"
set : "sysctl -w net.ipv4.tcp_retries2=$value"
needrestart : "false"
type : "discrete"
......@@ -1723,7 +1724,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.tcp_orphan_retries"
info :
desc : "Number of retries before the local end discards the TCP connection. The default value is 7."
get : "sysctl net.ipv4.tcp_orphan_retries | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_orphan_retries"
set : "sysctl -w net.ipv4.tcp_orphan_retries=$value"
needrestart : "false"
type : "discrete"
......@@ -1737,7 +1738,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.tcp_syncookies"
info :
desc : "Indicates whether to enable the TCP synchronization label (syncookie)."
get : "sysctl net.ipv4.tcp_syncookies | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_syncookies"
set : "sysctl -w net.ipv4.tcp_syncookies=$value"
needrestart : "false"
type : "discrete"
......@@ -1749,7 +1750,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.tcp_reordering"
info :
desc : "Maximum number of reordered data packets in TCP flows"
get : "sysctl net.ipv4.tcp_reordering | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_reordering"
set : "sysctl -w net.ipv4.tcp_reordering=$value"
needrestart : "false"
type : "discrete"
......@@ -1763,7 +1764,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.tcp_retrans_collapse"
info :
desc : "Provides compatibility for bugs on some printers. (Generally, this support is not required. You can disable it.)"
get : "sysctl net.ipv4.tcp_retrans_collapse | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_retrans_collapse"
set : "sysctl -w net.ipv4.tcp_retrans_collapse=$value"
needrestart : "false"
type : "discrete"
......@@ -1775,7 +1776,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.tcp_congestion_control"
info :
desc : "TCP congestion scheduling algorithm"
get : "sysctl net.ipv4.tcp_congestion_control | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_congestion_control"
set : "sysctl -w net.ipv4.tcp_congestion_control=$value"
needrestart : "false"
type : "discrete"
......@@ -1789,7 +1790,7 @@ The default value is 2048. You are advised to change the value to 8192."
info :
desc : "0: When the primary IP address of an interface is removed, all secondary IP addresses are deleted.
1: When the primary IP address of an interface is removed, the secondary IP address becomes the primary IP address."
get : "sysctl net.ipv4.conf.default.promote_secondaries | awk '{print $3}'"
get : "sysctl -n net.ipv4.conf.default.promote_secondaries"
set : "sysctl -w net.ipv4.conf.default.promote_secondaries=$value"
needrestart : "false"
type : "discrete"
......@@ -1802,7 +1803,7 @@ The default value is 2048. You are advised to change the value to 8192."
info :
desc : "0: When the primary IP address of an interface is removed, all secondary IP addresses are deleted.
1: When the primary IP address of an interface is removed, the secondary IP address becomes the primary IP address."
get : "sysctl net.ipv4.conf.all.promote_secondaries | awk '{print $3}'"
get : "sysctl -n net.ipv4.conf.all.promote_secondaries"
set : "sysctl -w net.ipv4.conf.all.promote_secondaries=$value"
needrestart : "false"
type : "discrete"
......@@ -1816,7 +1817,7 @@ The default value is 2048. You are advised to change the value to 8192."
desc : "Receives and sends ICMP redirection messages. The default value is True for hosts and False for routers.
0: disabled
1: yes"
get : "sysctl net.ipv4.conf.all.accept_redirects | awk '{print $3}'"
get : "sysctl -n net.ipv4.conf.all.accept_redirects"
set : "sysctl -w net.ipv4.conf.all.accept_redirects=$value"
needrestart : "false"
type : "discrete"
......@@ -1830,7 +1831,7 @@ The default value is 2048. You are advised to change the value to 8192."
desc : "Receives and sends ICMP redirection messages. The default value is True for hosts and False for routers.
0: disabled
1: yes"
get : "sysctl net.ipv4.conf.default.accept_redirects | awk '{print $3}'"
get : "sysctl -n net.ipv4.conf.default.accept_redirects"
set : "sysctl -w net.ipv4.conf.default.accept_redirects=$value"
needrestart : "false"
type : "discrete"
......@@ -1844,7 +1845,7 @@ The default value is 2048. You are advised to change the value to 8192."
desc : "Receives only ICMP redirect messages sent to gateways in the default gateway list.
0: disabled
1: yes"
get : "sysctl net.ipv4.conf.all.secure_redirects | awk '{print $3}'"
get : "sysctl -n net.ipv4.conf.all.secure_redirects"
set : "sysctl -w net.ipv4.conf.all.secure_redirects=$value"
needrestart : "false"
type : "discrete"
......@@ -1858,7 +1859,7 @@ The default value is 2048. You are advised to change the value to 8192."
desc : "Receives only ICMP redirect messages sent to gateways in the default gateway list.
0: disabled
1: yes"
get : "sysctl net.ipv4.conf.default.secure_redirects | awk '{print $3}'"
get : "sysctl -n net.ipv4.conf.default.secure_redirects"
set : "sysctl -w net.ipv4.conf.default.secure_redirects=$value"
needrestart : "false"
type : "discrete"
......@@ -1872,7 +1873,7 @@ The default value is 2048. You are advised to change the value to 8192."
desc : "Ignore all received ICMP Echo request broadcasts.
0: not ignore
1: ignore"
get : "sysctl net.ipv4.icmp_echo_ignore_broadcasts | awk '{print $3}'"
get : "sysctl -n net.ipv4.icmp_echo_ignore_broadcasts"
set : "sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=$value"
needrestart : "false"
type : "discrete"
......@@ -1884,7 +1885,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.nf_conntrack_max"
info :
desc : "Maximum number of ip_conntrack structures in the memory"
get : "sysctl net.nf_conntrack_max | awk '{print $3}'"
get : "sysctl -n net.nf_conntrack_max"
set : "sysctl -w net.nf_conntrack_max=$value"
needrestart : "false"
type : "discrete"
......@@ -1898,7 +1899,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.netfilter.nf_conntrack_tcp_timeout_established"
info :
desc : "Timeout interval for TCP in the established state (s)"
get : "sysctl net.netfilter.nf_conntrack_tcp_timeout_established | awk '{print $3}'"
get : "sysctl -n net.netfilter.nf_conntrack_tcp_timeout_established"
set : "sysctl -w net.netfilter.nf_conntrack_tcp_timeout_established=$value"
needrestart : "false"
type : "discrete"
......@@ -1912,7 +1913,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.netfilter.nf_conntrack_tcp_timeout_close_wait"
info :
desc : "Timeout interval for TCP in close wait state (s)"
get : "sysctl net.netfilter.nf_conntrack_tcp_timeout_close_wait | awk '{print $3}'"
get : "sysctl -n net.netfilter.nf_conntrack_tcp_timeout_close_wait"
set : "sysctl -w net.netfilter.nf_conntrack_tcp_timeout_close_wait=$value"
needrestart : "false"
type : "discrete"
......@@ -1926,7 +1927,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.netfilter.nf_conntrack_tcp_timeout_fin_wait"
info :
desc : "Timeout interval for TCP in the fin wait state (s)"
get : "sysctl net.netfilter.nf_conntrack_tcp_timeout_fin_wait | awk '{print $3}'"
get : "sysctl -n net.netfilter.nf_conntrack_tcp_timeout_fin_wait"
set : "sysctl -w net.netfilter.nf_conntrack_tcp_timeout_fin_wait=$value"
needrestart : "false"
type : "discrete"
......@@ -1940,7 +1941,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.netfilter.nf_conntrack_tcp_timeout_time_wait"
info :
desc : "Timeout interval for TCP in time wait state (s)"
get : "sysctl net.netfilter.nf_conntrack_tcp_timeout_time_wait | awk '{print $3}'"
get : "sysctl -n net.netfilter.nf_conntrack_tcp_timeout_time_wait"
set : "sysctl -w net.netfilter.nf_conntrack_tcp_timeout_time_wait=$value"
needrestart : "false"
type : "discrete"
......@@ -1956,7 +1957,7 @@ The default value is 2048. You are advised to change the value to 8192."
desc : "Enable the forwarding function on the interface.
0: disabled
1: yes"
get : "sysctl net.ipv4.conf.default.forwarding | awk '{print $3}'"
get : "sysctl -n net.ipv4.conf.default.forwarding"
set : "sysctl -w net.ipv4.conf.default.forwarding=$value"
needrestart : "false"
type : "discrete"
......@@ -1968,7 +1969,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.core.rps_sock_flow_entries"
info :
desc : "RFS (Receiver Flow Control) extends the performance of RPS to increase the CPU cache hit ratio and reduce network latency."
get : "sysctl net.core.rps_sock_flow_entries | awk '{print $3}'"
get : "sysctl -n net.core.rps_sock_flow_entries"
set : "sysctl -w net.core.rps_sock_flow_entries=$value"
needrestart : "false"
type : "discrete"
......@@ -1982,7 +1983,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.tcp_min_tso_segs"
info :
desc : "Minimal number of segments per TSO frame."
get : "sysctl net.ipv4.tcp_min_tso_segs | awk '{print $4}'"
get : "sysctl -n net.ipv4.tcp_min_tso_segs"
set : "sysctl -w net.ipv4.tcp_min_tso_segs=$value"
needrestart : "false"
type : "continuous"
......@@ -2587,9 +2588,9 @@ The default value is 2048. You are advised to change the value to 8192."
needrestart : "false"
type : "discrete"
scope :
- 1,048,576‬
- 1048576
- 536870912
step : 1,048,576‬
step : 1048576
items :
dtype : "int"
-
......@@ -2601,9 +2602,9 @@ The default value is 2048. You are advised to change the value to 8192."
needrestart : "false"
type : "discrete"
scope :
- 1,048,576‬
- 1,048,576‬00
step : 1,048,576‬
- 1048576
- 104857600
step : 1048576
items :
dtype : "int"
-
......@@ -2642,7 +2643,7 @@ The default value is 2048. You are advised to change the value to 8192."
type : "discrete"
scope :
- 256
- 1,048,576‬00
- 104857600
step : 1024
items :
dtype : "int"
......@@ -2656,7 +2657,7 @@ The default value is 2048. You are advised to change the value to 8192."
type : "discrete"
scope :
- 1024
- 1,048,576‬00
- 104857600
step : 1024
items :
dtype : "int"
......@@ -2670,7 +2671,7 @@ The default value is 2048. You are advised to change the value to 8192."
type : "discrete"
scope :
- 1024
- 1,048,576‬00
- 104857600
step : 1024
items :
dtype : "int"
......@@ -2684,7 +2685,7 @@ The default value is 2048. You are advised to change the value to 8192."
type : "discrete"
scope :
- 1024
- 1,048,576‬00
- 104857600
step : 1024
items :
dtype : "int"
......@@ -2722,7 +2723,7 @@ The default value is 2048. You are advised to change the value to 8192."
type : "discrete"
scope :
- 1024
- 1,048,576‬00
- 104857600
step : 1024
items :
dtype : "int"
......@@ -2736,7 +2737,7 @@ The default value is 2048. You are advised to change the value to 8192."
type : "discrete"
scope :
- 1024
- 137,438,953,472‬
- 1.37E+11
step : 1024
items :
dtype : "int"
......@@ -2749,9 +2750,9 @@ The default value is 2048. You are advised to change the value to 8192."
needrestart : "false"
type : "discrete"
scope :
- 1,048,576‬
- 1,048,576‬00
step : 1,048,576‬
- 1048576
- 104857600
step : 1048576
items :
dtype : "int"
-
......
......@@ -7,7 +7,7 @@ object :
name : "kernel.sched_migration_cost_ns"
info :
desc : "This variable is used to determine whether a process is still hot. If the running time of a process is shorter than the value of this variable, the kernel considers that the code of the process is still in the cache. Therefore, the process is still hot and is not considered during migration."
get : "sysctl kernel.sched_migration_cost_ns | awk '{print $3}'"
get : "sysctl -n kernel.sched_migration_cost_ns"
set : "sysctl -w kernel.sched_migration_cost_ns=$value"
needrestart : "false"
type : "discrete"
......@@ -21,7 +21,7 @@ object :
name : "kernel.sched_cfs_bandwidth_slice_us"
info :
desc : "Fixed size of the time slice applied for from the global time pool"
get : "sysctl kernel.sched_cfs_bandwidth_slice_us | awk '{print $3}'"
get : "sysctl -n kernel.sched_cfs_bandwidth_slice_us"
set : "sysctl -w kernel.sched_cfs_bandwidth_slice_us=$value"
needrestart : "false"
type : "discrete"
......@@ -35,7 +35,7 @@ object :
name : "kernel.sched_wakeup_granularity_ns"
info :
desc : "This variable indicates the base of the minimum time that a process should run after it is woken up. The smaller the base, the higher the probability of preemption."
get : "sysctl kernel.sched_wakeup_granularity_ns | awk '{print $3}'"
get : "sysctl -n kernel.sched_wakeup_granularity_ns"
set : "sysctl -w kernel.sched_wakeup_granularity_ns=$value"
needrestart : "false"
type : "discrete"
......@@ -49,7 +49,7 @@ object :
name : "kernel.sched_latency_ns"
info :
desc : "Maximum running time of a running process."
get : "sysctl kernel.sched_latency_ns | awk '{print $3}'"
get : "sysctl -n kernel.sched_latency_ns"
set : "sysctl -w kernel.sched_latency_ns=$value"
needrestart : "false"
type : "discrete"
......@@ -63,7 +63,7 @@ object :
name : "kernel.sched_nr_migrate"
info :
desc : "How Many Processes Can Be Moved to Another CPU at a Time When Load Balancing Is Performed in the Case of Multiple CPUs?"
get : "sysctl kernel.sched_nr_migrate | awk '{print $3}'"
get : "sysctl -n kernel.sched_nr_migrate"
set : "sysctl -w kernel.sched_nr_migrate=$value"
needrestart : "false"
type : "discrete"
......@@ -77,7 +77,7 @@ object :
name : "kernel.sched_min_granularity_ns"
info :
desc : "Minimum running time of a process on the CPU. During this time, the kernel does not proactively select other processes for scheduling (in nanoseconds)."
get : "sysctl kernel.sched_min_granularity_ns | awk '{print $3}'"
get : "sysctl -n kernel.sched_min_granularity_ns"
set : "sysctl -w kernel.sched_min_granularity_ns=$value"
needrestart : "false"
type : "discrete"
......@@ -91,7 +91,7 @@ object :
name : "kernel.sched_tunable_scaling"
info :
desc : "Update method used when the kernel attempts to adjust the values of sched_min_granularity, sched_latency, and sched_wakeup_granularity. The value 0 indicates that the value is not adjusted, and the value 1 indicates that the value is adjusted based on the number of CPUs, 2: The linear proportion is adjusted based on the number of CPUs."
get : "sysctl kernel.sched_tunable_scaling | awk '{print $3}'"
get : "sysctl -n kernel.sched_tunable_scaling"
set : "sysctl -w kernel.sched_tunable_scaling=$value"
needrestart : "false"
type : "discrete"
......@@ -133,7 +133,7 @@ object :
info :
desc : "Maximum number of tracing connections
When a container is used, the nf_conntrack module cannot be disabled. Therefore, kernel parameters related to nf_conntrack need to be added to the /etc/sysctl.conf file to prevent packet loss caused by full table records."
get : "sysctl net.netfilter.nf_conntrack_max | awk '{print $3}'"
get : "sysctl -n net.netfilter.nf_conntrack_max"
set : "sysctl -w net.netfilter.nf_conntrack_max=$value"
needrestart : "false"
type : "discrete"
......@@ -319,7 +319,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.pid_max"
info :
desc : "Maximum process ID."
get : "sysctl kernel.pid_max | awk '{print $3}'"
get : "sysctl -n kernel.pid_max"
set : "sysctl -w kernel.pid_max=$value"
needrestart : "false"
type : "discrete"
......@@ -333,7 +333,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.shmmni"
info :
desc : "Maximum number of shared memory segments in the system."
get : "sysctl kernel.shmmni | awk '{print $3}'"
get : "sysctl -n kernel.shmmni"
set : "sysctl -w kernel.shmmni=$value"
needrestart : "false"
type : "discrete"
......@@ -347,7 +347,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.shmmax"
info :
desc : "The maximum size, in bytes, of the shared memory segment allowed by the system."
get : "sysctl kernel.shmmax | awk '{print $3}'"
get : "sysctl -n kernel.shmmax"
set : "sysctl -w kernel.shmmax=$value"
needrestart : "false"
type : "discrete"
......@@ -361,7 +361,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.shmall"
info :
desc : "The total amount of shared memory available on the system in bytes"
get : "sysctl kernel.shmall | awk '{print $3}'"
get : "sysctl -n kernel.shmall"
set : "sysctl -w kernel.shmall=$value"
needrestart : "false"
type : "discrete"
......@@ -377,7 +377,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
desc : "Whether to add the application pid to the core file name as an extension.
0: no
1: add"
get : "sysctl kernel.core_uses_pid | awk '{print $3}'"
get : "sysctl -n kernel.core_uses_pid"
set : "sysctl -w kernel.core_uses_pid=$value"
needrestart : "false"
type : "discrete"
......@@ -389,7 +389,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.msgmni"
info :
desc : "System Message Queue Length"
get : "sysctl kernel.msgmni | awk '{print $3}'"
get : "sysctl -n kernel.msgmni"
set : "sysctl -w kernel.msgmni=$value"
needrestart : "false"
type : "discrete"
......@@ -403,7 +403,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.msgmax"
info :
desc : "Maximum number of bytes of a single message in a message queue."
get : "sysctl kernel.msgmax | awk '{print $3}'"
get : "sysctl -n kernel.msgmax"
set : "sysctl -w kernel.msgmax=$value"
needrestart : "false"
type : "discrete"
......@@ -417,7 +417,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.msgmnb"
info :
desc : "Maximum length of bytes in a single message queue"
get : "sysctl kernel.msgmnb | awk '{print $3}'"
get : "sysctl -n kernel.msgmnb"
set : "sysctl -w kernel.msgmnb=$value"
needrestart : "false"
type : "discrete"
......@@ -435,7 +435,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
2. Maximum number of signals in the system, =semmni*semmsl (semmns)
3. Maximum number of operations (maximum number of semaphores that can be invoked) contained in each system invoking (semopm)
4. Maximum number of signal types in the system. A signal identifier represents a type (semmni)."
get : "sysctl kernel.sem | awk '{print $3}'"
get : "sysctl -n kernel.sem"
set : "sysctl -w kernel.sem=$value"
needrestart : "false"
type : "discrete"
......@@ -448,7 +448,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.hung_task_timeout_secs"
info :
desc : "Timeout interval of a hung_task (in seconds). When a process is in the TASK_UNINTERRUPTIBLE state for a period longer than the timeout interval, a hung_task occurs."
get : "sysctl kernel.hung_task_timeout_secs | awk '{print $3}'"
get : "sysctl -n kernel.hung_task_timeout_secs"
set : "sysctl -w kernel.hung_task_timeout_secs=$value"
needrestart : "false"
type : "discrete"
......@@ -464,7 +464,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
desc : "Enabling nmi_watchdog
0: disabled
1: enabled"
get : "sysctl kernel.nmi_watchdog | awk '{print $3}'"
get : "sysctl -n kernel.nmi_watchdog"
set : "sysctl -w kernel.nmi_watchdog=$value"
needrestart : "false"
type : "discrete"
......@@ -476,7 +476,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.sched_rt_runtime_us"
info :
desc : "This parameter, together with sched_rt_period, determines the period of the real-time process."
get : "sysctl kernel.sched_rt_runtime_us | awk '{print $3}'"
get : "sysctl -n kernel.sched_rt_runtime_us"
set : "sysctl -w kernel.sched_rt_runtime_us=$value"
needrestart : "false"
type : "discrete"
......@@ -490,7 +490,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.timer_migration"
info :
desc : "Disable Clock Migration"
get : "sysctl kernel.timer_migration | awk '{print $3}'"
get : "sysctl -n kernel.timer_migration"
set : "sysctl -w kernel.timer_migration=$value"
needrestart : "false"
type : "discrete"
......@@ -502,7 +502,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.threads-max"
info :
desc : "Maximum number of processes (including threads) in the system"
get : "sysctl kernel.threads-max | awk '{print $3}'"
get : "sysctl -n kernel.threads-max"
set : "sysctl -w kernel.threads-max=$value"
needrestart : "false"
type : "discrete"
......@@ -516,7 +516,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.sysrq"
info :
desc : "The file specifies a non-zero value, which activates the sysrq key on the keyboard."
get : "sysctl kernel.sysrq | awk '{print $3}'"
get : "sysctl -n kernel.sysrq"
set : "sysctl -w kernel.sysrq=$value"
needrestart : "false"
type : "discrete"
......@@ -530,7 +530,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
desc : "When enabled, the kernel creates task groups to optimize desktop program scheduling.
0: disabled
1: enabled"
get : "sysctl kernel.sched_autogroup_enabled | awk '{print $3}'"
get : "sysctl -n kernel.sched_autogroup_enabled"
set : "sysctl -w kernel.sched_autogroup_enabled=$value"
needrestart : "false"
type : "discrete"
......@@ -542,7 +542,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.numa_balancing"
info :
desc : "Specifies whether to enable NUMA automatic balancing."
get : "sysctl kernel.numa_balancing | awk '{print $3}'"
get : "sysctl -n kernel.numa_balancing"
set : "sysctl -w kernel.numa_balancing=$value"
needrestart : "false"
type : "discrete"
......@@ -554,7 +554,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "kernel.randomize_va_space"
info :
desc : "Setting Memory Address Randomization"
get : "sysctl kernel.randomize_va_space | awk '{print $3}'"
get : "sysctl -n kernel.randomize_va_space"
set : "sysctl -w kernel.randomize_va_space=$value"
needrestart : "false"
type : "discrete"
......@@ -570,7 +570,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
desc : "Which users are restricted from viewing syslogs?
0: no restriction
1: Only privileged users can view the information."
get : "sysctl kernel.dmesg_restrict | awk '{print $4}'"
get : "sysctl -n kernel.dmesg_restrict"
set : "sysctl -w kernel.dmesg_restrict=$value"
needrestart : "false"
type : "discrete"
......@@ -582,7 +582,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.swappiness"
info :
desc : "A larger value indicates that the swap partition is used more actively. A smaller value indicates that the memory is used more actively."
get : "sysctl vm.swappiness | awk '{print $3}'"
get : "sysctl -n vm.swappiness"
set : "sysctl -w vm.swappiness=$value"
needrestart : "false"
type : "discrete"
......@@ -596,7 +596,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.vfs_cache_pressure"
info :
desc : "Indicates the tendency of the kernel to reclaim the memory used for directory and inode cache."
get : "sysctl vm.vfs_cache_pressure | awk '{print $3}'"
get : "sysctl -n vm.vfs_cache_pressure"
set : "sysctl -w vm.vfs_cache_pressure=$value"
needrestart : "false"
type : "discrete"
......@@ -610,7 +610,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.dirty_background_ratio"
info :
desc : "When the percentage of dirty pages reaches dirty_background_ratio, the write function wakes up the flusher thread of the kernel to write back dirty page data until the percentage is less than the value of dirty_background_ratio."
get : "sysctl vm.dirty_background_ratio | awk '{print $3}'"
get : "sysctl -n vm.dirty_background_ratio"
set : "sysctl -w vm.dirty_background_ratio=$value"
needrestart : "false"
type : "discrete"
......@@ -624,7 +624,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.dirty_ratio"
info :
desc : "The percentage of dirty data in the memory cannot exceed this value."
get : "sysctl vm.dirty_ratio | awk '{print $3}'"
get : "sysctl -n vm.dirty_ratio"
set : "sysctl -w vm.dirty_ratio=$value"
needrestart : "false"
type : "discrete"
......@@ -638,7 +638,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.stat_interval"
info :
desc : "VM information update frequency (in seconds)"
get : "sysctl vm.stat_interval | awk '{print $3}'"
get : "sysctl -n vm.stat_interval"
set : "sysctl -w vm.stat_interval=$value"
needrestart : "false"
type : "discrete"
......@@ -652,7 +652,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.dirty_expire_centisecs"
info :
desc : "Expiration time of dirty data. When the flusher thread of the kernel is woken up after the expiration time, dirty data is written back to the disk. The unit is 1% second."
get : "sysctl vm.dirty_expire_centisecs | awk '{print $3}'"
get : "sysctl -n vm.dirty_expire_centisecs"
set : "sysctl -w vm.dirty_expire_centisecs=$value"
needrestart : "false"
type : "discrete"
......@@ -666,7 +666,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.dirty_writeback_centisecs"
info :
desc : "Sets the interval for waking up the flusher kernel thread. This thread is used to write dirty pages back to the disk. The unit is 1% second."
get : "sysctl vm.dirty_writeback_centisecs | awk '{print $3}'"
get : "sysctl -n vm.dirty_writeback_centisecs"
set : "sysctl -w vm.dirty_writeback_centisecs=$value"
needrestart : "false"
type : "discrete"
......@@ -680,7 +680,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.overcommit_ratio"
info :
desc : "When overcommit_memory is set to 2, the percentage of physical RAM that is considered is set."
get : "sysctl vm.overcommit_ratio | awk '{print $3}'"
get : "sysctl -n vm.overcommit_ratio"
set : "sysctl -w vm.overcommit_ratio=$value"
needrestart : "false"
type : "discrete"
......@@ -694,7 +694,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.overcommit_memory"
info :
desc : "Indicates whether to allow excessive memory allocation. The process can allocate more memory than it actually uses."
get : "sysctl vm.overcommit_memory | awk '{print $3}'"
get : "sysctl -n vm.overcommit_memory"
set : "sysctl -w vm.overcommit_memory=$value"
needrestart : "false"
type : "discrete"
......@@ -706,7 +706,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.min_free_kbytes"
info :
desc : "Size of memory reserved in each memory area, in KB."
get : "sysctl vm.min_free_kbytes | awk '{print $3}'"
get : "sysctl -n vm.min_free_kbytes"
set : "sysctl -w vm.min_free_kbytes=$value"
needrestart : "false"
type : "discrete"
......@@ -720,7 +720,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.page-cluster"
info :
desc : "Number of pages written to the swap partition each time."
get : "sysctl vm.page-cluster | awk '{print $3}'"
get : "sysctl -n vm.page-cluster"
set : "sysctl -w vm.page-cluster=$value"
needrestart : "false"
type : "discrete"
......@@ -734,7 +734,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.max_map_count"
info :
desc : "Defines the maximum memory area that a process can have."
get : "sysctl vm.max_map_count | awk '{print $3}'"
get : "sysctl -n vm.max_map_count"
set : "sysctl -w vm.max_map_count=$value"
needrestart : "false"
type : "discrete"
......@@ -748,7 +748,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.zone_reclaim_mode"
info :
desc : "This parameter is valid only when CONFIG_NUMA is enabled. zone_reclaim_mode is used to control how to reclaim memory when the memory domain OOM is enabled."
get : "sysctl vm.zone_reclaim_mode | awk '{print $3}'"
get : "sysctl -n vm.zone_reclaim_mode"
set : "sysctl -w vm.zone_reclaim_mode=$value"
needrestart : "false"
type : "discrete"
......@@ -762,7 +762,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.watermark_scale_factor"
info :
desc : "Controls the radical degree of the kswapd process, that is, how much memory needs to be released for the system (NUMA node) from wakeup to hibernation."
get : "sysctl vm.watermark_scale_factor | awk '{print $3}'"
get : "sysctl -n vm.watermark_scale_factor"
set : "sysctl -w vm.watermark_scale_factor=$value"
needrestart : "false"
type : "discrete"
......@@ -776,7 +776,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.numa_stat"
info :
desc : "This command is used to set the data statistics during NUMA running. When the memory is insufficient, this command can be set to 0 to reduce the statistics precision."
get : "sysctl vm.numa_stat | awk '{print $3}'"
get : "sysctl -n vm.numa_stat"
set : "sysctl -w vm.numa_stat=$value"
needrestart : "false"
type : "discrete"
......@@ -788,7 +788,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "vm.drop_caches"
info :
desc : "Releases the cache. The cache is released each time the parameter is modified."
get : "sysctl vm.drop_caches | awk '{print $3}'"
get : "sysctl -n vm.drop_caches"
set : "sysctl -w vm.drop_caches=$value"
needrestart : "false"
type : "discrete"
......@@ -801,7 +801,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "fs.inotify.max_user_watches"
info :
desc : "Sets the number of processes for each user to run the inotifywait or inotifywatch command."
get : "sysctl fs.inotify.max_user_watches | awk '{print $3}'"
get : "sysctl -n fs.inotify.max_user_watches"
set : "sysctl -w fs.inotify.max_user_watches=$value"
needrestart : "false"
type : "discrete"
......@@ -815,7 +815,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "fs.nr_open"
info :
desc : "Maximum number of file handles that can be concurrently opened by a process"
get : "sysctl fs.nr_open | awk '{print $3}'"
get : "sysctl -n fs.nr_open"
set : "sysctl -w fs.nr_open=$value"
needrestart : "false"
type : "discrete"
......@@ -829,7 +829,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "fs.file-max"
info :
desc : "Number of file handles that can be opened by all processes in the system at the same time"
get : "sysctl fs.file-max | awk '{print $3}'"
get : "sysctl -n fs.file-max"
set : "sysctl -w fs.file-max=$value"
needrestart : "false"
type : "discrete"
......@@ -843,7 +843,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "fs.aio-max-nr"
info :
desc : "Maximum number of AIO requests"
get : "sysctl fs.aio-max-nr | awk '{print $3}'"
get : "sysctl -n fs.aio-max-nr"
set : "sysctl -w fs.aio-max-nr=$value"
needrestart : "false"
type : "discrete"
......@@ -857,7 +857,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "fs.inotify.max_user_watches"
info :
desc : "Maximum number of monitoring instances"
get : "sysctl fs.inotify.max_user_watches | awk '{print $3}'"
get : "sysctl -n fs.inotify.max_user_watches"
set : "sysctl -w fs.inotify.max_user_watches=$value"
needrestart : "false"
type : "discrete"
......@@ -871,7 +871,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
name : "fs.inotify.max_user_instances"
info :
desc : "Maximum number of inotify instances that can be started by each user"
get : "sysctl fs.inotify.max_user_instances | awk '{print $3}'"
get : "sysctl -n fs.inotify.max_user_instances"
set : "sysctl -w fs.inotify.max_user_instances=$value"
needrestart : "false"
type : "discrete"
......@@ -888,7 +888,7 @@ When a container is used, the nf_conntrack module cannot be disabled. Therefore,
0: default
1: debug
2: suidsafe"
get : "sysctl fs.suid_dumpable | awk '{print $3}'"
get : "sysctl -n fs.suid_dumpable"
set : "sysctl -w fs.suid_dumpable=$value"
needrestart : "false"
type : "discrete"
......@@ -1067,14 +1067,15 @@ This parameter specifies the number of read requests that can be sent after the
name : "block.scheduler"
info :
desc : "Configure I/O scheduling. Deadline or noop is more suitable for MySQL database scenarios."
get : "cat /sys/block/sda/queue/scheduler"
get : "cat /sys/block/sda/queue/scheduler | sed -n 's/.*\[\(.*\)\].*/\1/p'"
set : "echo $value > /sys/block/sda/queue/scheduler"
needrestart : "false"
type : "discrete"
options :
- "deadline"
- "cfq"
- "noop"
- "mq-deadline"
- "kyber"
- "bfq"
- "none"
dtype : "string"
-
name : "block.write_cache"
......@@ -1105,7 +1106,7 @@ This parameter specifies the number of read requests that can be sent after the
name : "net.core.netdev_budget"
info :
desc : "Number of network packets processed in each software interrupt"
get : "sysctl net.core.netdev_budget | awk '{print $3}'"
get : "sysctl -n net.core.netdev_budget"
set : "sysctl -w net.core.netdev_budget=$value"
needrestart : "false"
type : "discrete"
......@@ -1119,7 +1120,7 @@ This parameter specifies the number of read requests that can be sent after the
name : "net.core.optmem_max"
info :
desc : "Maximum size of the buffer allowed by each socket(in bytes)."
get : "sysctl net.core.optmem_max | awk '{print $3}'"
get : "sysctl -n net.core.optmem_max"
set : "sysctl -w net.core.optmem_max=$value"
needrestart : "false"
type : "discrete"
......@@ -1134,7 +1135,7 @@ This parameter specifies the number of read requests that can be sent after the
info :
desc : "The maximum size of the system socket write buffer is increased to prevent buffer overflow caused by a large number of new connections. As a result, connections cannot be established.
The default value is 229376. You are advised to change the value to 16777216."
get : "sysctl net.core.wmem_max | awk '{print $3}'"
get : "sysctl -n net.core.wmem_max"
set : "sysctl -w net.core.wmem_max=$value"
needrestart : "false"
type : "discrete"
......@@ -1148,7 +1149,7 @@ The default value is 229376. You are advised to change the value to 16777216."
name : "net.core.wmem_default"
info :
desc : "Default TCP send window size (bytes)"
get : "sysctl net.core.wmem_default | awk '{print $3}'"
get : "sysctl -n net.core.wmem_default"
set : "sysctl -w net.core.wmem_default=$value"
needrestart : "false"
type : "discrete"
......@@ -1162,7 +1163,7 @@ The default value is 229376. You are advised to change the value to 16777216."
name : "net.core.rmem_default"
info :
desc : "Sets the default buffer size (bytes) of the receive socket."
get : "sysctl net.core.rmem_default | awk '{print $3}'"
get : "sysctl -n net.core.rmem_default"
set : "sysctl -w net.core.rmem_default=$value"
needrestart : "false"
type : "discrete"
......@@ -1177,7 +1178,7 @@ The default value is 229376. You are advised to change the value to 16777216."
info :
desc : "Maximum system socket read buffer
The default value is 229376. You are advised to change the value to 16777216."
get : "sysctl net.core.rmem_max | awk '{print $3}'"
get : "sysctl -n net.core.rmem_max"
set : "sysctl -w net.core.rmem_max=$value"
needrestart : "false"
type : "discrete"
......@@ -1191,7 +1192,7 @@ The default value is 229376. You are advised to change the value to 16777216."
name : "net.core.netdev_max_backlog"
info :
desc : "Maximum number of packets that can be sent to the queue when each network interface receives packets faster than the kernel processes them"
get : "sysctl net.core.netdev_max_backlog | awk '{print $3}'"
get : "sysctl -n net.core.netdev_max_backlog"
set : "sysctl -w net.core.netdev_max_backlog=$value"
needrestart : "false"
type : "discrete"
......@@ -1205,7 +1206,7 @@ The default value is 229376. You are advised to change the value to 16777216."
name : "net.ipv4.tcp_thin_linear_timeouts"
info :
desc : "Check whether the TCP stream is thin after the retransmission times out."
get : "sysctl net.ipv4.tcp_thin_linear_timeouts | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_thin_linear_timeouts"
set : "sysctl -w net.ipv4.tcp_thin_linear_timeouts=$value"
needrestart : "false"
type : "discrete"
......@@ -1217,7 +1218,7 @@ The default value is 229376. You are advised to change the value to 16777216."
name : "net.unix.max_dgram_qlen"
info :
desc : "Maximum number of datagrams in a UDP queue"
get : "sysctl net.unix.max_dgram_qlen | awk '{print $3}'"
get : "sysctl -n net.unix.max_dgram_qlen"
set : "sysctl -w net.unix.max_dgram_qlen=$value"
needrestart : "false"
type : "discrete"
......@@ -1232,7 +1233,7 @@ The default value is 229376. You are advised to change the value to 16777216."
info :
desc : "Defines the maximum length of the listening queue of each port in the system. This is a global parameter.
The default value is 128. You are advised to change the value to 1024."
get : "sysctl net.core.somaxconn | awk '{print $3}'"
get : "sysctl -n net.core.somaxconn"
set : "sysctl -w net.core.somaxconn=$value"
needrestart : "false"
type : "discrete"
......@@ -1246,7 +1247,7 @@ The default value is 128. You are advised to change the value to 1024."
name : "net.core.busy_poll"
info :
desc : "Timeout interval for performing the poll and select operations on network devices (us) by default. The value is determined by the number of sockets."
get : "sysctl net.core.busy_poll | awk '{print $3}'"
get : "sysctl -n net.core.busy_poll"
set : "sysctl -w net.core.busy_poll=$value"
needrestart : "false"
type : "discrete"
......@@ -1260,7 +1261,7 @@ The default value is 128. You are advised to change the value to 1024."
name : "net.core.busy_read"
info :
desc : "Timeout interval for reading data frames in the device frame queue (us) by default. The recommended value is 50."
get : "sysctl net.core.busy_read | awk '{print $3}'"
get : "sysctl -n net.core.busy_read"
set : "sysctl -w net.core.busy_read=$value"
needrestart : "false"
type : "discrete"
......@@ -1274,7 +1275,7 @@ The default value is 128. You are advised to change the value to 1024."
name : "net.core.dev_weight"
info :
desc : "Maximum number of network packets that can be processed by each CPU in an NAPI interrupt"
get : "sysctl net.core.dev_weight | awk '{print $3}'"
get : "sysctl -n net.core.dev_weight"
set : "sysctl -w net.core.dev_weight=$value"
needrestart : "false"
type : "discrete"
......@@ -1288,7 +1289,7 @@ The default value is 128. You are advised to change the value to 1024."
name : "net.ipv4.tcp_keepalive_intvl"
info :
desc : "Indicates the frequency of sending TCP probe packets. The value multiplied by tcp_keepalive_probes indicates the duration when no TCP connection is available."
get : "sysctl net.ipv4.tcp_keepalive_intvl | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_keepalive_intvl"
set : "sysctl -w net.ipv4.tcp_keepalive_intvl=$value"
needrestart : "false"
type : "discrete"
......@@ -1302,7 +1303,7 @@ The default value is 128. You are advised to change the value to 1024."
name : "net.ipv4.tcp_keepalive_probes"
info :
desc : "This file indicates the maximum number of times that TCP keepalive detection is performed before a TCP connection is discarded. Keep-alive connections are sent only when the SO_KEEPALIVE socket option is turned on."
get : "sysctl net.ipv4.tcp_keepalive_probes | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_keepalive_probes"
set : "sysctl -w net.ipv4.tcp_keepalive_probes=$value"
needrestart : "false"
type : "discrete"
......@@ -1316,7 +1317,7 @@ The default value is 128. You are advised to change the value to 1024."
name : "net.ipv4.tcp_keepalive_time"
info :
desc : "Interval for sending keepalive detection messages(in seconds). This parameter is used to check whether the TCP connection is valid."
get : "sysctl net.ipv4.tcp_keepalive_time | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_keepalive_time"
set : "sysctl -w net.ipv4.tcp_keepalive_time=$value"
needrestart : "false"
type : "discrete"
......@@ -1330,7 +1331,7 @@ The default value is 128. You are advised to change the value to 1024."
name : "net.ipv4.tcp_tw_reuse"
info :
desc : "The value 1 indicates that TIME-WAIT sockets can be used for new TCP connections, and the value 0 indicates that TIME-WAIT sockets are disabled."
get : "sysctl net.ipv4.tcp_tw_reuse | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_tw_reuse"
set : "sysctl -w net.ipv4.tcp_tw_reuse=$value"
needrestart : "false"
type : "discrete"
......@@ -1343,7 +1344,7 @@ The default value is 128. You are advised to change the value to 1024."
name : "net.ipv4.tcp_window_scaling"
info :
desc : "The window scaling defined in RFC 1323 is enabled. To support a TCP window larger than 64 KB, this parameter must be set to 1. The maximum size of a TCP window is 1 GB. This parameter takes effect only when both parties of a TCP connection are enabled."
get : "sysctl net.ipv4.tcp_window_scaling | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_window_scaling"
set : "sysctl -w net.ipv4.tcp_window_scaling=$value"
needrestart : "false"
type : "discrete"
......@@ -1355,7 +1356,7 @@ The default value is 128. You are advised to change the value to 1024."
name : "net.ipv4.tcp_fin_timeout"
info :
desc : "Maximum duration for a socket to remain in the FIN_WAIT_2 state."
get : "sysctl net.ipv4.tcp_fin_timeout | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_fin_timeout"
set : "sysctl -w net.ipv4.tcp_fin_timeout=$value"
needrestart : "false"
type : "discrete"
......@@ -1372,7 +1373,7 @@ The default value is 128. You are advised to change the value to 1024."
low: When the number of memory pages used by UDP is less than the value of this parameter, UDP does not release memory.
assure: When the number of memory pages used by UDP exceeds the value of this parameter, UDP attempts to stabilize the memory usage and enters the pressure mode. When the memory usage is less than the value of low, UDP exits the pressure mode.
high: indicates the number of pages that can be used by all UDP sockets to queue and buffer datagrams."
get : "sysctl net.ipv4.udp_mem | awk '{print $3}'"
get : "sysctl -n net.ipv4.udp_mem"
set : "sysctl -w net.ipv4.udp_mem=$value"
needrestart : "false"
type : "discrete"
......@@ -1385,7 +1386,7 @@ high: indicates the number of pages that can be used by all UDP sockets to queue
name : "net.ipv4.tcp_mem"
info :
desc : "TCP overall cache setting, which controls all TCP memory usage (in pages). The parameter indicates the no-pressure value of the TCP overall memory, the threshold for enabling the pressure mode, and the maximum usage value in sequence. This parameter is used to control whether the new cache is successfully allocated."
get : "sysctl net.ipv4.tcp_mem | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_mem"
set : "sysctl -w net.ipv4.tcp_mem=$value"
needrestart : "false"
type : "discrete"
......@@ -1397,7 +1398,7 @@ high: indicates the number of pages that can be used by all UDP sockets to queue
name : "net.ipv4.tcp_rmem"
info :
desc : "Size of the read buffer. The first value is the minimum value of the read buffer, the third value is the maximum value, and the middle value is the default value. The default value is 4096 87380 6291456. You are advised to change the value to 4096 87380 16777216."
get : "sysctl net.ipv4.tcp_rmem | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_rmem"
set : "sysctl -w net.ipv4.tcp_rmem=$value"
needrestart : "false"
type : "discrete"
......@@ -1410,7 +1411,7 @@ high: indicates the number of pages that can be used by all UDP sockets to queue
name : "net.ipv4.tcp_wmem"
info :
desc : "Size of the write buffer. The first value is the minimum value of the read buffer, the third value is the maximum value, and the middle value is the default value. The default value is 4096 16384 4194304. You are advised to change the value to 4096 65536 16777216."
get : "sysctl net.ipv4.tcp_wmem | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_wmem"
set : "sysctl -w net.ipv4.tcp_wmem=$value"
needrestart : "false"
type : "discrete"
......@@ -1423,7 +1424,7 @@ high: indicates the number of pages that can be used by all UDP sockets to queue
name : "net.ipv4.tcp_fastopen"
info :
desc : "Whether to enable the TCP quick open mode is to avoid the three-way handshake of hot requests. This greatly improves the performance in the scenario where small objects are moved."
get : "sysctl net.ipv4.tcp_fastopen | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_fastopen"
set : "sysctl -w net.ipv4.tcp_fastopen=$value"
needrestart : "false"
type : "discrete"
......@@ -1437,7 +1438,7 @@ high: indicates the number of pages that can be used by all UDP sockets to queue
info :
desc : "For the remote connection request SYN, the kernel sends a SYN + ACK packet to acknowledge the receipt of the previous SYN connection request packet.
It's called a three-way handshake. This parameter determines the number of SYN+ACK packets sent by the kernel before the kernel discards the connection."
get : "sysctl net.ipv4.tcp_synack_retries | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_synack_retries"
set : "sysctl -w net.ipv4.tcp_synack_retries=$value"
needrestart : "false"
type : "discrete"
......@@ -1451,7 +1452,7 @@ It's called a three-way handshake. This parameter determines the number of SYN+A
name : "net.ipv4.tcp_syn_retries"
info :
desc : "Number of times that the local device retransmits TCP SYN packets due to timeout. The value cannot be greater than 255. This parameter is valid only for outgoing connections. For incoming connections, this parameter is controlled by tcp_retries1."
get : "sysctl net.ipv4.tcp_syn_retries | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_syn_retries"
set : "sysctl -w net.ipv4.tcp_syn_retries=$value"
needrestart : "false"
type : "discrete"
......@@ -1467,7 +1468,7 @@ It's called a three-way handshake. This parameter determines the number of SYN+A
desc : "Whether to adjust the receive buffer when receiving data
0: no adjustment
1: yes"
get : "sysctl net.ipv4.tcp_moderate_rcvbuf | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_moderate_rcvbuf"
set : "sysctl -w net.ipv4.tcp_moderate_rcvbuf=$value"
needrestart : "false"
type : "discrete"
......@@ -1481,7 +1482,7 @@ It's called a three-way handshake. This parameter determines the number of SYN+A
desc : "Indicates whether to enable the calculation of the RTT in a more accurate way than timeout retransmission (see RFC 1323). This option should be enabled for better performance.
0: no
1: enabled"
get : "sysctl net.ipv4.tcp_timestamps | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_timestamps"
set : "sysctl -w net.ipv4.tcp_timestamps=$value"
needrestart : "false"
type : "discrete"
......@@ -1495,7 +1496,7 @@ It's called a three-way handshake. This parameter determines the number of SYN+A
desc : "Indicates whether to allow TCP to send two identical SACKs.
0: disabled
1: enabled"
get : "sysctl net.ipv4.tcp_dsack | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_dsack"
set : "sysctl -w net.ipv4.tcp_dsack=$value"
needrestart : "false"
type : "discrete"
......@@ -1507,7 +1508,7 @@ It's called a three-way handshake. This parameter determines the number of SYN+A
name : "net.ipv4.tcp_fack"
info :
desc : "Enables the forwarding acknowledgment. The selective acknowledgment (SACK) can be performed to reduce the occurrence of congestion. This option should also be enabled."
get : "sysctl net.ipv4.tcp_fack | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_fack"
set : "sysctl -w net.ipv4.tcp_fack=$value"
needrestart : "false"
type : "discrete"
......@@ -1521,7 +1522,7 @@ It's called a three-way handshake. This parameter determines the number of SYN+A
desc : "Indicates whether to enable the selective acknowledgment function. This function improves the performance by selectively responding to out-of-order received packets. In this way, the sender can send only lost packet segments. This function should be enabled for WAN communication, however, this increases the CPU usage.
0: no
1: enabled"
get : "sysctl net.ipv4.tcp_sack | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_sack"
set : "sysctl -w net.ipv4.tcp_sack=$value"
needrestart : "false"
type : "discrete"
......@@ -1535,7 +1536,7 @@ It's called a three-way handshake. This parameter determines the number of SYN+A
desc : "Allows the TCP/IP stack to adapt to low latency in high throughput scenarios. This option is generally disabled. (But when building a Beowulf cluster, it helps to open it.)
0: disabled
1: enabled"
get : "sysctl net.ipv4.tcp_low_latency | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_low_latency"
set : "sysctl -w net.ipv4.tcp_low_latency=$value"
needrestart : "false"
type : "discrete"
......@@ -1547,7 +1548,7 @@ It's called a three-way handshake. This parameter determines the number of SYN+A
name : "net.ipv4.tcp_adv_win_scale"
info :
desc : "Calculating the Buffer Overhead"
get : "sysctl net.ipv4.tcp_adv_win_scale | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_adv_win_scale"
set : "sysctl -w net.ipv4.tcp_adv_win_scale=$value"
needrestart : "false"
type : "discrete"
......@@ -1561,7 +1562,7 @@ It's called a three-way handshake. This parameter determines the number of SYN+A
name : "net.ipv4.route.max_size"
info :
desc : "Maximum number of entries in the routing cache. If the number of entries in the routing cache exceeds the maximum, the old entries are cleared."
get : "sysctl net.ipv4.route.max_size | awk '{print $3}'"
get : "sysctl -n net.ipv4.route.max_size"
set : "sysctl -w net.ipv4.route.max_size=$value"
needrestart : "false"
type : "discrete"
......@@ -1576,7 +1577,7 @@ It's called a three-way handshake. This parameter determines the number of SYN+A
info :
desc : "Reduce the number of TIME_WAIT connections to prevent excessive TIME_WAIT connections from occupying network resources and increasing the latency.
The default value is 2048. You are advised to change the value to 360000."
get : "sysctl net.ipv4.tcp_max_tw_buckets | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_max_tw_buckets"
set : "sysctl -w net.ipv4.tcp_max_tw_buckets=$value"
needrestart : "false"
type : "discrete"
......@@ -1591,7 +1592,7 @@ The default value is 2048. You are advised to change the value to 360000."
info :
desc : "Indicates the length of the SYN queue. A larger queue length can accommodate more network connections waiting for connections.
The default value is 2048. You are advised to change the value to 8192."
get : "sysctl net.ipv4.tcp_max_syn_backlog | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_max_syn_backlog"
set : "sysctl -w net.ipv4.tcp_max_syn_backlog=$value"
needrestart : "false"
type : "discrete"
......@@ -1605,7 +1606,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.tcp_max_orphans"
info :
desc : "Number of sockets that can be processed by the system and do not belong to any process. When a large number of connections need to be quickly established, pay attention to this parameter."
get : "sysctl net.ipv4.tcp_max_orphans | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_max_orphans"
set : "sysctl -w net.ipv4.tcp_max_orphans=$value"
needrestart : "false"
type : "discrete"
......@@ -1619,7 +1620,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.tcp_ecn"
info :
desc : "Indicates whether to enable the direct TCP congestion notification function. 0: disabled; 1: enabled"
get : "sysctl net.ipv4.tcp_ecn | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_ecn"
set : "sysctl -w net.ipv4.tcp_ecn=$value"
needrestart : "false"
type : "discrete"
......@@ -1634,7 +1635,7 @@ The default value is 2048. You are advised to change the value to 8192."
desc : "Indicates whether to enable IPv4 IP forwarding.
0: disabled
1: enabled"
get : "sysctl net.ipv4.ip_forward | awk '{print $3}'"
get : "sysctl -n net.ipv4.ip_forward"
set : "sysctl -w net.ipv4.ip_forward=$value"
needrestart : "false"
type : "discrete"
......@@ -1646,7 +1647,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.conf.default.rp_filter"
info :
desc : "The kernel sets the policy for responding to ARP queries."
get : "sysctl net.ipv4.conf.default.rp_filter | awk '{print $3}'"
get : "sysctl -n net.ipv4.conf.default.rp_filter"
set : "sysctl -w net.ipv4.conf.default.rp_filter=$value"
needrestart : "false"
type : "discrete"
......@@ -1658,7 +1659,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.ip_local_port_range"
info :
desc : "The range of available ports has been increased to prevent performance deterioration caused by continuous search of available ports for new connections when a large number of connections occupy ports."
get : "sysctl net.ipv4.ip_local_port_range | awk '{print $3}'"
get : "sysctl -n net.ipv4.ip_local_port_range"
set : "sysctl -w net.ipv4.ip_local_port_range=$value"
needrestart : "false"
type : "discrete"
......@@ -1671,7 +1672,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.tcp_no_metrics_save"
info :
desc : "After a TCP connection is closed, the saved parameters can be used to initialize the connection when the same connection is created next time as long as dst_entry is valid."
get : "sysctl net.ipv4.tcp_no_metrics_save | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_no_metrics_save"
set : "sysctl -w net.ipv4.tcp_no_metrics_save=$value"
needrestart : "false"
type : "discrete"
......@@ -1683,7 +1684,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.ip_default_ttl"
info :
desc : "Specifies the lifetime of IP packets sent from the local device. The value is an integer ranging from 0 to 128. The default value is 64."
get : "sysctl net.ipv4.ip_default_ttl | awk '{print $3}'"
get : "sysctl -n net.ipv4.ip_default_ttl"
set : "sysctl -w net.ipv4.ip_default_ttl=$value"
needrestart : "false"
type : "discrete"
......@@ -1697,7 +1698,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.ip_no_pmtu_disc"
info :
desc : "Setting the MTU for Automatic Socket Detection"
get : "sysctl net.ipv4.ip_no_pmtu_disc | awk '{print $3}'"
get : "sysctl -n net.ipv4.ip_no_pmtu_disc"
set : "sysctl -w net.ipv4.ip_no_pmtu_disc=$value"
needrestart : "false"
type : "discrete"
......@@ -1709,7 +1710,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.tcp_retries2"
info :
desc : "The number of retries required before discarding an active (established traffic condition) TCP connection. The default value is 15."
get : "sysctl net.ipv4.tcp_retries2 | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_retries2"
set : "sysctl -w net.ipv4.tcp_retries2=$value"
needrestart : "false"
type : "discrete"
......@@ -1723,7 +1724,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.tcp_orphan_retries"
info :
desc : "Number of retries before the local end discards the TCP connection. The default value is 7."
get : "sysctl net.ipv4.tcp_orphan_retries | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_orphan_retries"
set : "sysctl -w net.ipv4.tcp_orphan_retries=$value"
needrestart : "false"
type : "discrete"
......@@ -1737,7 +1738,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.tcp_syncookies"
info :
desc : "Indicates whether to enable the TCP synchronization label (syncookie)."
get : "sysctl net.ipv4.tcp_syncookies | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_syncookies"
set : "sysctl -w net.ipv4.tcp_syncookies=$value"
needrestart : "false"
type : "discrete"
......@@ -1749,7 +1750,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.tcp_reordering"
info :
desc : "Maximum number of reordered data packets in TCP flows"
get : "sysctl net.ipv4.tcp_reordering | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_reordering"
set : "sysctl -w net.ipv4.tcp_reordering=$value"
needrestart : "false"
type : "discrete"
......@@ -1763,7 +1764,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.tcp_retrans_collapse"
info :
desc : "Provides compatibility for bugs on some printers. (Generally, this support is not required. You can disable it.)"
get : "sysctl net.ipv4.tcp_retrans_collapse | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_retrans_collapse"
set : "sysctl -w net.ipv4.tcp_retrans_collapse=$value"
needrestart : "false"
type : "discrete"
......@@ -1775,7 +1776,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.tcp_congestion_control"
info :
desc : "TCP congestion scheduling algorithm"
get : "sysctl net.ipv4.tcp_congestion_control | awk '{print $3}'"
get : "sysctl -n net.ipv4.tcp_congestion_control"
set : "sysctl -w net.ipv4.tcp_congestion_control=$value"
needrestart : "false"
type : "discrete"
......@@ -1789,7 +1790,7 @@ The default value is 2048. You are advised to change the value to 8192."
info :
desc : "0: When the primary IP address of an interface is removed, all secondary IP addresses are deleted.
1: When the primary IP address of an interface is removed, the secondary IP address becomes the primary IP address."
get : "sysctl net.ipv4.conf.default.promote_secondaries | awk '{print $3}'"
get : "sysctl -n net.ipv4.conf.default.promote_secondaries"
set : "sysctl -w net.ipv4.conf.default.promote_secondaries=$value"
needrestart : "false"
type : "discrete"
......@@ -1802,7 +1803,7 @@ The default value is 2048. You are advised to change the value to 8192."
info :
desc : "0: When the primary IP address of an interface is removed, all secondary IP addresses are deleted.
1: When the primary IP address of an interface is removed, the secondary IP address becomes the primary IP address."
get : "sysctl net.ipv4.conf.all.promote_secondaries | awk '{print $3}'"
get : "sysctl -n net.ipv4.conf.all.promote_secondaries"
set : "sysctl -w net.ipv4.conf.all.promote_secondaries=$value"
needrestart : "false"
type : "discrete"
......@@ -1816,7 +1817,7 @@ The default value is 2048. You are advised to change the value to 8192."
desc : "Receives and sends ICMP redirection messages. The default value is True for hosts and False for routers.
0: disabled
1: yes"
get : "sysctl net.ipv4.conf.all.accept_redirects | awk '{print $3}'"
get : "sysctl -n net.ipv4.conf.all.accept_redirects"
set : "sysctl -w net.ipv4.conf.all.accept_redirects=$value"
needrestart : "false"
type : "discrete"
......@@ -1830,7 +1831,7 @@ The default value is 2048. You are advised to change the value to 8192."
desc : "Receives and sends ICMP redirection messages. The default value is True for hosts and False for routers.
0: disabled
1: yes"
get : "sysctl net.ipv4.conf.default.accept_redirects | awk '{print $3}'"
get : "sysctl -n net.ipv4.conf.default.accept_redirects"
set : "sysctl -w net.ipv4.conf.default.accept_redirects=$value"
needrestart : "false"
type : "discrete"
......@@ -1844,7 +1845,7 @@ The default value is 2048. You are advised to change the value to 8192."
desc : "Receives only ICMP redirect messages sent to gateways in the default gateway list.
0: disabled
1: yes"
get : "sysctl net.ipv4.conf.all.secure_redirects | awk '{print $3}'"
get : "sysctl -n net.ipv4.conf.all.secure_redirects"
set : "sysctl -w net.ipv4.conf.all.secure_redirects=$value"
needrestart : "false"
type : "discrete"
......@@ -1858,7 +1859,7 @@ The default value is 2048. You are advised to change the value to 8192."
desc : "Receives only ICMP redirect messages sent to gateways in the default gateway list.
0: disabled
1: yes"
get : "sysctl net.ipv4.conf.default.secure_redirects | awk '{print $3}'"
get : "sysctl -n net.ipv4.conf.default.secure_redirects"
set : "sysctl -w net.ipv4.conf.default.secure_redirects=$value"
needrestart : "false"
type : "discrete"
......@@ -1872,7 +1873,7 @@ The default value is 2048. You are advised to change the value to 8192."
desc : "Ignore all received ICMP Echo request broadcasts.
0: not ignore
1: ignore"
get : "sysctl net.ipv4.icmp_echo_ignore_broadcasts | awk '{print $3}'"
get : "sysctl -n net.ipv4.icmp_echo_ignore_broadcasts"
set : "sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=$value"
needrestart : "false"
type : "discrete"
......@@ -1884,7 +1885,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.nf_conntrack_max"
info :
desc : "Maximum number of ip_conntrack structures in the memory"
get : "sysctl net.nf_conntrack_max | awk '{print $3}'"
get : "sysctl -n net.nf_conntrack_max"
set : "sysctl -w net.nf_conntrack_max=$value"
needrestart : "false"
type : "discrete"
......@@ -1898,7 +1899,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.netfilter.nf_conntrack_tcp_timeout_established"
info :
desc : "Timeout interval for TCP in the established state (s)"
get : "sysctl net.netfilter.nf_conntrack_tcp_timeout_established | awk '{print $3}'"
get : "sysctl -n net.netfilter.nf_conntrack_tcp_timeout_established"
set : "sysctl -w net.netfilter.nf_conntrack_tcp_timeout_established=$value"
needrestart : "false"
type : "discrete"
......@@ -1912,7 +1913,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.netfilter.nf_conntrack_tcp_timeout_close_wait"
info :
desc : "Timeout interval for TCP in close wait state (s)"
get : "sysctl net.netfilter.nf_conntrack_tcp_timeout_close_wait | awk '{print $3}'"
get : "sysctl -n net.netfilter.nf_conntrack_tcp_timeout_close_wait"
set : "sysctl -w net.netfilter.nf_conntrack_tcp_timeout_close_wait=$value"
needrestart : "false"
type : "discrete"
......@@ -1926,7 +1927,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.netfilter.nf_conntrack_tcp_timeout_fin_wait"
info :
desc : "Timeout interval for TCP in the fin wait state (s)"
get : "sysctl net.netfilter.nf_conntrack_tcp_timeout_fin_wait | awk '{print $3}'"
get : "sysctl -n net.netfilter.nf_conntrack_tcp_timeout_fin_wait"
set : "sysctl -w net.netfilter.nf_conntrack_tcp_timeout_fin_wait=$value"
needrestart : "false"
type : "discrete"
......@@ -1940,7 +1941,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.netfilter.nf_conntrack_tcp_timeout_time_wait"
info :
desc : "Timeout interval for TCP in time wait state (s)"
get : "sysctl net.netfilter.nf_conntrack_tcp_timeout_time_wait | awk '{print $3}'"
get : "sysctl -n net.netfilter.nf_conntrack_tcp_timeout_time_wait"
set : "sysctl -w net.netfilter.nf_conntrack_tcp_timeout_time_wait=$value"
needrestart : "false"
type : "discrete"
......@@ -1956,7 +1957,7 @@ The default value is 2048. You are advised to change the value to 8192."
desc : "Enable the forwarding function on the interface.
0: disabled
1: yes"
get : "sysctl net.ipv4.conf.default.forwarding | awk '{print $3}'"
get : "sysctl -n net.ipv4.conf.default.forwarding"
set : "sysctl -w net.ipv4.conf.default.forwarding=$value"
needrestart : "false"
type : "discrete"
......@@ -1968,7 +1969,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.core.rps_sock_flow_entries"
info :
desc : "RFS (Receiver Flow Control) extends the performance of RPS to increase the CPU cache hit ratio and reduce network latency."
get : "sysctl net.core.rps_sock_flow_entries | awk '{print $3}'"
get : "sysctl -n net.core.rps_sock_flow_entries"
set : "sysctl -w net.core.rps_sock_flow_entries=$value"
needrestart : "false"
type : "discrete"
......@@ -1982,7 +1983,7 @@ The default value is 2048. You are advised to change the value to 8192."
name : "net.ipv4.tcp_min_tso_segs"
info :
desc : "Minimal number of segments per TSO frame."
get : "sysctl net.ipv4.tcp_min_tso_segs | awk '{print $4}'"
get : "sysctl -n net.ipv4.tcp_min_tso_segs"
set : "sysctl -w net.ipv4.tcp_min_tso_segs=$value"
needrestart : "false"
type : "continuous"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册