Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Jan 2013 23:29:14 +0000
From:      Ben Morrow <ben@morrow.me.uk>
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>
In-Reply-To: <201467687.20130112121822@takeda.tk>

next in thread | previous in thread | raw e-mail | index | archive | help
Quoth Derek Kulinski <takeda@takeda.tk>:
> 
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130112232914.GA4922>