From owner-freebsd-questions Wed Apr 25 23:37:45 2001 Delivered-To: freebsd-questions@freebsd.org Received: from oddjob.adhesivemedia.com (oddjob.adhesivemedia.com [207.202.159.77]) by hub.freebsd.org (Postfix) with ESMTP id 1E9DB37B423 for ; Wed, 25 Apr 2001 23:37:42 -0700 (PDT) (envelope-from philip@adhesivemedia.com) Received: from localhost (philip@localhost) by oddjob.adhesivemedia.com (8.11.1/8.11.1) with ESMTP id f3Q6bfM33990; Wed, 25 Apr 2001 23:37:42 -0700 (PDT) (envelope-from philip@adhesivemedia.com) Newsgroups: local.freebsd.questions Date: Wed, 25 Apr 2001 23:37:40 -0700 (PDT) From: Philip Hallstrom Cc: Subject: Re: /kernel: file: table is full ??? In-Reply-To: <200104260032.f3Q0Wem38959@explorer.rsa.com> Message-ID: References: <200104260032.f3Q0Wem38959@explorer.rsa.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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