From: Padraig Brady (padraig.brady at domain corvil.com)
Date: Thu 05 Sep 2002 - 11:18:42 IST
John P. Looney wrote:
> On Thu, Sep 05, 2002 at 10:44:40AM +0100, kevin lyda mentioned:
>>On Thu, Sep 05, 2002 at 09:55:16AM +0100, John P. Looney wrote:
>>> I've a server running a lightly-loaded postgres install.
>>> Though lsof reckons only 1197 filehandles are in use, file-nr says
>>>[root at domain jny06 /root]# lsof|wc -l
>>i'm trying to work out how this message matches it's subject. anytime
>>i've had to debug fd leaks, i've looked in a specific /proc/<pid>/fd
>>dir to figure out why. wouldn't it be best to figure out exactly which
>>process is hogging fd's and try to rectify that issue?
> That's the wierd thing...
> [root at domain jny06 /proc]# ls -l /proc/*/fd/*|wc -l
> [root at domain jny06 /proc]#
> Which is *way* off.
That seems way too low. How many processes are you running?
# echo /proc/[1-9]*/ | wc -w
My file numbers seem much more sensible:
# echo /proc/[1-9]*/fd/* | wc -w
# cat /proc/sys/fs/file-nr
2911 1019 52271
Note the above doesn't handle threads.
I.E. if you have a few nautilus threads for e.g.
their file handles will be counted multiple
times. I really wish Linux handled threads
better. Maybe with NGPT...
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:18:40 GMT