May 12, 2024, 08:51:51 PM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: how to edit gc_thresh1,gc_thresh2,gc_thresh3 files  (Read 5389 times)

Offline rajeshchaturvedijk

  • Linux Noob !
  • *
  • Posts: 6
how to edit gc_thresh1,gc_thresh2,gc_thresh3 files
« on: September 22, 2009, 09:01:35 AM »
I m unable to edit files gc_thresh1 etc. in /proc/sys/net/ipv4/default

Offline kaushalpatel1982

  • LST CareTaker
  • Linux Learner
  • *****
  • Posts: 87
Re: how to edit gc_thresh1,gc_thresh2,gc_thresh3 files
« Reply #1 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.

Offline rajeshchaturvedijk

  • Linux Noob !
  • *
  • Posts: 6
Re: how to edit gc_thresh1,gc_thresh2,gc_thresh3 files
« Reply #2 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

Offline kaushalpatel1982

  • LST CareTaker
  • Linux Learner
  • *****
  • Posts: 87
Re: how to edit gc_thresh1,gc_thresh2,gc_thresh3 files
« Reply #3 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.