Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Mar 2012 10:56:40 +0200
From:      Kurt Jaeger <lists@opsec.eu>
To:        freebsd-stable@freebsd.org
Subject:   Re: Too many open files
Message-ID:  <20120326085640.GB5335@home.opsec.eu>
In-Reply-To: <4660483b96cf883fd66b46f4578d1def.squirrel@mail.digital-infotech.net>
References:  <a8f31306b066f86beabc61fce1e2b5fb.squirrel@mail.digital-infotech.net> <CADGWnjWTNviAyfReZ-fy0rhF=DKsA57rCscYtsU=v25rTMq5Xw@mail.gmail.com> <4F7019FC.4090907@ShaneWare.Biz> <4660483b96cf883fd66b46f4578d1def.squirrel@mail.digital-infotech.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi!

> >  From knowing that you have too many files open you can increase the
> > maxfile numbers - but if you want to know what uses them try this -
> >
> > lsof -n | awk '{print $2 "\t" $1}' | sort | uniq -c | sort

On my system, it shows interesting numbers for firefox-instances:

3895 4150       firefox-b
4160 72958      firefox-b
4240 3594       firefox-b
4320 4232       firefox-b
4431 89391      firefox-b

This seems to come from threads, where lsof shows the same
descriptor as open for multiple times, even if it comes from the
same process memory.

For example for pid 4232:

lsof -n | grep icon-theme.cache | grep 4232 | wc -l

firefox-b  4232         pi  txt     VREG              0,102              10784  924293 /usr/local/share/icons/hicolor/icon-theme.cache

This happens on 8.1-REL-p5 amd64. So the method is not fail-safe
for the real number of open files.

-- 
pi@opsec.eu            +49 171 3101372                         8 years to go !



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120326085640.GB5335>