Making and installing the Client API examples:
 
 
 
 
 
 
        Tools Menu 
        After installing this example, there are now three new menu options in
        the "Tools" menu on the Sun Management Center main console
        window.  These include "Example GUI", "Rlogin",
        and "FTP". 
        Select an agent and select "Tools -> Example GUI" menu choice
        and a pop-up will be displayed that will display the modules available on
        that agent. 
        Select an agent and select "Tools -> Rlogin" menu choice and a
        pop-up will be displayed that will contain an rlogin session for that
        agent machine. 
        Select an agent and select "Tools -> FTP" menu choice and a
        pop-up will be displayed that will allow the user to FTP into that
        agent machine. 
        
        Note: The ExampleSystemCommand wrapper class is only an example
        and specifically written for the FTP example.  This class requires
        "$host" to be present in at least one of the arguments to the class in
        the console-tools.cfg file.  It also requires a node to be selected
        before the application is launched.  SMSystemCommand is the one that
        users should actually use for their applications. 
        Applications Tab 
        After installing this example, there are now two new applications 
        integrated into the "Applications" tab for agents connected
        to this server.  These include "All Modules" and
        "Loaded Modules" 
        Selecting "All Modules" shows the modules that are currently
        available on that agent machine. 
        Selecting "Loaded Modules" shows the modules that are
        currently loaded on that agent machine.
 
 
When the user selects a new menu choice, a Java program provided by the user
is launched.  The Java program is provided contextual information when it is
launched so that it can determine which object the user's mouse was over
when the program was launched.  This is used in this example to display the
cell value that the mouse was hovering over when the user selects the
"Table Context Example" menu choice.
 
	From the Sun Management Center console invoke the module load window for the
	agent where the DEMOessma agent package was installed. 
	From the list of modules, select the Static Menu Module and load it. 
	You can now observe that the Static Menu Module is loaded under Local
        Applications. 
        Right click while the mouse is over the Static Menu module.  You will notice
        the additional menu choices "Static Menu Example" and
        "Module Context Example". 
        The "Static Menu Example" causes the SMHello.class to be executed
        displaying the "Hello World" popup.  Click the "Close"
        button to close this popup.  The "Module Context Example" causes
        the SMContextExample.class to be executed displaying the "Context
        Example" popup.  Click the "Close" button to close this popup. 
        Within the module, right click while the mouse is over the "Static Menu
        Managed Object".  You will notice the additional menu choice
        "Managed Object Context Example".  This choice causes the
        SMContextExample.class to be executed displaying the "Context Example"
        popup.  Click the "Close" button to close this popup. 
        Within the "Static Menu Managed Object", right click while the mouse
        is over any table cell in the "Static Menu Table".  You will notice
        the additional menu choice "Table Context Example".  This choice 
        causes the SMContextExample.class to be executed displaying the "Context
        Example" popup.  Click the "Close" button to close this popup. 
        These menu choices are called "static" because the choices are
        defined statically in the "staticmenu-version01-d.x" module file.
 
 
When the user selects a new menu choice, a Java program provided by the user
is launched.  The Java program is provided contextual information when it is
launched so that it can determine which object the user's mouse was over
when the program was launched.  This is used in this example to display a
range of information about the table cell or table column header
that the mouse was hovering over when the user selects one of the choices
added by this example. 
This example also demonstrates the Cell Editor interface.  This allows
users to enter data values directly into a managed property within a module.
Provided with the Sun Management Center application are a text editor, an
integer editor, a floating-point editor, a boolean (checkbox) editor, and
a combo box editor.  The user is also allowed to extend any of these editors
to define their own custom cell editor.  This example demonstrates these
various types of cell editors.
 
	From the Sun Management Center console invoke the module load window for the
	agent where the DEMOesdma agent package was installed. 
	From the list of modules, select the Dynamic Menu Module and load it. 
	You can now observe that the Dynamic Menu Module is loaded under Local Applications.
        Within this module are two folders "Editable Cell Example" and
        "Dynamic Menus Example".
        The "Editable Cell Example" folder demonstrates the Cell Editor
        feature by allowing users to enter data values directly into the following
        managed properties:
         
        When the user clicks directly on an editable cell, the cell transforms into
        a widget that allows the user to enter the value.  The application will beep
        and reject any invalid value. 
        The "Dynamic Menus Example" folder demonstrates the Dynamic Menus
        feature.  While the mouse is over any table cell in the "Dynamic Menu
        Example", right click while the mouse is over any table cell or table
        column header.  You will notice the following additional menu choices:
         
        These menu choices are called "dynamic" because the choices are
        built dynamically by the SMDynamicMenu.class.  Selecting any of these choices
        causes the ActionListener defined in the SMDynamicMenu.class to be executed
        displaying the "Dynamic Menu Example" popup.  Click the
        "Close" button to close this popup.
 
 
