On Fri, Dec 12, 2008 at 09:45:08AM -0500, James Carlson wrote:
> Chip Bennett writes:
> > Pfiles should be rewritten to not stop processes.  I had to go look at
> > the code to make sure you were right on this.  If lsof can gather open
> > file info without stopping processes, why can't pfiles do that.
> 
> lsof does it because it reads the volatile kernel structures on the
> running system.  Often that works because things aren't changing right
> at the moment when you look at them.  But it's also possible that you
> get back garbage.
> 
> pfiles stops the process because it uses the debugging interfaces,
> just as (say) mdb or gdb.

But not kmdb.  mdb -k can do everything that pfiles can do but without
stopping processes.  The only problem with th kmdb approach is that not
all sockets are (were, now that Volo has integrated?) associated with
file structs, so finding open sockets for kernel-land services required
quite a bit more work than merely walking the process table.

I have a very out of date script lying around that did just that.

But the point is that kmdb scripting and lsof are on the same footing.

> > Or, if there is some additional reliability/consistency to be gained by
> > stopping the process, perhaps pfiles could be modified to have an option
> > that causes it stop the process, but by default doesn't, just to be
> > safe.
> 
> The long-term answer, I think, is that we need stable kernel
> interfaces that will provide the information that lsof needs to work.

I agree.

Nico
-- 
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to