file handles - who ate them?!

From: Dave Gilbert (Home) (gilbertd@treblig.org)
Date: Wed Aug 07 2002 - 09:02:55 EST


Hi,
   I had a bad case of running out of file handles over the weekend and
wondered:

    1) If there are any tools for trying to track down what ate them
all. Looking at the state of the system today I see 2541
(allocated)/763 (used)/ 8192 (max). I guess I'd like to know when it
hit the peak and what the state of the system was around that time (to
find out if it was a particular cron job etc). I can see what is using
them now - but that isn't too much use.

   2) Why is there a file-nr-max? Is it the case that the kernel
allocates file handles as it needs them (i.e. the 2541 above) - but
never frees back? Is it just as a stop to stop rogue programs taking
all RAM? (i.e. why don't we just let the allocated amount grow as
needed). Is there a reason I shouldn't just set this to a huge figure?

   3) Is it possible to change what happens on hitting the max
condition? - in someways for me it would have been better if it had
panic'd and rebooted rather than sitting there and sulking not being
able to open files. (Getting it to log a dump of open files at this time
would be the ideal).

(2.4.16, x86)

Dave

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Aug 07 2002 - 22:00:36 EST