Users may only modify the tabs for Node_Object_Types that were created with the 
es-device script.  First installing the
Service Example: Device Modeling will suffice.
 
        Step 1
 
        Run the es-details program on the Sun Management Center server machine.
        In the following command replace the Node_Object_Type value with
        the value for the modeled agent to be modified.  If the Node_Object_Type
        to be affected was created by installing the "Device Modeling"
        example, then this value would be "MyServer".
 
	From the Sun Management Center console invoke the Host Details Window for
        a host with the same Node_Object_Type that was specified when the
        es-details program was executed.  Only those tabs specified in the 
        inputfile (including the "Hello World" tab) should be visible
        in the Details Window.
 
 
	From the list of modules, select the Helloworld_01 module and load it. 
	You can now observe that the Helloworld_01 module is loaded under Local Applications.
 
 
	The makefile supplied with this example will automatically determine 
	which Solaris release is running at the time the make utility is 
	executed. A subdirectory is automatically created (i.e. 2.5, 2.6, 2.7)
	that will be the location for the derived object files and libraries
 
	From the list of modules, select the Helloworld_02 module and load it. 
	You can now observe that the Helloworld_02 module is loaded under Local Applications.
 
 
	From the list of modules, select the Helloworld_03 module and load it. 
	You can now observe that the Helloworld_03 module is loaded under Local Applications.
 
 
	From the list of modules, select the Helloworld_04 module and load it. 
	You can now observe that the Helloworld_04 module is loaded under Local Applications.
	To set the alarm limits for table fields, from the Sun Management Center Host Details
        Window select a field in any of the following columns:
	 
 
	From the list of modules, select the Mibdemo_01 module and load it. 
	You can now observe that the Mibdemo_01 module is loaded under Local Applications
 
 
        Do the following step on the Sun Management Center agent machine that is to
        be modeled. 
        Make a backup copy of the /var/opt/SUNWsymon/cfg/deviceinfo.conf file.
 
        Do the following step on the Sun Management Center server machine.
        The es-device program is used to model a machine.  This program takes an 
        input file which contains the model details.  The input file for this
        example is the following file:
 
        Note: The input file to es-device, MyServer.conf, assumes that the
        installation directory for Sun Management Center is
        "/opt/SUNWsymon".  If it is installed in a different location,
        it will be necessary to edit the MyServer.conf file to specify the correct
        location of the GIF image files and the MyServerUser.properties file. 
        Run the following commands:
 
        At this point, the agent has been modeled.  If the topology already contains
        any instances of this object, it will be necessary to delete them from
        topology and re-add them to see the changes.  After adding this agent to
        topology, it should now be considered a MyServer object and be visible with
        the new icon.
 
        Again, if the topology contains any instances of this object, it will be
        necessary to delete them and re-add them to see the changes.
 
 
        It is necessary to model the composite object by using the es-device
        program.  This program takes an input file which contains the model details.
        The input file for this example is the following file:
 
        To install the agent component of this example, do the following on the
        Sun Management Center agent machine:
 
        Step 3 
        Run the es-dt program with the -a argument on a Sun Management Center agent
        machine.  This can be the same machine that has the DOT module installed,
        but can also be another agent machine. 
        Note: The Sun Management Center agent process can not be running when the
        es-dt program is executed.  It must be stopped by executing the following
        command as user root:
 
        To install the server component of this example, do the following on the
        Sun Management Center server machine:
 
	From the list of modules, select the DOT module and load it. 
	You can now observe that the DOT module is loaded under Local Applications. 
        Now the composite object can be created by entering a 
        "Discovery Request" or by using the "Edit -> Create an
        Object..." menu choice on the Sun Management Center console main
        window. 
        To run a "Discovery Request", click on the "Tools ->
        Discover..." menu choice on the Sun Management Center main console
        window.  This causes the "Discovery Requests" popup window to
        appear.  Create a request by clicking on the "Add" button.
        Give the request a reasonable name in the "Request Name" field. 
        Enter the IP address of the agent machine where the es-dt program was executed
        in both the "Start IP Address" and the "End IP Address"
        fields.  If the agent is not running on the default port of 161, then enter
        the port number in the "Also Check Port" field.  Click on the
        "OK" button, and select "Yes" when the popup asks
        "Do you want to start the request upon creation?".  This will cause
        the request to be executed, and will cause the composite object to be
        discovered.  The composite object should now be visible in the Sun Management
        Center main console window. 
        You can delete a composite object by selecting the composite object
        and then clicking on the "Edit->Delete Object/Connection..." menu 
        choice on the Sun Management Center main console window.  Feel free to 
        delete and discover the composite object as many times as desired.
        You may re-run any "Discovery Request" by selecting the request
        in the "Discovery Requests" window and clicking on the
        "Start" button. 
        The "Log" button in the "Discovery Requests" window
        is also useful for viewing the progress of the request.  The
        "Log" button brings up a separate "Request Log File"
        popup.  Click on the "Refresh" button to refresh the view of
        the log.
 
        To unload this example, go to the Sun Management Center Details window
        for the agent where the DEMOesdsa package was installed.  Under the
        Browser tab, right click over the DOT module and choose "Unload".
 
        Do the following on the Sun Management Center agent machine where the
        agent_package was installed:
 
        Do the following on the Sun Management Center agent machine where the
        es-dt script was executed with the -a argument:
 
        Do the following on the Sun Management Center server machine:
 
