2

A lot of settings can be tweaked using magic files in /proc (for example, /proc/sys/kernel/core_uses_pid which names core dump files with the pid).

Which settings are preserved across reboots and which ones do I need to refresh every time?

1 Answer 1

11

Nothing in /proc is directly preserved across reboots. The /proc filesystem is a 'pseudo' filesystem that reflects state inside the running kernel and isn't a reflection of state on any persistent storage medium.

Some stuff has the impression of being preserved because scripts in /etc/init.d/ (or /etc/rc.d, or whatever init-script convention your system uses) that are run at startup will set values in /proc. Try: grep -r '/proc' /etc/init.d/*

3
  • Take sysctl. If you make changes through the sysctl program, those changes are not preserved. However, settings in /etc/sysctl.conf are reflected in each reboot. Is there an equivalent magic file?
    – Foo Bah
    Sep 25, 2011 at 16:33
  • 1
    There is no generic equivalent magic file for preserving settings in /proc to sysctl.conf. There are probably other .conf files that will impact some parts of /proc, but nothing generic. Most init scripts do something like: "echo 0> /proc/sys/dev/raid/speed_limit_min" (this is from hdparm).
    – P.T.
    Sep 25, 2011 at 16:43
  • 1
    @FooBah: using sysctl -w is equivalent to writing to /proc/sys/, just append kernel.core_uses_pid = whatever to your /etc/sysctl.conf file.
    – ninjalj
    Sep 25, 2011 at 19:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .