From owner-freebsd-stable@FreeBSD.ORG Wed Jun 7 16:13:17 2006 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 73EA516CC83 for ; Wed, 7 Jun 2006 13:57:50 +0000 (UTC) (envelope-from dudu.meyer@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF44743D46 for ; Wed, 7 Jun 2006 13:57:49 +0000 (GMT) (envelope-from dudu.meyer@gmail.com) Received: by ug-out-1314.google.com with SMTP id s2so304100uge for ; Wed, 07 Jun 2006 06:57:48 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=fqfYRQ3TbZuJXDZSafqXFRg3+fwniVwIiTH4Q8qv2bVeT5wsp5+Ev3aYMVUEPBfHjlYTrWLa7H0uKEQabNzHUmgV8Ywd9XRk4KMHhKKnUlBJcCuC+0TR7KRd5xTEOIz4WF7oDAndEDIv2vLC940d83A0Kr7fd7jm8D0t1UhZFnY= Received: by 10.67.30.6 with SMTP id h6mr533949ugj; Wed, 07 Jun 2006 06:57:48 -0700 (PDT) Received: by 10.66.222.15 with HTTP; Wed, 7 Jun 2006 06:57:48 -0700 (PDT) Message-ID: Date: Wed, 7 Jun 2006 10:57:48 -0300 From: "Eduardo Meyer" To: stable@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20060606211327.GG32476@bunrab.catwhisker.org> Cc: Subject: Re: How can I know which files a proccess is accessing? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jun 2006 16:13:22 -0000 > > # ps 16543 > > PID TT STAT TIME COMMAND > > 16543 ?? S 0:02.43 /usr/local/sbin/httpd -k start -DSSL > > > > Any tuning would do the job? > > Are you running with tightened up security that might prevent fstat from > accessing /dev/kmem? I don't know fstat failures from experience or > what causes it to just show inode numbers - perhaps delete files that > are still open. > > I'm unsure about the reason for lsof's complaint; if you installed a > package, try rebuilding the port. > > Something different, if fstat and lsof continue to fail: you may try > attaching a syscall tracer such as truss, ktrace or strace (the latter > from ports) to the process and see if it leaks file descriptors. This > may fail due to permissions however. Hello Matthias, No, no security measurements prevent lsof from accessing any device. In fact with lower disk demand (small number of open files) lsof works fine, but in the situation I need it, when the odd things start to happen, it doesnt. If a single proccess is opening hundres of files, lsof fails with the mentioned message. I have tried 2 different versions from lsof, all built from ports (the latest and 2 revisions ago with portdowngrade to be sure it is not a problem that belongs only to the latest version). fstat doesnt fail under the same workload... My wish is that fstat had an option to show file name instead of inodes :) For those who pointed me using find(1) looking for inum from the output of fstat(1), thank you; it is a very heavy loading option (disk usage increases around 30% while doing this) but it seemed to be the interesting option (at least, the options that worded). Again, thank you everybody who replied.