Anantha N. Srirama
2007-Feb-14 01:29 UTC
[zfs-discuss] Need help making lsof work with ZFS
I contacted the author of ''lsof'' regarding the missing ZFS support. The command works but fails to display any files that are opened by the process in a ZFS filesystem. He indicates that the required ZFS kernel structure definitions (header files) are not shipped with the OS. He further indicated that he rummaged through the OpenSolaris source tree and the files doesn''t match either of the Solaris 10 Update 2 or 3. Can one of the ZFS maestros point me in the direction of where these files can be found. I find it hard to believe that the header files are not shipped with the OS. Thanks, any help will be appreciated since ya''ll agree that ''lsof'' is an invaluable tool. Sooner it is available better it is for ZFS users. This message posted from opensolaris.org
On 2/13/07, Anantha N. Srirama <anantha.srirama at cdc.hhs.gov> wrote:> I contacted the author of ''lsof'' regarding the missing ZFS support. The command works but fails to display any files that are opened by the process in a ZFS filesystem. He indicates that the required ZFS kernel structure definitions (header files) are not shipped with the OS. He further indicated that he rummaged through the OpenSolaris source tree and the files doesn''t match either of the Solaris 10 Update 2 or 3. > > Can one of the ZFS maestros point me in the direction of where these files can be found. I find it hard to believe that the header files are not shipped with the OS. > > Thanks, any help will be appreciated since ya''ll agree that ''lsof'' is an invaluable tool. Sooner it is available better it is for ZFS users.I don''t have any S10U2,3 handy to look at, but the b55b I''m using at the moment has, according to /var/sadm/install/contents: /usr/include/libzfs.h [...] SUNWhea /usr/include/sys/fs/zfs.h [...] SUNWhea -- Eric Enright
Anantha N. Srirama
2007-Feb-14 02:28 UTC
[zfs-discuss] Re: Need help making lsof work with ZFS
I did find zfs.h and libzfs.h (thanks Eric). However, when I try to compile the latest version (4.87C) of lsof it finds the following files missing: dmu.h zfs_acl.h zfs_debug.h zfs_rlock.h zil.h spa.h zfs_context.h zfs_dir.h zfs_vfsops.h zio.h txg.h zfs_ctldir.h zfs_ioctl.h zfs_znode.h zio_impl.h. I looked on my server which has the full cluster of Solaris 10 Update 2 and can''t find these files. Thanks. This message posted from opensolaris.org
Matthew Ahrens
2007-Feb-14 20:56 UTC
[zfs-discuss] Re: Need help making lsof work with ZFS
Anantha N. Srirama wrote:> I did find zfs.h and libzfs.h (thanks Eric). However, when I try to > compile the latest version (4.87C) of lsof it finds the following > files missing: dmu.h zfs_acl.h zfs_debug.h zfs_rlock.h zil.h spa.h > zfs_context.h zfs_dir.h zfs_vfsops.h zio.h txg.h zfs_ctldir.h > zfs_ioctl.h zfs_znode.h zio_impl.h. > > I looked on my server which has the full cluster of Solaris 10 Update > 2 and can''t find these files. Thanks.These files are not shipped with Solaris 10. You can find them in opensolaris: usr/src/uts/common/fs/zfs/sys/ The interfaces in these files are not supported, and may change without notice at any time. --matt
Adam Leventhal
2007-Feb-18 18:43 UTC
[zfs-discuss] Re: Need help making lsof work with ZFS
On Wed, Feb 14, 2007 at 01:56:33PM -0700, Matthew Ahrens wrote:> These files are not shipped with Solaris 10. You can find them in > opensolaris: usr/src/uts/common/fs/zfs/sys/ > > The interfaces in these files are not supported, and may change without > notice at any time.Even if they''re not supported, shouldn''t the header files be shipped so people can make sense of kernel data structure types? Adam -- Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl
Anantha N. Srirama
2007-Feb-18 20:22 UTC
[zfs-discuss] Re: Re: Need help making lsof work with ZFS
I think so. After all there are features shipped which are not fully baked/guranteed like the send/receive. Isn''t shipping the header files better than letting developers guess their structure and possibly make mistakes? Of course the developer can compile against OpenSolaris source but far easier to compile against the shipped version from Sun. In this age of FOSS lot of people expect to download and compile the source and that won''t possible with tools that interact with ZFS, right? This message posted from opensolaris.org