|
By Rick Weisner, March 2007
|
|
|
Introduction
Working in Sun's Adoption Systems Practice for the Solaris 10 OS, I do performance analysis and support software development in the U.S. Frequently, during the course of my work, I run across situations in which customers are using system() to execute a script that uses awk, perf, grep, cut, and so on to extract various operating system metrics of interest. The numerous forks and execs are expensive and harm performance. I usually suggest using the libkstat APIs to determine the desired metrics from within the program code. I am often asked to provide examples on how to use the kstat APIs.
This article provides examples on how to use the kstat and libkstat APIs to extract metrics from the Solaris OS. The examples include "Walking Through All the kstat" and "Getting NIC kstat Output Using the Java Platform."
Download the document as PDF.
|
|