Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Apr 2001 23:37:40 -0700 (PDT)
From:      Philip Hallstrom <philip@adhesivemedia.com>
Cc:        <questions@freebsd.org>
Subject:   Re: /kernel: file: table is full ???
Message-ID:  <Pine.BSF.4.31.0104252336060.33950-100000@oddjob.adhesivemedia.com>
In-Reply-To: <200104260032.f3Q0Wem38959@explorer.rsa.com>
References:  <Pine.BSF.4.31.0104251456190.29113-100000@oddjob.adhesivemedia.com> <Pine.BSF.4.31.0104251501130.29480-100000@oddjob.adhesivemedia.com> <200104260032.f3Q0Wem38959@explorer.rsa.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks Mike!  fstat did the trick.  In particular this did the trick:

fstat | sed 's/  */ /g' | cut -d" " -f2 | perl -i -n -e 'chop; $x{$_}++; EN=
D { while( ($k, $v) =3D each(%x) ) { print("$k\t$v\n"); };}'

That's ugly, but it prints out a sum of files by process.

Turns out a script I wrote in perl was opening a pipe and when the script
was restarted it wasn't closing that pipe so I had a lot of "tail"
commands hanging around.

thanks again.

On Wed, 25 Apr 2001, Mikko Tyolajarvi wrote:

> In local.freebsd.questions you write:
>
> >So naturally, as soon as I post a question I start to find some answers =
on
> >my own... *sigh*
>
> >I can apparently adjust the kern.maxfiles variable as the FAQ suggests t=
o
> >whatever I want.  It says that it might need to go as high as 10,000 for
> >busy servers (which mine isn't).  Mine is currently set to 2088.
>
> >So my new questions are:
>
> >- is there any risk in raising it really high?
> >- how can I tell which processes are using a lot of files?
>
> "pstat -T" shows you the global usage, "fstat" lists all file
> descriptors, sorted by process.  "lsof" (in ports) can give you some
> more info, especially names of open files.
>
>      $.02,
>      /Mikko
>
> >Thanks!
>
> >On Wed, 25 Apr 2001, Philip Hallstrom wrote:
>
> >> Hi all -
> >> =09Recently I've been getting this error message.  The box is doing
> >> quite a few different things (mail, apache, postgres, mysql, etc..), b=
ut
> >> not enough in my mind to be getting this error for a legitimate reason=
=2E
> >>
> >> What I need is information on how to track down what process is causin=
g
> >> the problem?
> >>
> >> Thanks.
> >>
> >>
> >> To Unsubscribe: send mail to majordomo@FreeBSD.org
> >> with "unsubscribe freebsd-questions" in the body of the message
> >>
>
>
> >To Unsubscribe: send mail to majordomo@FreeBSD.org
> >with "unsubscribe freebsd-questions" in the body of the message
> --
>  Mikko Ty=F6l=E4j=E4rvi_______________________________________mikko@rsase=
curity.com
>  RSA Security
>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.31.0104252336060.33950-100000>