Re: sysctl defaults

Garst R. Reese (reese@isn.net)
Mon, 30 Mar 1998 14:41:20 -0400


This is a multi-part message in MIME format.
--------------A4BDA36C3BE1C8C6238E86E8
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Rik van Riel wrote:
>
> On Mon, 30 Mar 1998, Garst R. Reese wrote:
>
> > With the growing number of sysctl options, it seems to me that one could
> > make some rather disastrous errors trying to tune the kernel.
> > A shell script that would restore everything to the defaults would be
> > quite useful, along with a boot option to do the same. The shell script
> > could contain comments to explain the options as well.
>
> The documentation you need is in linux/Documentation/sysctl...
>
> succes,
>
> Rik.
Yes, I read that. Great info for hackers. Now, bdflush has 9 parameters,
my swapping behavior truly sucks with my 20Mb Laptop and the only way I
can change that is buy a new one :(.
I try cat "40 500 64 256 15 30*HZ 5*HZ 1884 2" > /proc/sys/vm/bdflush ??
except changing something. Now I make a typo and crash my system. How do
I recover.
I think we need some sysctl utilities that prove some sanity checks and
some info that says "If you have a gig of mem you might like this"
"If you have only 8Mb try this".
At the very least, I think concrete examples of how to do things would
be a large benefit in Linux/Unix docs as xxxix displaces M$ :)
I'm attaching the sh script that Adam Heath so kindly sent to me.
(Credit added by me). Thanks Adam
Thanks Rik

-- 
Garst
--------------A4BDA36C3BE1C8C6238E86E8
Content-Type: application/x-sh; name="sysctl.sh"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="sysctl.sh"

#!/bin/sh # Contributed by Adam Heath adam.heath@usa.net sdir=/procsave pdir=/proc/sys function doit(){ echo $* eval $* } if [ ! -d "$sdir" ];then doit mkdir $sdir fi case "$1" in "save") rm $sdir/* -r cd $pdir for dir in `find -type d ! -name .` ;do doit mkdir $sdir/$dir done for file in `find -type f ! -name .` ;do doit cp $pdir/$file $sdir/$file done ;; "restore") cd $pdir for file in `find -type f ! -name .` ;do if [ -e $sdir/$file ];then doit cp $sdir/$file $pdir/$file 2>/dev/null fi done ;; esac

--------------A4BDA36C3BE1C8C6238E86E8--

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu