Linux Forums - Linux Help,Advice & support community:LinuxSolved.com

Network Troublshooting => Linux Servers Support => Topic started by: rajeshchaturvedijk on September 22, 2009, 09:01:35 AM

Title: how to edit gc_thresh1,gc_thresh2,gc_thresh3 files
Post by: rajeshchaturvedijk on September 22, 2009, 09:01:35 AM
I m unable to edit files gc_thresh1 etc. in /proc/sys/net/ipv4/default
Title: Re: how to edit gc_thresh1,gc_thresh2,gc_thresh3 files
Post by: kaushalpatel1982 on September 23, 2009, 01:40:14 PM
Can you please explain the steps you are following to edit the file?

This will help us to understand your problem and resolve the issue asap.
Title: Re: how to edit gc_thresh1,gc_thresh2,gc_thresh3 files
Post by: rajeshchaturvedijk on September 23, 2009, 04:02:17 PM
I m try to edit file gc_thresh1,2,3 in /proc/sys/net/ipv4/neigh/default/gc_thresh1 but giving error ;file in use.

now i got success by edit # vi /etc/rc.local
                                    echo 1024 > /proc/sys/net/ipv4/neigh/default/gc_thresh1
                                    echo 4096 > /proc/sys/net/ipv4/neigh/default/gc_thresh2
                                    echo 8192 > /proc/sys/net/ipv4/neigh/default/gc_thresh3
                                    # ./rc.local
Title: Re: how to edit gc_thresh1,gc_thresh2,gc_thresh3 files
Post by: kaushalpatel1982 on September 24, 2009, 04:38:15 AM
Rather running this commands by rc.local file it should be added in /etc/sysctl.conf. Just add following lines as per your requirement in /etc/sysctl.conf.

net.ipv4.neigh.default.gc_thresh1 = 1024
net.ipv4.neigh.default.gc_thresh2 = 4096
net.ipv4.neigh.default.gc_thresh3 = 8192

Then  run command "sysctl -p ". This will apply all settings to the above files on runtime. Even when you reboot the machine you will find the same settings.

Hope your problem resolve by this steps. Best of Luck.