Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

migrated from stackoverflow.com Sep 25 '11 at 17:44

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 11 down vote accepted

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/*

share|improve this answer
    
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 '11 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 '11 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 '11 at 19:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.