From owner-freebsd-stable@FreeBSD.ORG Sat Jan 12 23:29:28 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3279E8B6 for ; Sat, 12 Jan 2013 23:29:28 +0000 (UTC) (envelope-from mauzo@anubis.morrow.me.uk) Received: from isis.morrow.me.uk (isis.morrow.me.uk [204.109.63.142]) by mx1.freebsd.org (Postfix) with ESMTP id 0F2E2D8C for ; Sat, 12 Jan 2013 23:29:27 +0000 (UTC) Received: from anubis.morrow.me.uk (host109-150-212-220.range109-150.btcentralplus.com [109.150.212.220]) (Authenticated sender: mauzo) by isis.morrow.me.uk (Postfix) with ESMTPSA id 86DBB450DE; Sat, 12 Jan 2013 23:29:19 +0000 (UTC) X-DKIM: OpenDKIM Filter v2.4.1 isis.morrow.me.uk 86DBB450DE DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=morrow.me.uk; s=dkim201101; t=1358033360; bh=oVWBquLVZFqL3UxOEuscLuSP1sxs7VFg09DFYW18cfc=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type: In-Reply-To; b=Ssyws89+bB5Xws2EXB1RYP7RG4Fl0+4ylcB8O01VNiSs7YAKzDZilwd0MHtmI1yNY LM3AbHZsxTNFQYc1xvtzPURN4f7/u8fyknmsnEjvGcI63Mqb0ON0LaRe6aW5D9sqdl 5bSqAWpZvEuKfghJrnWza7LKYOFl27xbPC+pvfIg= X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.97.5 at isis.morrow.me.uk Received: by anubis.morrow.me.uk (Postfix, from userid 5001) id 844648294; Sat, 12 Jan 2013 23:29:15 +0000 (GMT) Date: Sat, 12 Jan 2013 23:29:14 +0000 From: Ben Morrow To: takeda@takeda.tk, freebsd-stable@freebsd.org Subject: Re: Determining which process needs to be restarted after update Message-ID: <20130112232914.GA4922@anubis.morrow.me.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201467687.20130112121822@takeda.tk> X-Newsgroups: gmane.os.freebsd.stable Organization: morrow.me.uk User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2013 23:29:28 -0000 Quoth Derek Kulinski : > > I personally really like OpenSuSE command which is: zypper ps > What it does is it lists all processes that have files opened that > currently don't exist (i.e. link count is 0). This helps tremendously > in determining which processes need to be restarted after an update. > > Is there something similar for FreeBSD? I was thinking of using > lsof +L1, but on FreeBSD that command is not capable of displaying > names of files that were deleted, many entries returned are for > example processes that have open sockets. It also does not list names > of the deleted/replaced files. > > Is there a tool that is capable to do such task, or maybe some > additional options to lsof? I'm not too familiar with it myself. procstat -fa, look for entries with 'v' in the 'T' column and '-' in the 'NAME' column (or get awk to look for you). You may also want to check the 'V' column: see the manpage for the codes. This won't tell you what the file used to be called before it was deleted: I don't think the kernel keeps that information. Ben