Client API Examples
	Build the examples by typing:
	% mkdir ~/de_examples
	% cp -r /opt/SUNWsymon/sdk/examples ~/de_examples
	% cd  ~/de_examples/examples/client
	% make
	Run a client API example as follows:
	% runTest <testname> <args>
Console Integration Notes
Console Integration Example: Integrating with the Tools Menu and
   Applications Tab
The following subsections describe how to use this example:
Contents
        This example consists of the following java integration files that are installed
        on the server:
        ExampleGUITool.java
        ExampleModuleApp.java
        ExampleSystemCommand.java
        ExampleModuleApp.properties
        ExampleSystemCommand.properties
Building this Example
	% mkdir ~/de_examples
	% cp -r /opt/SUNWsymon/sdk/examples ~/de_examples
	% cd  ~/de_examples/examples/console/exampleApp
	% make
Installing this Example
        To install this example, do the following on the Sun Management Center
        server machine:
	% cd  ~/de_examples/examples/console/exampleApp/package
	% su
	# pkgadd -d . DEMOesce1
        Finish by executing the following commands:
	# cd  ../../cfg
	# cp console-tools.cfg /var/opt/SUNWsymon/cfg/console-tools.cfg 
	# /opt/SUNWsymon/sbin/es-tool /var/opt/SUNWsymon/cfg/console-tools.cfg 
	# cp console-host-apps.cfg /var/opt/SUNWsymon/cfg/console-host-apps.cfg 
	# /opt/SUNWsymon/sbin/es-apps /var/opt/SUNWsymon/cfg/console-host-apps.cfg 
        Note: The above commands could be included in the package postinstall
        script.  In this example, they are manual steps to highlight the work
        necessary to install this example.
Using this example with Sun Management Center
        Stop and restart any open Sun Management Center console windows.
Unloading this example
        To unload this example, do the following on the Sun Management Center
        server machine:
	% cd  ~/de_examples/examples/console/exampleApp/package
	% su
	# /opt/SUNWsymon/sbin/es-stop -a
	# pkgrm DEMOesce1
        # /bin/rm /var/opt/SUNWsymon/cfg/tools-extension-j.x
        # /bin/rm /var/opt/SUNWsymon/cfg/details-applications-j.x
	# /opt/SUNWsymon/sbin/es-start -a
        Stop and restart any open Sun Management Center console windows.
Console Integration Example: Static Menu
The following subsections describe how to use this example:
Contents
        This example consists of the following .x files that are installed
        on the agent:
        staticmenu-version01-d.x
        staticmenu-version01-m.x
        staticmenu-version01-models-d.x
        The following is the shell script that is installed on the agent:
	staticmenu-version01.sh
        The following are the java integration files that are installed on the 
        server:
        SMContextExample.java
        SMHello.java
Building this Example
	% mkdir ~/de_examples
	% cp -r /opt/SUNWsymon/sdk/examples ~/de_examples
	% cd  ~/de_examples/examples/console/StaticMenu/agent_package
	% make
	% cd  ~/de_examples/examples/console/StaticMenu/server_package
	% make
Installing this Example
        To install the agent component of this example, do the following on the
        Sun Management Center agent machine:
	% cd  ~/de_examples/examples/console/StaticMenu/agent_package/package
	% su
        # pkgadd -d . DEMOessma
        To install the server component of this example, do the following on the
        Sun Management Center server machine:
	% cd  ~/de_examples/examples/console/StaticMenu/server_package/package
	% su
        # pkgadd -d . DEMOessms
Using this example with Sun Management Center
	If the Sun Management Center agent is already running on the machine where the
        DEMOessma agent package was installed, then restart the Sun Management Center
        agent on that machine with the following commands:
	% su
	# /opt/SUNWsymon/sbin/es-stop -a
	# /opt/SUNWsymon/sbin/es-start -a
	# exit
        Stop and restart any open Sun Management Center console windows.
Unloading this example
        To unload this example, go to the Sun Management Center Details window
        for the agent where the DEMOessma package was installed.  Under the
        Browser tab, right click over the Static Menu module and choose
        "Unload".
        Then, do the following on the Sun Management Center agent machine where
        the DEMOessma package was installed:
	% su
	# /opt/SUNWsymon/sbin/es-stop -a
        # pkgrm DEMOessma
	# /opt/SUNWsymon/sbin/es-start -a
        Finally, do the following on the Sun Management Center server machine:
	% su
        # pkgrm DEMOessms
        Stop and restart any open Sun Management Center console windows.
Console Integration Example: Dynamic Menu & Cell Editor
The following subsections describe how to use this example:
Contents
        This example consists of the following .x files that are installed
        on the agent:
        dynamicmenu-version01-d.x
        dynamicmenu-version01-m.x
        dynamicmenu-version01-models-d.x
        The following is the shell script that are installed on the agent:
	dynamicmenu-version01.sh
        The following are the java integration files that are installed on the server:
        SMCustomCellEdit.java
        SMDynamicMenu.java
Building this Example
	% mkdir ~/de_examples
	% cp -r /opt/SUNWsymon/sdk/examples ~/de_examples
	% cd  ~/de_examples/examples/console/DynamicMenu/agent_package
	% make
	% cd  ~/de_examples/examples/console/DynamicMenu/server_package
	% make
Installing this Example
        To install the agent component of this example, do the following on the
        Sun Management Center agent machine:
	% cd  ~/de_examples/examples/console/DynamicMenu/agent_package/package
	% su
        # pkgadd -d . DEMOesdma
        To install the server component of this example, do the following on the
        Sun Management Center server machine:
	% cd  ~/de_examples/examples/console/DynamicMenu/server_package/package
	% su
        # pkgadd -d . DEMOesdms
Using this example with Sun Management Center
	If the Sun Management Center agent is already running on the machine where the
        DEMOesdma agent package was installed, then restart the Sun Management Center
        agent on that machine with the following commands:
	% su
	# /opt/SUNWsymon/sbin/es-stop -a
	# /opt/SUNWsymon/sbin/es-start -a
	# exit
        Stop and restart any open Sun Management Center console windows.
        
        Table Cell Text 
        Allows users to enter any text string. Table Cell Int 
        Allows users to enter any integer value. Table Cell Float 
        Allows users to enter any floating point value. Table Cell Boolean 
        Allows users to enter a boolean value. Table Cell Combo 
        Allows users to enter a value from a combo box.  The choices are
            specified in the module file "dynamicmenu-version01-d.x". Custom Must Begin with A 
        Customized cell editor implemented by the SMCustomCellEdit.class.
            Only allows users to enter a text string that begins with the letter
            "A" (case insensitive). 
        
Unloading this example
        To unload this example, go to the Sun Management Center Details window
        for the agent where the DEMOesdma package was installed.  Under the
        Browser tab, right click over the Dynamic Menu module and choose
        "Unload".
        Then, do the following on the Sun Management Center agent machine where
        the DMEOesdma package was installed:
	% su
	# /opt/SUNWsymon/sbin/es-stop -a
        # pkgrm DEMOesdma
	# /opt/SUNWsymon/sbin/es-start -a
        Finally, do the following on the Sun Management Center server machine:
	% su
        # pkgrm DEMOesdms
        Stop and restart any open Sun Management Center console windows.
Console Integration Example: Configuring Details Window Tabs
The following subsections describe how to use this example:
 
Contents
        This example consists of the following java integration file that is installed
        on the server:
        SMTabHello.java
Building this Example
	% mkdir ~/de_examples
	% cp -r /opt/SUNWsymon/sdk/examples ~/de_examples
	% cd  ~/de_examples/examples/console/DetailsTab
	% make
Installing this Example
        To install this example, do the following on the Sun Management Center server
        machine:
	% cd  ~/de_examples/examples/console/DetailsTab/package
	% su
        # pkgadd -d . DEMOesdt1
        Step 2
       
	# cd  ~/de_examples/examples/console/DetailsTab
        # /opt/SUNWsymon/sbin/es-details -n Node_Object_Type -f inputfile -o
        The inputfile specifies that the device should contain the following tabs
        provided by Sun Managment Center:  Browser, Alarms, Modules, Applications,
        Hardware, and Viewlog.  The inputfile also appends the custom tab
        "TabHello" for the device.  When this custom tab is selected, the
        SMTabHello.class is executed.  The inputfile specifies that the
        "Hello World" tab is the default tab.  This means that this will be
        the tab that is open when the Details Window is first opened.
        Note: The above es-details command could be included in the package
        postinstall script.  In this example, they are manual steps to highlight
        the work necessary to install this example.
Using this example with Sun Management Center
        Stop and restart any open Sun Management Center console windows.
Unloading this example
        To unload this example, do the following on the Sun Management Center
        server machine.  In the following command replace the Node_Object_Type
        value with the value for the modeled agent to be modified.  If the
        Node_Object_Type to be affected was created by installing the 
        "Device Modeling" example, then this value would be
        "MyServer".
	% cd  ~/de_examples/examples/console/DetailsTab
	% su
        # pkgrm DEMOesdt1
        # /opt/SUNWsymon/sbin/es-details -n Node_Object_Type -u
        Stop and restart any open Sun Management Center console windows.
Module: Hello World 01
The following subsections describe how to use this example:
Contents
        This example consists of the following .x files that are installed on
        the agent:
	helloworld-version01-d.x
	helloworld-version01-m.x
	helloworld-version01-models-d.x
Building & Installing Helloworld_01
	% mkdir ~/de_examples
	% cp -r /opt/SUNWsymon/sdk/examples ~/de_examples
	% cd  ~/de_examples/examples/modules/helloworld_01
	% make
        % cd package
	% su
	# pkgadd -d . DEMOeshw1
Using the Helloworld_01 module with Sun Management Center
	If the Sun Management Center agent is already running on the machine where the
        DEMOeshw1 agent package was installed, then restart the Sun Management Center
        agent on that machine with the following commands:
	% su
	# /opt/SUNWsymon/sbin/es-stop -a
	# /opt/SUNWsymon/sbin/es-start -a
	# exit
	From the Sun Management Center console invoke the module load window for the
	agent where the DEMOeshw1 agent package was installed.
Unloading this example
        To unload this example, go to the Sun Management Center Details window
        for the agent where the DEMOeshw1 package was installed.  Under the
        Browser tab, right click over the Helloworld_01 module and choose
        "Unload".
        Then, do the following on the Sun Management Center agent machine where the
        DEMOeshw1 package was installed:
	% su
	# /opt/SUNWsymon/sbin/es-stop -a
        # pkgrm DEMOeshw1
	# /opt/SUNWsymon/sbin/es-start -a
        Stop and restart any open Sun Management Center console windows.
Module: Hello World 02
The following subsections describe how to use this example:
Contents
        As in the earlier example, the following are the .x files that are used
        in this example and are installed on the agent:
	helloworld-version01-d.x
	helloworld-version01-m.x
	helloworld-version01-models-d.x
        The following are the files that make the Tcl/C package that are installed on the agent:
	pkgdemohw2.c
	pkgdemohw2.h
        The following files make the C library that is called by the Tcl/C package for the
        Hello World string and are installed on the agent:
	demohw2.c
	demohw2.h
Building & Installing Helloworld_02
	The Helloworld_02 example contains source code that is compiled
	with a C compiler. It is recommended that a variant be compiled
	for each Solaris release for which the module will be deployed.
	% mkdir ~/de_examples
	% cp -r /opt/SUNWsymon/sdk/examples ~/de_examples
	% cp -r /opt/SUNWsymon/sdk/include ~/de_examples
	% cd  ~/de_examples/examples/modules/helloworld_02
	% make
	% cd package/[ 2.5 | 2.6 | 2.7 ]
	% su
	# pkgadd -d . DEMOeshw2
Using the Helloworld_02 module with Sun Management Center
	If the Sun Management Center agent is already running on the machine where the
        DEMOeshw2 agent package was installed, then restart the Sun Management Center
        agent on that machine with the following commands:
	% su
	# /opt/SUNWsymon/sbin/es-stop -a
	# /opt/SUNWsymon/sbin/es-start -a
	# exit
	From the Sun Management Center console invoke the module load window for the
	agent where the DEMOeshw2 agent package was installed.
Unloading this example
        To unload this example, go to the Sun Management Center Details window
        for the agent where the DEMOeshw2 package was installed.  Under the
        Browser tab, right click over the Helloworld_02 module and choose
        "Unload".
        Then, do the following on the Sun Management Center agent machine where the
        DEMOeshw2 package was installed:
	% su
	# /opt/SUNWsymon/sbin/es-stop -a
        # pkgrm DEMOeshw2
	# /opt/SUNWsymon/sbin/es-start -a
        Stop and restart any open Sun Management Center console windows.
Module: Hello World 03
The following subsections describe how to use this example:
Contents
        This example consists of the following .x files that are installed on the
        agent:
	helloworld-version03-d.x
	helloworld-version03-m.x
	helloworld-version03-models-d.x
        The following is the shell script which is installed on the agent:
	helloworld-version03.sh
Building & Installing Helloworld_03
	% mkdir ~/de_examples
	% cp -r /opt/SUNWsymon/sdk/examples ~/de_examples
	% cd  ~/de_examples/examples/modules/helloworld_03
	% make
        % cd package
	% su
	# pkgadd -d . DEMOeshw3
Using the Helloworld_03 module with Sun Management Center
	If the Sun Management Center agent is already running on the machine where the
        DEMOeshw3 agent package was installed, then restart the Sun Management Center
        agent on that machine with the following commands:
	% su
	# /opt/SUNWsymon/sbin/es-stop -a
	# /opt/SUNWsymon/sbin/es-start -a
	# exit
	From the Sun Management Center console invoke the module load window for the
	agent where the DEMOeshw3 agent package was installed.
Unloading this example
        To unload this example, go to the Sun Management Center Details window
        for the agent where the DEMOeshw3 package was installed.  Under the
        Browser tab, right click over the Helloworld_03 module and choose
        "Unload".
        Then, do the following on the Sun Management Center agent machine where the
        DEMOeshw3 package was installed:
	% su
	# /opt/SUNWsymon/sbin/es-stop -a
        # pkgrm DEMOeshw3
	# /opt/SUNWsymon/sbin/es-start -a
        Stop and restart any open Sun Management Center console windows.
Module: Hello World 04
The following subsections describe how to use this example:
Contents
        This example consists of the following .x files that are installed on the
        agent:
	helloworld-version04-d.x
	helloworld-version04-m.x
	helloworld-version04-models-d.x
        The following is the shell script which is installed on the agent:
	helloworld-version04.sh
Building & Installing Helloworld_04
	% mkdir ~/de_examples
	% cp -r /opt/SUNWsymon/sdk/examples ~/de_examples
	% cd  ~/de_examples/examples/modules/helloworld_04
	% make
        % cd package
	% su
	# pkgadd -d . DEMOeshw4
Using the Helloworld_04 module with Sun Management Center
	If the Sun Management Center agent is already running on the machine where the
        DEMOeshw4 agent package was installed, then restart the Sun Management Center
        agent on that machine with the following commands:
	% su
	# /opt/SUNWsymon/sbin/es-stop -a
	# /opt/SUNWsymon/sbin/es-start -a
	# exit
	From the Sun Management Center console invoke the module load window for the
	agent where the DEMOeshw4 agent package was installed.
	KBytes
	Used
	Available
	
	and bring up the Attribute editor. Select the alarm tab and set the alarm
        limits.
Unloading this example
        To unload this example, go to the Sun Management Center Details window
        for the agent where the DEMOeshw4 package was installed.  Under the
        Browser tab, right click over the Helloworld_04 module and choose
        "Unload".
        Then, do the following on the Sun Management Center agent machine where the
        DEMOeshw4 package was installed:
	% su
	# /opt/SUNWsymon/sbin/es-stop -a
        # pkgrm DEMOeshw4
	# /opt/SUNWsymon/sbin/es-start -a
        Stop and restart any open Sun Management Center console windows.
Module: MIBdemo 01
The following subsections describe how to use this example:
Contents
        This example consists of the following .x files that are installed on the
        agent:
	essdk-mibdemo01-d.x
	essdk-mibdemo01-m.x
        This example has the following MIB file, which will be given as an input to the
        mib2x utility for generating the models file:
	essdk-mibdemo01.txt
        The following command in the file Makefile uses the mib2x utility to
        generate the models file from the mib file:
	/opt/SUNWsymon/sbin/es-run mib2x
		-f $(PWD)/essdk-mibdemo01.txt
		-m module -r essdkDemoGroup
		>essdk-mibdemo01-models-d.x
Building & Installing Mibdemo_01
	% mkdir ~/de_examples
	% cp -r /opt/SUNWsymon/sdk/examples ~/de_examples
	% cd  ~/de_examples/examples/modules/essdk-mibdemo01
	% make
	% cd package
	% su
	# pkgadd -d . DEMOesmd1
Using the Mibdemo_01 module with Sun Management Center
	If the Sun Management Center agent is already running on the machine where the
        DEMOesmd1 agent package was installed, then restart the Sun Management Center
        agent on that machine with the following commands:
	% su
	# /opt/SUNWsymon/sbin/es-stop -a
	# /opt/SUNWsymon/sbin/es-start -a
	# exit
	From the Sun Management Center console invoke the module load window for the
	agent where the DEMOesmd1 agent package was installed.
Unloading this example
        To unload this example, go to the Sun Management Center Details window
        for the agent where the DEMOesmd1 package was installed.  Under the
        Browser tab, right click over the Mibdemo_01 module and choose
        "Unload".
        Then, do the following on the Sun Management Center agent machine where the
        DEMOesmd1 package was installed:
	% su
	# /opt/SUNWsymon/sbin/es-stop -a
        # pkgrm DEMOesmd1
	# /opt/SUNWsymon/sbin/es-start -a
        Stop and restart any open Sun Management Center console windows.
Service Example: Device Modeling
The following subsections describe how to use this example:
Installing this Example
        Step 1
	% su
	# cp /var/opt/SUNWsymon/cfg/deviceinfo.conf /var/opt/SUNWsymon/cfg/deviceinfo.conf.bak
        The /var/opt/SUNWsymon/cfg/deviceinfo.conf file looks as follows for an Ultra-60
        machine.
        DID             Sun-Ultra-60
        OID             1.3.6.1.4.1.42.2.12.3.1.6
        FAMILYTYPE      sun4u-Sun-Ultra-60
       Edit the /var/opt/SUNWsymon/cfg/deviceinfo.conf file an modify the values for
       "DID" and "FAMILYTYPE" to "MyServer" as follows:
        DID             MyServer
        [ ... ]
        FAMILYTYPE      MyServer
	Step 2
	/opt/SUNWsymon/sdk/examples/services/device_modeling/MyServer.conf
        Note: The input file to es-device, MyServer.conf, contains a line
        that looks as follows:
        Hardware_Module Config-Reader4udt
        In order for the Physical View feature in the Hardware Tab of the
        Details window to work properly, the "Hardware_Module" value
        must be set properly.  The value "Config-Reader4udt" works
        for any Ultra desktop workstation.  For different types of machines,
        it will be necessary to modify this value appropriately for the platform.
        Otherwise the Physical View feature will not work properly.
	% cd /opt/SUNWsymon/sdk/examples/services/device_modeling
	% su
	# /opt/SUNWsymon/sbin/es-device -a MyServer.conf
Using this example with Sun Management Center
        After completing both steps, restart the Sun Management Center agent machine
        that was modified in Step 1 above.
	% su
	# /opt/SUNWsymon/sbin/es-stop -a
	# /opt/SUNWsymon/sbin/es-start -a
	# exit
        Stop and restart any open Sun Management Center console windows.
Unloading this Example
        To return the Sun Management Center agent to its original model, run
        the following commands on the Sun Management Center server machine:
	% cd /opt/SUNWsymon/sdk/examples/services/device_modeling
	% su
	# /opt/SUNWsymon/sbin/es-stop -a
	# /opt/SUNWsymon/sbin/es-device -d MyServer.conf
	# cp /var/opt/SUNWsymon/cfg/deviceinfo.conf.bak /var/opt/SUNWsymon/cfg/deviceinfo.conf
	# /opt/SUNWsymon/sbin/es-start -a
        Stop and restart any open Sun Management Center console windows.
Service Example: Creating a Composite Object
The following subsections describe how to use this example:
Contents
        This example consists of the following .x files that are
        installed on the agent:
        dot-d.prc
        dot-d.x
        dot-m.x
        dot-models-d.x
        dot.properties 
        This example consists of the following properties files that
        are installed on the server:
        dot.properties 
Building this Example
	% mkdir ~/de_examples
	% cp -r /opt/SUNWsymon/sdk/examples ~/de_examples
	% cd  ~/de_examples/examples/services/discovery/agent_package
	% make
	% cd  ~/de_examples/examples/services/discovery/server_package
	% make
Installing this Example
        Step 1
	/opt/SUNWsymon/sdk/examples/services/discovery/example-composite.conf
        Note: The input file to es-device, example-composite.conf, assumes that
        the installation directory for Sun Management Center is
        "/opt/SUNWsymon".  If it is installed in a different location,
        it will be necessary to edit the example-composite.conf file to specify the
        correct location of the GIF image files and the example_user.properties
        file.
        To model the composite object, run the following commands on the Sun
        Management Center server machine:
	% cd  ~/de_examples/examples/services/discovery/server_package
	% su
        # /opt/SUNWsymon/sbin/es-device -a example-composite.conf
        Step 2
	% cd  ~/de_examples/examples/services/discovery/agent_package/package
	% su
	# /opt/SUNWsymon/sbin/es-stop -a
        # pkgadd -d . DEMOesdsa
	# /opt/SUNWsymon/sbin/es-start -a
        Note: This agent package installs the file:
        /opt/SUNWsymon/modules/cfg/dot-d.prc
        which contains the following line:
        set port        161
        If the Sun Management Center agent process is running on a different port
        than the default value of 161, then this file will need to be updated
        accordingly.
	# /opt/SUNWsymon/sbin/es-stop -a
        Now the es-dt program can be executed:
        # /opt/SUNWsymon/sbin/es-dt -a -h hostname -p port -o OID -n not -l label
        where:
        hostname - The hostname where the DOT module was loaded.
        port     - The port the agent is running on the hostname specified.
        OID      - 1.3.6.1.4.1.42.2.12.2.2.120.50
        not      - Example_Composite_Object_Type
        label    - Example_Composite_Object
        To see what Composite Objects are loaded on the machine, run the following
        command:
        # /opt/SUNWsymon/sbin/es-dt -v
        Now the Sun Management Center agent process can be restarted by executing
        the following command as user root:
	# /opt/SUNWsymon/sbin/es-start -a
        Note: The above commands could be included in the package postinstall
        script.  In this example, they are manual steps to highlight the work
        necessary to install this example.
        Step 4
	% cd  ~/de_examples/examples/services/discovery/server_package/package
	% su
        # pkgadd -d . DEMOesdss
Using this example with Sun Management Center
	From the Sun Management Center console invoke the module load window for the
	agent where the DEMOesdsa agent package was installed.
Unloading this example
        Step 1
        Step 2
	% su
	# /opt/SUNWsymon/sbin/es-stop -a
        # pkgrm DEMOesdsa
	# /opt/SUNWsymon/sbin/es-start -a
        Step 3
        % su
        # /opt/SUNWsymon/sbin/es-stop -a
        # /opt/SUNWsymon/sbin/es-dt -d -l Example_Composite_Object
        # /opt/SUNWsymon/sbin/es-start -a
        Step 4
        % cd  ~/de_examples/examples/services/discovery/server_package
        % su
        # pkgrm DEMOesdss
        # /opt/SUNWsymon/sbin/es-device -d example-composite.conf
        Stop and restart any open Sun Management Center console windows.