* 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. > Is it possible to walk the datastructures of libkstat? As I'd also > like to support Solaris 8 and 9, I am not really asking for an > enhancements of libkstat, but for an idea or pointer, how one can > access the relevant data. I've looked a little bit into libdevinfo, > but I am not sure, if it will give me everything I need. Additionally, > libdevinfo is out of sync with libkstat concerning dynamic > reconfiguration making everything even more difficult. > > Any ideas or pointers to docs (commented headers are fine). (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. - Stephen -- Stephen Hahn, PhD Solaris Kernel Development, Sun Microsystems [EMAIL PROTECTED] http://blogs.sun.com/sch/ _______________________________________________ opensolaris-discuss mailing list [email protected]
