All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class examples.mo.kstat.build

java.lang.Object
   |
   +----examples.mo.kstat.build

public class build
extends Object
The "kstat" example runs only on machines with Solaris Os. The class build automatically generates a M-bean for any kernel information that can be accessed using the kstat interface. The class takes as input a module name and instance name and generates the associated Java M-bean. The M-bean will make use of the KernelStat class that allows to access kstat info from Java.

In order to start the class, you need to invoke:

where .

As an example, the program could be invoked as follows in order to generate a M-Bean for accessing kernel information on the ethernet driver le:


In this example, the program will generate a M-bean called "le0.java". Note that in order to work you need to have in your LD_LIBRARY_PATH access to the libstat.so library.

In order to ease the generation of M-beans and their associated C-beans a script called doit is provided under examples/src/mo/kstat. The script takes the same input as the build program. But the script invokes the build program, then invokes mogen, then javac for compiling the generated M-bean and the objects created by mogen.

Then, if you have a Java Dynamic Management agent supporting the HTML adaptor (for instance the base agent), then you can try to instantiate the newly created bean using a Web browser. To do so, go to the admin page. In the field class name, enter

where instance name could be le0.


Constructor Index

 o build()

Method Index

 o main(String[])

Constructors

 o build
 public build()

Methods

 o main
 public static void main(String args[])

All Packages  Class Hierarchy  This Package  Previous  Next  Index