No, there is no documentation for libzfs. Your only bet is to look at the opensolaris source and see how its being used. It's a consolidation-private library, so it's not intended for public use. That being said, if you're willing to go through some growing pains on upgrade/patch, you're welcome to use it.
For Solaris 10 updates, you're going to run into problems because the interfaces are different between the two solaris versions. Since the S10 source isn't open, it's hard to tell what interface changes have been backported or not. For versions of libzfs with libzfs_init(), you need to do (checking for NULL in each case): libzfs_handle_t *hdl = libzfs_init(); zpool_handle_t *zhp = zpool_open(hdl, "poolname"); nvlist_t *stats = zpool_get_stats(zhp); You'll have to pick apart the nvlist contents on your own. For versions of libzfs prior to libzfs_init(), you do: zpool_handle_t *zhp = zpool_open("poolname"); nvlist_t *stats = zpool_get_stats(zhp); Hope that helps. For figuring this stuff out, the source is your friend ;-) - Eric On Thu, Aug 31, 2006 at 12:07:35PM -0700, SRIKANTH KONERU wrote: > Hi there... > I have solaris 5.10 update 2 > I am trying get some iostats on a zpool, A little bit digging indicated thtat > I can do this by doing > libzfs_init and zpool_open and so on .. library calls. > > But /lib/libzfs.so doesn't have the implementation of libzfs_int() , checked > with > /ucs/ccs/bin/nm utility. > > another issue with zpool_open, zpool_open emits > file "cannot open '': invalid pool name" set errno to ENOENT, > even though I have provided the correc zpool name. > > Please let me know if there are any pointers how to use libzfs, like man > pages or > documentation. > > Thx > SRIKANTH KONERU > > > This message posted from opensolaris.org > _______________________________________________ > zfs-discuss mailing list > zfs-discuss@opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss -- Eric Schrock, Solaris Kernel Development http://blogs.sun.com/eschrock _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss