企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持知识库和私有化部署方案 广告
[admin@master init]$ sudo salt 'node2*' sys.list_state_functions sysctl node2.51yuki.cn: - sysctl.present ~~~ [admin@master init]$ sudo salt 'node2*' sys.state_doc sysctl.present node2.51yuki.cn: ---------- sysctl: Configuration of the Linux kernel using sysctl ============================================== Control the kernel sysctl system. vm.swappiness: sysctl.present: - value: 20 sysctl.present: Ensure that the named sysctl value is set in memory and persisted to the named configuration file. The default sysctl configuration file is /etc/sysctl.conf name The name of the sysctl value to edit value The sysctl value to apply config The location of the sysctl configuration file. If not specified, the proper location will be detected based on platform. ~~~ 案例: [admin@master init]$ cat sysctl.sls net.ipv4.ip_local_port_range: sysctl.present: - value: 10000 65000 fs.file-max: sysctl.present: - value: 2000000 net.ipv4.ip_forward: sysctl.present: - value: 1 vm.swappiness: sysctl.present: - value: 0