Joachim Worringen stated:
< Greetings,
< 
< we have a benchmark that we use on Linux which among other things 
< reports the CPU load (for usr, sys, irq, io) and the interrupt rate (for 
< a given IRQ or for all). It is very useful to have all vital data in the 
< output of this benchmark, related precisely to each of the various tests 
< performed within a single execution.
< 
< Implementation of this is straightforward on Linux using the /proc file 
< system, resulting in pretty good accuracy provided the sample periods 
< are at least a couple of seconds.
< 
< How can I port these features to Solaris? I know dtrace and *stat tools 
< can report all of this, but we want to collect this data from within the 
< benchmark. Any pointers or ideas?

 libkstat and libdtrace.

   The majority of system statistics etc are/can be gleamed from libkstat
   eg mpstat, iostat and vmstat make use of libkstat.
   Theres intrstat which uses the dtrace library.
    For network theres Tim Cook's nicstat from his blog blogs.sun.com/timc
    which also uses libkstat...

  The source for all these can be viewed at src.opensolaris.org for examples
   on how to use them.  Though the nicstat source is just from Tim's blog.

  Theres a few blogs on howto use libkstat..
    I find it easier to use libkstat then on linux where having to open
   various /proc/* files and parse each files own format..
     (unless theres a libproc on linux to do all this I don't know)

 Even then dtrace can help, look at how to add your own dtrace probes to
  your application ?

Regards,
Sean.
.
< 
<   Joachim
< 
< -- 
< Joachim Worringen, Software Architect, Dolphin Interconnect Solutions
< phone ++49/(0)228/324 08 17 - http://www.dolphinics.com
< _______________________________________________
< opensolaris-code mailing list
< [email protected]
< http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to