> * Thomas Maier-Komor <[EMAIL PROTECTED]> > [2006-04-27 08:19]: > > But what can one do for disks/metadisks? There I > have the same problem > > that they aren't enumerated in a sequence, but > instead their > > enumeration can have holes. I tried to analyze what > kstat does > > executing "apptrace -T libkstat kstat", but there > seems to be a bug in > > apptrace which makes apptrace terminate at once. > > Use > > truss -t \!all -u libkstat:* kstat > instead.
Thanks for the workaround. > (You can ask for enhancements of libkstat, once > you're ready. There > is also the Perl module, and I would like, at some > point, to get Peter > Tribble and Gary to figure out what a public > org.opensolaris.os.kstat > Java class should look like.) > In any case, the easiest example is to look at > iostat/mpstat/vmstat, > which were the initial kstat consumers. Jonh Levon > recently > commonized the code these tools use; for disks, look > at > > http://cvs.opensolaris.org/source/xref/on/usr/src/cmd/stat/iostat/iostat.c > > and the functions it calls. I was there before I came here, and got lost somewhere at struct snapshot, when I though this probably is a private API subject to change and different under Solaris 8 and 9. But doesn't matter - walking kstat_t is really easy... Tom P.S.: quoting is somewhat broken here in the forum, isn't it? This message posted from opensolaris.org _______________________________________________ opensolaris-discuss mailing list [email protected]
