From owner-freebsd-questions@FreeBSD.ORG Tue Feb 17 14:54:55 2009 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65B571065675 for ; Tue, 17 Feb 2009 14:54:55 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirj.bris.ac.uk (dirj.bris.ac.uk [137.222.10.78]) by mx1.freebsd.org (Postfix) with ESMTP id 2217B8FC32 for ; Tue, 17 Feb 2009 14:54:55 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from seis.bris.ac.uk ([137.222.10.93]) by dirj.bris.ac.uk with esmtp (Exim 4.69) (envelope-from ) id 1LZRLX-0002lZ-1T; Tue, 17 Feb 2009 14:54:54 +0000 Received: from mech-cluster238.men.bris.ac.uk ([137.222.187.238]) by seis.bris.ac.uk with esmtp (Exim 4.67) (envelope-from ) id 1LZRLV-0005ng-5q; Tue, 17 Feb 2009 14:54:49 +0000 Received: from mech-cluster238.men.bris.ac.uk (localhost.men.bris.ac.uk [127.0.0.1]) by mech-cluster238.men.bris.ac.uk (8.14.3/8.14.3) with ESMTP id n1HEsmwA055728; Tue, 17 Feb 2009 14:54:48 GMT (envelope-from mexas@bristol.ac.uk) Received: (from mexas@localhost) by mech-cluster238.men.bris.ac.uk (8.14.3/8.14.3/Submit) id n1HEslbh055727; Tue, 17 Feb 2009 14:54:47 GMT (envelope-from mexas@bristol.ac.uk) X-Authentication-Warning: mech-cluster238.men.bris.ac.uk: mexas set sender to mexas@bristol.ac.uk using -f Date: Tue, 17 Feb 2009 14:54:47 +0000 From: Anton Shterenlikht To: Randy Belk Message-ID: <20090217145446.GA55629@mech-cluster238.men.bris.ac.uk> References: <20090217134330.GA53766@mech-cluster238.men.bris.ac.uk> <946140ad0902170602v5d41eab5hf63a489476e663b6@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <946140ad0902170602v5d41eab5hf63a489476e663b6@mail.gmail.com> User-Agent: Mutt/1.5.19 (2009-01-05) X-Spam-Score: -1.4 X-Spam-Level: - Cc: questions@freebsd.org, Anton Shterenlikht Subject: Re: w(5) shows non-existent or lost process? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2009 14:54:55 -0000 On Tue, Feb 17, 2009 at 08:02:12AM -0600, Randy Belk wrote: > On Tue, Feb 17, 2009 at 7:43 AM, Anton Shterenlikht wrote: > > The who (or w, or finger) command shows that I'm still logged into ttyp5, > > even though I have rebooted the box many times since. Does this mean > > the corresponding entry in /var/run/utmp is wrong and shouldn't be there, or is there > > still some process attached to ttyp5? > > > > ouput of w: > > > > USER TTY FROM LOGIN@ IDLE WHAT > > mexas p4 1:32pm - w > > mexas p5 :0. 26Jan09 21days - > > > > ps ax | grep ttyp5 > > shows no process > > > > Looking at w(1) man page it seems that "-" in WHAT can be an indication > > that the process failed but not cleanly and that there could be some forked > > sub-process still alive. Does this make sense? Which other commands I can use > > to see what's going on? > > > > LSOF is your friend! The port is located in /usr/ports/sysutils/lsof > To find out what is using ttyp5 type in "lsof | grep ttyp5" and it > should show you the process # lsof |grep ttyp5 # this is 6.4-stable alpha which might not be fully supported by lsof, according to the man page. Anything else I can try? many thanks anton -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 928 8233 Fax: +44 (0)117 929 4423