Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

可否增加一个参数关闭对 sysctl 的修改 #28

Closed
DearTanker opened this issue May 28, 2023 · 5 comments
Closed

可否增加一个参数关闭对 sysctl 的修改 #28

DearTanker opened this issue May 28, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@DearTanker
Copy link

默认执行脚本会对 sysctl 增加优化参数,这个可能有些人并不需要,希望可以在执行命令的时候增加一个参数以禁用优化。

@spiritLHLS
Copy link
Owner

今天晚些时候增加该选项

@spiritLHLS spiritLHLS added the enhancement New feature or request label May 28, 2023
@spiritLHLS
Copy link
Owner

看了一遍源码,由于要保留菜单栏选项,所以无法通过外部再传输参数了,目前脚本的修改仅限于在原有的基础上增加设置,而不是修改已经有的设置,原有的sysctl参数不会被修改覆盖,这方面应该不会导致使用的问题,如果有请告知

@DearTanker
Copy link
Author

在默认干净的系统,sysctl 默认没有任何参数。
执行命令后,sysctl 会带有脚本引入的参数,我个人觉得这种似乎不太恰当。

因为近期需要测试大量机器,对每台机器重新还原的话,发现这是一个不小的工作量。

@spiritLHLS
Copy link
Owner

唔,有道理

还有另一种折中的方法,优化只在测试期间生效,优化前记录原始默认值,测试完毕后删除优化变回默认值,这样两全其美

明天晚些时候看看,应该是可实现的

@spiritLHLS spiritLHLS reopened this May 28, 2023
@spiritLHLS
Copy link
Owner

60b1800

已修改脚本使得systl优化仅在测试期间起效果,执行完毕后重置回默认的设置,避免影响原系统环境

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants