[osol-discuss] Re: Shipping "lsof" with Solaris ? / was: Re: problem with /t

James Carlson james.d.carlson at Sun.COM
Mon Jan 8 13:35:18 PST 2007


Dave Marquardt writes:
> a> Just having to compile `lsof` every time the kernel rev changes is already
> a> too much overhead. At any given day, there are many issues, feature
> a> requests and fixes to the build, that it is really inefficient to have one
> a> more thing to worry about -- some crappy utility written by an external 3rd
> a> party whose only benefit is to show open ports and files.
> 
> It occurred to me that we might be able to leverage the CTF
> information that mdb uses to decode structures in the kernel.
> Unfortunately, last I looked, the CTF lookup code in mdb was not a
> public interface, so I'm not sure we can go there at this point.  But
> if we could, then we could use CTF to look up the structure definition
> and avoid recompiling lsof (or some similar program).

That only solves part of the problem (the binary offset issues).  A
bigger problem is that the structures and the structure members
themselves are not stable between patches or builds -- they're not
stable interfaces in the first place.  This means that if someone
renames "foo" to "bar," CTF isn't going to be able to tell you what
happened to "foo."

-- 
James Carlson, Solaris Networking              <james.d.carlson at sun.com>
Sun Microsystems / 1 Network Drive         71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677



More information about the opensolaris-discuss mailing list