Previous Page | Next Page

Using the SAS Web Infrastructure Platform Utilities

Using JMX Tools to Manage SAS Resources


About JMX and MBeans

SAS servers implement common administrative interfaces. These interfaces enable you to perform basic administrative functions such as stopping, pausing, and resuming servers. You can also use the interfaces to monitor the health of the servers via real-time and historical metrics. Java Management Extensions (JMX) is a Java technology that supplies tools for managing and monitoring applications, system objects, devices (such as printers), and service-oriented networks. JMX managed beans, known as MBeans, have been implemented to provide a standard way of managing SAS resources.


Accessing the SAS MBeans


About Accessing the SAS MBeans

You can use any of the standard JMX monitoring tools to access the MBeans that manage SAS resources. To use these tools, you must do the following:

  1. Enable access to the MBeans from the Web application server. See Configure the Web Application Server to Enable JMX Client Access.

  2. Make sure that the appropriate authentication credentials are set. See Set Authentication Credentials for SAS MBean Access.

To connect and access the SAS MBeans, follow the specific instructions for your JMX tool. For information about using the JConsole tool, see Manage SAS Resources Using JConsole.


Configure the Web Application Server to Enable JMX Client Access

You configure the Web application server to enable access to the MBeans by setting specific Java system options.

Specify the following Java Virtual Machine (JVM) argument to access the MBeans locally:

com.sun.management.jmxremote

Specify the following JVM argument to access the MBeans from a remote system. Replace portNum with the port number to use for JMX RMI connections:

com.sun.management.jmxremote.port=portNum

Remote monitoring and management requires security to ensure that unauthorized persons cannot control or monitor your application. It is recommended that you set the following JVM arguments when MBeans are accessed remotely:

com.sun.management.jmxremote.authenticate=true | false

com.sun.management.jmxremote.ssl=true | false

For information about these arguments, see the Java documentation.

For more information about the recommended JVM arguments in the different application server environments, see the SAS third-party Web site at http://support.sas.com/resources/thirdpartysupport/v92.


Set Authentication Credentials for SAS MBean Access

The primary MBean for SAS resources is the ServerFactory MBean. This MBean is initialized with credentials that are used to connect to the SAS Metadata Server. The values of server.admin.userid and server.admin.password properties are used to initialize the MBean. These properties must identify an unrestricted user so that the SAS servers can be managed properly.

To verify that these property settings are properly defined, follow these steps:

  1. In a SAS session, enter metabrowse in the command prompt and then press ENTER. The Metadata Server Configuration dialog box appears.

  2. Enter your server connection information as follows:

    • Enter the fully qualified server name of the system on which the SAS Metadata Server resides.

    • The user name and password combination must be an unrestricted user to access the required metadata.

    The Metadata Browser appears.

  3. In SAS, select Tools [arrow] Options [arrow] Explorer.

  4. Select the General tab and clear the Metadata Browse Mode check box.

  5. Click OK.

  6. In the Metadata Browser tree view, navigate to Foundation [arrow] SoftwareComponent [arrow] Foundation Services 9.2 [arrow] PropertySets [arrow] Environment.Properties [arrow] SetProperties [arrow] server.admin.userid.

  7. In the right pane, right-click DefaultValue and select Modify. The Modify Value dialog box appears and displays a user name.

  8. Make sure that the user name that is displayed is an unrestricted user (for example, sasadm@saspw). If not, enter a user name that is unrestricted and click OK.

  9. If you changed the user name in the previous step, then you must also change the password. Follow these steps:

    1. In the tree view (under SetProperties), select server.admin.password.

    2. In the right pane, right-click DefaultValue and select Modify. The Modify Value dialog box appears and displays the password in encoded format.

    3. Change the value and click OK.

      For security reasons, you should enter a password that you have encoded using SAS. To obtain this encoded password, use PROC PWENCODE. For more information, open SAS Help and Documentation from the Help menu in SAS, and then search on PWENCODE.

  10. Restart the SAS Remote Services and the Web application server.


Manage SAS Resources Using JConsole

JConsole is a JMX tool that is included with the standard Java Development Kit (JDK). The information provided through JMX technology enables JConsole to provide information about application performance and functions. You can use JConsole to interact with the JMX MBeans that are available to manage SAS resources. The console's simple user interface displays all MBeans in a tree navigator on the left side of the window. When you select a specific MBean, its attributes, operations, notifications, and other information are displayed on the right side of the window.

To access information about SAS resources using JConsole, follow these steps:

  1. Start JConsole by running the following command:

    JDK-HOME\bin\jconsole

  2. Connect to the MBean server as follows:

    • If you are accessing the MBeans locally, the Local tab should display every JVM that is running on the local system that was started with the same user ID as JConsole. Select the appropriate JVM and click Connect.

    • If you are accessing the MBeans remotely, follow these steps:

      1. Select the Remote tab.

      2. Enter the host on which the JVM is running, along with the port where the RMI connector was registered.

      3. You might need to specify credentials if authentication to the MBean server is required.

      4. Click Connect to connect to the MBean server.

  3. Select the MBeans tab. This tab displays a tree view of all the registered MBeans.

  4. Expand the com.sas.services domain to see all MBeans registered in this domain.

  5. Select the ServerFactory MBean.

  6. In the right pane, select the Operations tab. You can now see the operations (listing, stopping, pausing, and so on) so that you can list the defined SAS servers and manage your running SAS servers. When you invoke one of the manage-server operations, a new MBean is registered that is connected to the specified, running SAS server. The newly registered MBean can then be used to manage and monitor that particular SAS server.


Understanding How to Use the SAS MBeans


About the SAS MBeans

There are three primary MBeans provided by the SAS Web Infrastructure Platform for managing and monitoring SAS resources:

The following sections describe these MBeans.


ServerFactory MBean

The ServerFactory MBean is the starting point for managing SAS servers. This MBean is registered during deployment of the SAS Web Infrastructure Platform and is named as follows:

com.sas.services:type=ServerFactory

During initialization, the ServerFactory MBean connects to the SAS Metadata Server. This enables the MBean to list all SAS servers defined in the metadata. The MBean can then be used to register additional MBeans that enable the running servers to be managed and monitored directly. The ServerFactory MBean does not have any attributes, but supports three operations:

listDefinedServers()

provides a list of SAS IOM servers that are defined in the Metadata Server. Information that is returned for each defined server includes the server name, host, port, and server type. To begin actively managing a server, specify the name of the server on the manageServerByName operation.

manageServerByName(String ServerName, String Host)

registers a Server MBean that enables you to actively manage the specified IOM server. The newly registered MBean connects to the running IOM server and can then be used to manage and monitor that server. The host name can be left blank if the IOM server is defined to run on only one host. If defined to run on multiple hosts, the proper host name should be provided.

The manageServerByName() operation does not work on a server that is spawned by the SAS Object Spawner.

manageServer(String Host, Integer Port, String Username, String Password)

registers a Server MBean that enables you to actively manage the specified IOM server. The IOM server that is managed is identified by the host and port provided on the manageServer operation. The newly registered MBean can be used to manage and monitor that specific IOM server. This operation is useful when the IOM server is not defined in the Metadata Server.


Spawner MBean

The Spawner MBean is created whenever an IOM Spawner is identified in one of the ServerFactory MBean's manageServer operations. The name of the registered MBean uses the form:

com.sas.services:type=Server,serverType=Spawner,name="Server Name",host=Host Name,port=Port

The Spawner MBean enables you to manage and monitor the running Object Spawner. You can perform SAS Spawner operations such as stop, pause, and resume.

Here are some commonly used Spawner MBean attributes:


Server MBean

The Server MBean is created whenever a SAS server is identified in one of the ServerFactory MBean's manageServer operations or when a server is managed via the Spawner MBean's manageLaunchedServer(s) operation.

A server MBean can represent a SAS Workspace Server, a SAS Stored Process Server, a SAS Table Server, a SAS Metadata Server, or a SAS OLAP Server. The name of the registered SAS Server MBean uses one of these three forms:

com.sas.services:type=Server, serverType=Workspace, logicalServer=
     "LogicalServerName", name="Server Name",
     instanceid="Unique instance ID"

com.sas.services:type=Server, serverType=StoredProcess, logicalServer=
     "LogicalServerName", name="Server Name", 
     instanceid="Unique instance ID"

com.sas.services:type=Server, serverType=Table, logicalServer=
     "LogicalServerName", name="Server Name", host=Host Name, 
     port=Port Number

The Server MBean enables you to manage and monitor the running SAS server. You can perform server operations such as stop, pause, and resume.

Here are some commonly used Server MBean attributes:

Previous Page | Next Page | Top of Page