[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: filehandles



Answering myself and maybe helping others:

On Wed, Oct 03, 2001 at 01:09:16PM -0500, Danny Sauer wrote:
> Hey, I don't recall offhand if the maximum number fo filehandles is a
> runtime configurable thing ("echo 2048 > /proc/kernel/filehandles") or
> a compiletime thing.  Anyone know off the top of their heads how to
> increase it?

echo "8192" > /proc/sys/fs/file-max
google is neat, but I still don't know what the numbers in file-nr mean.
Maybe some more google will help...  What kind of performance hits should
I expect for wastefully enabling more filehandles than I need?  Just less
kernel memory?  Pirates, trying to kill me for buying presents I can't
afford with a crappy credit card?

> As a side note, X has been really unstable for me recently, and netscape
> crashes pretty frequently (more frequently than normal for netscape).  I
> have a feeling that "not enough filehandles" is related to that.  Is there
> something like lsof or an option to lsof that'll list open filehandles
> with processes, or the number associated with processes, or something
> like that?

experimentation yields the small shell script:

for P in `ps h | cut -d\  -f1`; do
	D="/proc/$P/fd";
	if [ -x "$D"]; then
		echo $P; ls -l $D; echo;
	fi
done

Man, netscape opens a lot of pipes...

If I just wildly delete the symlinks in the /proc/pid/fh directory, will
that just close the handle, or is it more likely to cause rampant
unhappiness with the running programs?

--Danny, who should've just google'd first :)
-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.