All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----examples.mo.kstat.build
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:
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:
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
public build()
public static void main(String args[])
All Packages Class Hierarchy This Package Previous Next Index