Hi,

I'd like to add some more enhancements to my sysstat utlitiy, but I am stuck 
with libkstat's interface.

libkstat does not provide any mechanism to determine the maximum instance of a 
certain module. For cpus this issue can be worked arround by asking 
sysconf(_SC_CPUID_MAX) for the maximum id (just Solaris >= 9) or taking into 
account the value of unix/system_misc/ncpus.

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.

Apart from disks, I'd also be interested in summing up some network interface 
statistics. So I'd be interested in looking up kstat structures of a certain 
class (e.g. net in this case). But libkstat only seems to have kstat_lookup 
which only supports looking up by name, module, and instance, but not class.

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).

Cheers,
Tom
 
 
This message posted from opensolaris.org
_______________________________________________
opensolaris-discuss mailing list
[email protected]

Reply via email to