"cannot open file /proc/net/ip_forward" error message

"cannot open file /proc/net/ip_forward" error message

Post by enriqu » Fri, 29 Aug 1997 04:00:00

I've compiled the Linux kernel with ipfowrding and ipaccounting
and I receive this error message when I run the command "ipfwadm -F -l"

what's wrong?


 -------------==== Posted via Sexzilla News ====------------------
    http://www.sexzilla.com        Search, Read, Post to Usenet
 -------------====   With A Whole Lot More  ====------------------


1. "Too many open files in system" -- Understanding /proc/sys/fs/file-nr

After reading several posts just now and running some tests under 7.0,
I have a much better understanding of how to increase the maximum
number of open files and how to monitor the usage of this resource.

As many folks pointed out, increasing max open files is easy:

    # echo 5000 > /proc/sys/fs/file-max

will set the max open files to 5000.

As others pointed out, another useful file is /proc/sys/fs/file-nr.
Here's a view this file on my system, before and after changing

   # cat /proc/sys/fs/file-nr
   4096    1703    4096
   # echo 5000 > /proc/sys/fs/file-max
   # cat /proc/sys/fs/file-nr
   4096    1703    5000

The three numbers in file-nr are most-files-ever-opened,
#-files-available-for-opening, and max-open-files (from file-max).  Or
so I thought.  The left and right numbers are defined correctly, but
the middle number is not so simple.

If max-open-files increased from 4096 to 5000, why did the middle
number not increase by the same amount?  To investigate, I used Expect
to spawn a bunch of processes, each of which consumed 25 or so files:

   Expect> while 1 {puts [exec cat /proc/sys/fs/file-max]; spawn bash}

At first, the middle number counted down from 1703 by 25s.  When it
reached 10, the left number started counting up by 25s.  Then the
middle number would go up a little and down a little, hovering mostly
around 10 or 11.  Loop finally failed with "Too many files in system."

Final view of /proc/sys/fs/file-nr after exiting Expect (which freed
up all those files):

   5000    2607    5000

Once you force the number of open files to top out, the left and right
numbers will be the same.  Only then, will the middle number be the
number of files available to be opened.  In general, though,

   number-of-open-files = left - middle

   number-of-files-available-for-opening = right -
                                         = right - left + middle

And this is the number you really need to know.

This is my first post to a newsgroup!  Please let me know if this
article was useful to you.

2. Floppy freezes system

3. "Can't open file" ( flat file ) and "flock()unimplemented ..."

4. ClusterTools Prism

5. What kind of error is "ERR" in "/proc/interrupts"?

6. mod_autoindex descriptions

7. Relink Kernal - "cannot open " message

8. ATI Radeon 9200 rv280 2D/3D Redhat 9 drivers - brief howto

9. GETSERVBYNAME()????????????????????"""""""""""""

10. What does "kernel: Cannot read proc file system" mean?

11. ?Got "net-pf-4", "net-pf-5" not found, while booting

12. ps command failed and produced "Bus error" or "Segmentation fault" messages

13. The GIMP error mesg (can't open file as "xwd" file)