linux 中的 proc ,修改的值在重启后是否仍然存在?
我想修改 /proc/sys/kernel/sched_rt_runtime_us.即使重新启动后,文件中的更改也会保留吗? 内核什么时候读取这个更新的值?
i want to modify
/proc/sys/kernel/sched_rt_runtime_us. Will the change in file persist even after the reboot?
when does kernel read this updated value?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,
/proc
不是持久的。但是,大多数 Linux 发行版将从文件(例如/etc/sysctl.conf
)中读取初始值。在这种情况下,您可以在 sysctl.conf 中将此值设置为:有关详细信息,请参阅
man sysctl
。No,
/proc
isn't persistent. However, most Linux distributions will read initial values from a file such as/etc/sysctl.conf
. In this case, you can set this value insysctl.conf
as:See
man sysctl
for details./proc 公开了内核内部数据结构的值,这些值存储在 RAM 中,所以不,更改不是持久的。如果您想要持久存储它的效果,则必须将修改该值的行添加到 init 脚本中,以便在引导期间更改该值,或者必须更改内核源代码中的默认值。对于某些 proc 值(但可能不是这个),您还可以使用内核命令行选项。
/proc exposes values of data structures internal to the kernel, which are stored in RAM, so no, the change is not persistent. If you want the effect of storing it persistently, you must either add the line modifying the value to an init script, so that the value is changed during boot, or you must change the default value in the kernel source. For some proc values (but probably not for this one) you could also use a kernel command line option.