> ? Do we have option to reset the kernel statistics in our program?

No, but this isn't necessary.

> ? When I run the command "kstat sctp 10" on my Solaris system, it
> provides me the statistics in every 10 seconds. So can I have the same
> option when using the kstat framework in my implementation? If yes,
> can you please tell me the workaround for that? 

The kstat command is written using the same interfaces that are
available to C programmers.  It's certainly possible to re-create the
behavior that you describe.

Check out the explanation for ks_snaptime in man page for kstat(3KSTAT).
This shows you how to compute activity rates by comparing kstat
snapshots and dividing by the time elapsed between two snapshots.  It
would be straight forward to compute the difference between two
snapshots, if you're just interested in comparing number of events that
occured between two snapshots.

The very first search result from Google for the terms "kstat example"
returned a nice article from the Sun Developer Network.  It might be
helpful and is available here:

        http://developers.sun.com/solaris/articles/kstatc.html

Good luck.

-j
_______________________________________________
perf-discuss mailing list
[email protected]

Reply via email to