This chapter explains how to monitor the Sun GlassFishTM Enterprise Server v3 Prelude components and services by using the asadmin command-line utility. Instructions for connecting JConsole are also provided.
The following topics are addressed here:
Instructions for monitoring by using the Administration Console are contained in the Administration Console online help.
Monitoring is the process of reviewing the statistics of a system to improve performance or solve problems. By monitoring the state of various components and services deployed in the Enterprise Server, you can identify performance bottlenecks, predict failures, perform root cause analysis, and ensure that everything is functioning as expected. Data gathered by monitoring can also be useful in performance tuning and capacity planning.
The asadmin utility provides multiple ways of viewing monitoring data: by using the monitor command to view common data, and by using the list and get commands to view more comprehensive data.
The following topics are addressed here:
A monitorable object is a component, subcomponent, or service that can be monitored. Enterprise Server uses a tree structure to track monitorable objects. Because the tree is dynamic, the tree changes as components of the Enterprise Server instance are added or removed.
In the tree, a monitorable object can have child objects (nodes) that represent exactly what can be monitored for that object. All child objects are addressed using the dot (.) character as a separator. These constructed names are referred to as dotted names.
The following are monitorable objects for the instance server:
server.applications server.http-service server.jvm server.web |
Dotted names can also address specific attributes in monitorable objects. For example, the jvm type has a memory attribute called maxheapsize-count. The following dotted name addresses the attribute:
server.jvm.memory.maxheapsize-count
Although an object is monitorable, it is not necessarily being monitored. For instructions on activating monitoring, see Configuring Monitoring.
Each monitorable object has a hierarchical tree structure. In the tree, a replaceable such as *statistics represents the name of the attribute that you want to show statistics for.
This section shows the node tree hierarchies of the following monitorable objects:
The applications tree contains the following nodes:
server.applications application-name virtual-server request *statistic
An example dotted name might be server.applications.hello.server.request.maxtime-count. For available attributes, see Applications Statistics.
The http-service tree contains the following nodes:
server.http-service virtual-server request *statistic _asadmin request *statistic
An example dotted name might be server.http-service.virtual-server1.request.requestcount-count. For available attributes, see HTTP Service Statistics.
The jvm tree contains the following nodes:
server.jvm class-loading-system compilation-system garbage-collectors memory operating-system runtime
An example dotted name might be server.jvm.memory.maxheapsize-count. For available attributes, see Java Virtual Machine (JVM) Statistics.
The web tree contains the following nodes:
server.web jsp *statistic servlet *statistic session *statistic request *statistic
An example dotted name might be server.web.servlet.activeservletsloadedcount-count. For available attributes, see Web Module Common Statistics.
The following asadmin commands are provided for monitoring the services and components of Enterprise Server:
The set command is used to set the monitoring levels for monitorable objects, essentially turning monitoring on or off for Enterprise Server components and services. For instructions, see Configuring Monitoring.
The monitor --type command is used to display basic data for a particular type of monitorable object. For instructions, see Viewing Common Monitoring Data.
The list --monitor command is used to display available monitorable objects. For guidelines and instructions, see Guidelines for Using the list and get Commands for Monitoring.
The get command is used to display comprehensive data, such as the attributes and values for a dotted name. The get command used with a wildcard parameter displays all available attributes for any monitorable object. For instructions on viewing comprehensive data, see To View Comprehensive Monitoring Data.
By default, monitoring is not enabled for Enterprise Server components and services. When you set the monitoring level, you are enabling monitoring for that monitorable object. You can choose to leave monitoring off for objects that do not need to be monitored.
The following tasks are addressed here:
The set(1) command enables monitoring for Enterprise Server components and services. By setting the monitoring level to HIGH or LOW, you start monitoring for that service or component. For the Prelude release of Enterprise Server, there is no difference between the HIGH and LOW settings.
Determine which services and components are currently enabled for monitoring.
asadmin get server.monitoring-service.module-monitoring-levels.* |
The following example output shows that monitoring for the HTTP service is not enabled (OFF), but other objects are enabled:
configs.config.server-config.monitoring-service.module-monitoring-levels.web-container=HIGH configs.config.server-config.monitoring-service.module-monitoring-levels.http-service=OFF configs.config.server-config.monitoring-service.module-monitoring-levels.jvm=HIGH |
Enable monitoring for each service or component that you want to monitor.
The following example command enables monitoring for the HTTP service by setting the monitoring level to HIGH:
asadmin set server.monitoring-service.module-monitoring-levels.http-service=HIGH |
To see the full syntax and options of the command, type asadmin set --help at the command line.
The set(1) command enables you to disable monitoring for Enterprise Server services and components.
Determine which services and components currently are enabled for monitoring.
asadmin get server.monitoring-service.module-monitoring-levels.* |
The following example output shows that monitoring is enabled for web-container, http-service, and jvm:
configs.config.server-config.monitoring-service.module-monitoring-levels.web-container=HIGH configs.config.server-config.monitoring-service.module-monitoring-levels.http-service=HIGH configs.config.server-config.monitoring-service.module-monitoring-levels.jvm=HIGH |
Disable monitoring for a service or component that you do not want to monitor.
The following example command disables monitoring for the HTTP service by setting the monitoring level to OFF:
asadmin set server.monitoring-service.module-monitoring-levels.http-service=OFF |
To see the full syntax and options of the command, type asadmin set --help at the command line.
The asadmin monitor command enables you to display basic data on commonly-monitored objects.
Use the --type option of the monitor command to specify the object for which you want to display data. If you use the monitor command without specifying a type, an error message is displayed.
Output from the command is displayed continuously in a tabular format; the --interval option can be used to display output at a particular interval (the default is 30 seconds).
A monitorable object must be configured for monitoring before you can display data on the object. See To Enable Monitoring .
Determine which type of monitorable object you want to monitor.
Your choices for v3 Prelude are jvm, httplistener, and webmodule.
Request the monitoring data by using the monitor(1) command.
The following example command requests common data for type jvm on instance server:
asadmin monitor --type jvm server |
Information similar to the following is displayed:
UpTime(ms) Heap and NonHeap Memory(bytes) current min max low high count 9437266 8585216 619642880 0 0 93093888 9467250 8585216 619642880 0 0 93093888 |
To see the full syntax and options of the command, type asadmin monitor --help at the command line.
Common monitoring statistics are described in the following sections:
The statistics available for the httplistener type are shown in the following table.
Table 10–1 HTTP Listener Common Monitoring Statistics
Statistic |
Description |
---|---|
ec |
Error count. Cumulative value of the error count |
mt |
Maximum time. Longest response time for a request; not a cumulative value, but the largest response time from among the response times |
pt |
Processing time. Cumulative value of the times taken to process each request, with processing time being the average of request processing times over request |
rc |
Request count. Cumulative number of requests processed so far |
The statistics available for the jvm type are shown in the following table.
Table 10–2 JVM Common Monitoring Statistics
Statistic |
Description |
---|---|
count |
Amount of memory (in bytes) that is guaranteed to be available for use by the JVM machine |
high |
Retained for compatibility with other releases |
low |
Retained for compatibility with other releases |
min |
Initial amount of memory (in bytes) that the JVM machine requests from the operating system for memory management during startup |
UpTime |
Number of milliseconds that the JVM machine has been running since it was last started |
The statistics available for the webmodule type are shown in the following table.
Table 10–3 Web Module Common Monitoring Statistics
Statistic |
Description |
---|---|
ajlc |
Number of active JavaServer PagesTM (JSPTM) technology pages that are loaded |
asc |
Current active sessions |
aslc |
Number of active servlets that are loaded |
ast |
Total active sessions |
mjlc |
Maximum number of JSP pages that are loaded |
mslc |
Maximum number of servlets that are loaded |
rst |
Total rejected sessions |
st |
Total sessions |
tjlc |
Total number of JSP pages that are loaded |
tslc |
Total number of servlets that are loaded |
By applying the list and get commands against the tree structure using dotted names, you can display more comprehensive monitoring data.
The following topics are addressed here:
The underlying assumptions for using the list and get commands with dotted names are:
Any list command that specifies a dotted name followed by a wildcard of the form .* lists a hierarchical tree of child nodes from the specified node. For example, the following command lists all children of the applications node, their subsequent child nodes, and so on:
list --monitor=true server.applications.*
Any list command that specifies a dotted name preceded or followed by a wildcard of the form *dottedname or dotted * name or dottedname * lists all nodes and their children that match the regular expression created by the specified matching pattern.
A get command followed by a .* or a * gets the set of attributes and their values that belong to the node specified.
The following tables show the command, dotted name, and corresponding output at the top level (server) of the tree.
Table 10–4 Server-Level Monitoring Commands Output
Command |
Dotted Name |
Output |
---|---|---|
list --monitor=true |
server.* |
Hierarchy of child nodes below server node |
get --monitor=true |
server.* |
Data for all monitorable objects under the top-level server |
The following table shows the command, dotted name, and corresponding output for the JVM level.
Table 10–5 JVM-Level Monitoring Commands Output
Command |
Dotted Name |
Output |
---|---|---|
list --monitor=true |
server.jvm.* |
Monitorable objects under the JVM node |
get --monitor=true |
server.jvm.* |
Attributes and values corresponding to JVM attributes |
The following table shows the command, dotted name, and corresponding output for the web level.
Table 10–6 Web Container-Level Monitoring Commands Output
Command |
Dotted Name |
Output |
---|---|---|
list --monitor=true |
server.web.* |
Monitorable objects under the web service node |
get --monitor=true |
server.web.* |
Attributes and values that correspond to web attributes |
The monitor command is useful in many situations, however, it does not offer the complete list of all monitorable objects. To work with comprehensive data for an object type, use the list --monitor and the get --monitor commands followed by the dotted name of a monitorable object.
A monitorable object must be configured for monitoring before you can display information on the object. See To Enable Monitoring if needed..
List the objects that are enabled for monitoring by using the list(1) command.
For example, the following command lists all components and services that have monitoring enabled for instance server:
asadmin list --monitor=true server.* |
Information similar to the following is displayed:
server.web server.jvm server.http-service server.applications |
Get data for a monitored component or service by using the get(1) command.
The following example command gets information on all the attributes for object type jvm on instance server:
asadmin get --monitor=true server.jvm.* |
Information similar to the following is displayed:
server.jvm.class-loading-system.loadedclasscount-count = 3715 server.jvm.class-loading-system.totalloadedclasscount-count = 3731 server.jvm.class-loading-system.unloadedclasscount-count = 16 server.jvm.compilation-system.name-current = HotSpot Client Compiler server.jvm.compilation-system.totalcompilationtime-count = 769 server.jvm.garbage-collectors.Copy.collectioncount-count = 285 server.jvm.garbage-collectors.Copy.collectiontime-count = 980 server.jvm.garbage-collectors.MarkSweepCompact.collectioncount-count = 2 server.jvm.garbage-collectors.MarkSweepCompact.collectiontime-count = 383 server.jvm.memory.committedheapsize-count = 23498752 server.jvm.memory.committednonheapsize-count = 13598720 server.jvm.memory.initheapsize-count = 0 server.jvm.memory.initnonheapsize-count = 8585216 server.jvm.memory.maxheapsize-count = 66650112 server.jvm.memory.maxnonheapsize-count = 100663296 server.jvm.memory.objectpendingfinalizationcount-count = 0 server.jvm.memory.usedheapsize-count = 19741184 server.jvm.memory.usednonheapsize-count = 13398352 server.jvm.operating-system.arch-current = x86 server.jvm.operating-system.availableprocessors-count = 2 server.jvm.operating-system.name-current = Windows XP server.jvm.operating-system.version-current = 5.1 server.jvm.runtime.classpath-current = glassfish.jar server.jvm.runtime.inputarguments-current = [] server.jvm.runtime.managementspecversion-current = 1.0 server.jvm.runtime.name-current = 4372@ABBAGANI_WORK server.jvm.runtime.specname-current = Java Virtual Machine Specification server.jvm.runtime.specvendor-current = Sun Microsystems Inc. server.jvm.runtime.specversion-current = 1.0 server.jvm.runtime.uptime-count = 84813 server.jvm.runtime.vmname-current = Java HotSpot(TM) Client VM server.jvm.runtime.vmvendor-current = Sun Microsystems Inc. server.jvm.runtime.vmversion-current = 1.5.0_11-b03 |
The following example command lists all the monitorable applications for instance server:
asadmin list --monitor=true server.applications.* |
Information similar to the following is displayed:
server.applications.app1 server.applications.app2 server.applications.app1.virtual-server1 server.applications.app2.virtual-server1 |
The following example command gets information on all the attributes for application hello:
asadmin get --monitor=true server.applications.hello.* |
Information similar to the following is displayed:
server.applications.hello.server.activatedsessionstotal-count = 0 server.applications.hello.server.activejspsloadedcount-count = 1 server.applications.hello.server.activeservletsloadedcount-count = 1 server.applications.hello.server.activesessionscurrent-count = 1 server.applications.hello.server.activesessionshigh-count = 1 server.applications.hello.server.errorcount-count = 0 server.applications.hello.server.expiredsessionstotal-count = 0 server.applications.hello.server.maxjspsloadedcount-count = 1 server.applications.hello.server.maxservletsloadedcount-count = 0 server.applications.hello.server.maxtime-count = 0 server.applications.hello.server.passivatedsessionstotal-count = 0 server.applications.hello.server.persistedsessionstotal-count = 0 server.applications.hello.server.processingtime-count = 0.0 server.applications.hello.server.rejectedsessionstotal-count = 0 server.applications.hello.server.requestcount-count = 0 server.applications.hello.server.sessionstotal-count = server.applications.hello.server.totaljspsloadedcount-count = 0 server.applications.hello.server.totalservletsloadedcount-count = 0 |
The following example command gets information on jvm attribute runtime.vmversion-current on an instance server:
asadmin get --monitor=true server.jvm.runtime.vmversion-current |
Information similar to the following is displayed:
server.jvm.runtime.vmversion-current = 10.0-b23 |
You can get comprehensive monitoring statistics by forming a dotted name that specifies the statistic you are looking for. For example, the following dotted name will get the cumulative number of requests for the HTTP service on virutal-server1:
server.http-service.virtual-server1.request.requestcount-count
The tables in the following sections list the statistics that are available for each monitorable object:
Applications fits into the tree of objects as shown in Applications Tree Hierarchy. Use the following dotted name pattern to get applications statistics:
server.applications.application-name.virtual-server.request.statistic
Statistics available for applications for are shown in the following table.
Table 10–7 Applications Comprehensive Statistics
Statistic |
Description |
---|---|
activatedsessionstotal-count |
Total number of activated sessions |
activejspsloadedcount-count |
Number of currently loaded JSPs |
activeservletsloadedcount-count |
Number of currently loaded servlets |
activesessionscurrent-count |
Number of currently active sessions |
activesessionshigh-count |
Maximum number of concurrently active sessions |
errorcount-count |
Cumulative value of the error count, with error count representing the number of cases where the response code was greater than or equal to 400 |
expiredsessionstotal-count |
Total number of expired sessions |
maxjspsloadedcount-count |
Maximum number of JSPs loaded which were active |
maxservletsloadedcount-count |
Maximum number of servlets loaded which were active |
maxtime-count |
Longest response time for a request; not a cumulative value, but the largest response time from among the response times |
passivatedsessionstotal-count |
Total number of passivated sessions |
persistedsessionstotal-count |
Total number of persisted sessions |
processingtime-count |
Cumulative value of the times taken to process each request, with processing time representing the average of request processing times over the request count |
rejectedsessionstotal-count |
Total number of rejected sessions |
requestcount-count |
Cumulative number of the requests processed so far |
sessionstotal-count |
Total number of sessions created |
totaljspsloadedcount-count |
Cumulative number of JSP pages that have been loaded into the web module |
totalservletsloadedcount-count |
Cumulative number of servlets that have been loaded into the web module |
The HTTP service fits into the tree of objects as shown in HTTP Service Tree Hierarchy.
The HTTP service statistics are described in the following sections:
Use the following dotted name pattern for the HTTP service asadmin statistics:
server.http-service._asadmin.request.statistic
The asadmin statistics available for HTTP service for are shown in the following table.
Table 10–8 HTTP Service asadmin Statistics
Statistic |
Description |
---|---|
count200-count |
Number of responses with a status code equal to 200 |
count2xx-count |
Number of responses with a status code in the 2xx range |
count302-count |
Number of responses with a status code equal to 302 |
count304-count |
Number of responses with a status code equal to 304 |
count3xx-count |
Number of responses with a status code equal in the 3xx range |
count400-count |
Number of responses with a status code equal to 400 |
count401-count |
Number of responses with a status code equal to 401 |
count403-count |
Number of responses with a status code equal to 403 |
count4xx-count |
Number of responses with a status code equal in the 4xx range |
count503-count |
Number of responses with a status code equal to 503 |
count5xx-count |
Number of responses with a status code equal in the 5xx range |
countother-count |
Number of responses with a status code outside the 2xx, 3xx, 4xx, and 5xx range |
errorcount-count |
Cumulative value of the error count, with error count representing the number of cases where the response code was greater than or equal to 400 |
maxtime-count |
Longest response time for a request; not a cumulative value, but the largest response time from among the response times |
processingtime-count |
Cumulative value of the times taken to process each request, with processing time being the average of request processing times over the request count |
requestcount-count |
Cumulative number of requests processed so far |
Use the following dotted name pattern for HTTP service virtual server statistics:
server.http-service.virtual-server.request.statistic
The HTTP service statistics for virtual servers are shown in the following table.
Table 10–9 HTTP Service Virtual Server Statistics
Statistic |
Description |
---|---|
count200-count |
Number of responses with a status code equal to 200 |
count2xx-count |
Number of responses with a status code in the 2xx range |
count302-count |
Number of responses with a status code equal to 302 |
count304-count |
Number of responses with a status code equal to 304 |
count3xx-count |
Number of responses with a status code equal in the 3xx range |
count400-count |
Number of responses with a status code equal to 400 |
count401-count |
Number of responses with a status code equal to 401 |
count403-count |
Number of responses with a status code equal to 403 |
count404-count |
Number of responses with a status code equal to 404 |
count4xx-count |
Number of responses with a status code equal in the 4xx range |
count503-count |
Number of responses with a status code equal to 503 |
count5xx-count |
Number of responses with a status code equal in the 5xx range |
countother-count |
Number of responses with a status code outside the 2xx, 3xx, 4xx, and 5xx range |
errorcount-count |
Cumulative value of the error count, with error count representing the number of cases where the response code was greater than or equal to 400 |
maxtime-count |
Longest response time for a request; not a cumulative value, but the largest response time from among the response times |
processingtime-count |
Cumulative value of the times taken to process each request, with processing time being the average of request processing times over the request count |
requestcount-count |
Cumulative number of requests processed so far |
The statistics that are available for the JVM machine are shown in the following sections:
Use the following dotted name pattern for JVM class loading system statistics:
server.jvm.class-loading-system.statistic
The statistics that are available for class loading in the JVM for Java SE are shown in the following table.
Table 10–10 JVM Statistics for Java SE Class Loading
Statistic |
Description |
---|---|
loadedclasscount-count |
Number of classes that are currently loaded in the JVM |
totalloadedclasscount-count |
Total number of classes that have been loaded since the JVM began execution |
unloadedclasscount-count |
Number of classes that have been unloaded from the JVM since the JVM began execution |
Use the following dotted name pattern for JVM compilation system statistics:
server.jvm.compilation-system.statistic
The statistics that are available for compilation in the JVM for Java SE are shown in the following table.
Table 10–11 JVM Statistics for Java SE Compilation
Statistic |
Description |
---|---|
name-current |
Name of the current compiler |
totalcompilationtime-count |
Accumulated time (in milliseconds) spent in compilation |
Use the following dotted name pattern for JVM garbage collectors statistics:
server.jvm.garbage-collectors.statistic
The statistics that are available for garbage collection in the JVM for Java SE are shown in the following table.
Table 10–12 JVM Statistics for Java SE Garbage Collectors
Statistic |
Description |
---|---|
collectioncount-count |
Total number of collections that have occurred |
collectiontime-count |
Accumulated collection time (in milliseconds) |
Use the following dotted name pattern for JVM memory statistics:
server.jvm.memory.statistic
The statistics that are available for memory in the JVM for Java SE are shown in the following table.
Table 10–13 JVM Statistics for Java SE Memory
Statistic |
Description |
---|---|
committedheapsize-count |
Amount of heap memory (in bytes) that is committed for the JVM to use |
committednonheapsize-count |
Amount of non-heap memory (in bytes) that is committed for the JVM to use |
initheapsize-count |
Size of the heap initially requested by the JVM |
initnonheapsize-count |
Size of the non-heap area initially requested by the JVM |
maxheapsize-count |
Maximum amount of heap memory (in bytes) that can be used for memory management |
maxnonheapsize-count |
Maximum amount of non-heap memory (in bytes) that can be used for memory management |
objectpendingfinalizationcount-count |
Approximate number of objects that are pending finalization |
usedheapsize-count |
Size of the heap currently in use |
usednonheapsize-count |
Size of the non-heap area currently in use |
Use the following dotted name pattern for JVM operating system statistics:
server.jvm.operating-system.statistic
The statistics that are available for the operating system for the JVM machine in Java SE are shown in the following table.
Table 10–14 JVM Statistics for Java SE Operating System
Statistic |
Description |
---|---|
arch-current |
Operating system architecture |
availableprocessors-count |
Number of processors available to the JVM |
name-current |
Operating system name |
version-current |
Operating system version |
Use the following dotted name pattern for JVM runtime statistics:
server.jvm.runtime.statistic
The statistics that are available for the runtime in the JVM runtime for Java SE are shown in the following table.
Table 10–15 JVM Statistics for Java SE Runtime
Statistic |
Description |
---|---|
classpath-current |
Classpath that is used by the system class loader to search for class files |
inputarguments-current |
Input arguments passed to the JVM; not including arguments to the main method |
managementspecversion-current |
Management specification version implemented by the JVM |
name-current |
Name representing the running JVM |
specname-current |
JVM specification name |
specvendor-current |
JVM specification vendor |
specversion-current |
JVM specification version |
uptime-count |
Uptime of the JVM (in milliseconds) |
vmname-current |
JVM implementation name |
vmvendor-current |
JVM implementation vendor |
vmversion-current |
JVM implementation version |
The web container fits into the tree of objects as shown in Web Tree Hierarchy.
The available web statistics shown in the following sections:
Use the following dotted name pattern for web JSP statistics:
server.web.jsp.statistic
The available web JSP statistics are shown in the following table.
Table 10–16 Web JSP Statistics
Statistic |
Description |
---|---|
activejspsloadedcount-count |
Number of currently loaded JSPs |
maxjspsloadedcount-count |
Maximum number of JSPs loaded which were active |
totaljspsloadedcount-count |
Cumulative number of JSP pages that have been loaded into the web module |
Use the following dotted name pattern for web request statistics:
server.web.request.statistic
The available web request statistics are shown in the following table.
Table 10–17 Web Request Statistics
Statistic |
Description |
---|---|
errorcount-count |
Cumulative value of the error count, with error count representing the number of cases where the response code was greater than or equal to 400 |
maxtime-count |
Longest response time for a request; not a cumulative value, but the largest response time from among the response times |
processingtime-count |
Cumulative value of the times taken to process each request, with processing time being the average of request processing times over the request count |
requestcount-count |
Cumulative number of the requests processed so far |
Use the following dotted name pattern for web servlet statistics:
server.web.servlet.statistic
The available web servlet statistics are shown in the following table.
Table 10–18 Web Servlet Statistics
Statistic |
Description |
---|---|
activeservletsloadedcount-count |
Number of currently loaded servlets |
maxservletsloadedcount-count |
Maximum number of servlets loaded which were active |
totalservletsloadedcount-count |
Cumulative number of servlets that have been loaded into the web module |
Use the following dotted name pattern for web session statistics:
server.web.session.statistic
The available web session statistics are shown in the following table.
Table 10–19 Web Session Statistics
Statistic |
Description |
---|---|
activatedsessionstotal-count |
Total number of activated sessions |
activesessionscurrent-count |
Number of currently active sessions |
activesessionshigh-count |
Maximum number of concurrently active sessions |
expiredsessionstotal-count |
Total number of expired sessions |
passivatedsessionstotal-count |
Total number of passivated sessions |
persistedsessionstotal-count |
Total number of persisted sessions |
rejectedsessionstotal-count |
Total number of rejected sessions |
sessionstotal-count |
Total number of sessions created |
Java SE 5 enhances management and monitoring of the virtual machine by including a Platform MBean Server and by including managed beans (MBeans) to configure the virtual machine.
To view all MBeans, Enterprise Server provides a configuration of the standard JMX connector server called System JMX Connector Server. As part of Enterprise Server startup, an instance of this JMX Connector Server is started. Any compliant JMX Connector Client can connect to the server using the JMX Connector Server.
Java SE also provides tools to connect to an MBean Server and view the MBeans registered with the server. JConsole is one such popular JMX Connector Client and is available as part of the standard Java SE distribution. By default, Enterprise Server is configured with a non-secure System JMX Connector Server and cannot be enabled for v3 Prelude. If this is an issue, jms-connector can be removed.
When you configure JConsole for use with Enterprise Server, Enterprise Server becomes the JMX Connector's server end and JConsole becomes the JMX Connector's client end.
This procedure describes how to connect JConsole to Enterprise Server. Security is not enabled on the JMX Connector.
Start the domain.
For instructions, see To Start a Domain (or Server).
Start JConsole using this format: JDK_HOME/bin/jconsole
For example:
/usr/java/bin/jconsole |
The JConsole Connect to Agent window is displayed.
Click the Remote tab and type the host name and port.
Click Connect.
In the Remote Process text box, specify the JMX Service URL.
For example:
service:jmx:rmi:///jndi/rmi://localhost:8686/jmxrmi |
Another host name can be substituted for localhost. The default port number (8686) could change if the jmx-connector configuration has been modified.
Click Connect.
In the JConsole window you will see all your MBeans, JVM information, and so on, in various tabs.
Browse Sun GlassFish v3 Prelude MBeans along with Platform MBeans.
Use either the Remote tab or the Advanced tab to connect to the Enterprise Server.
Specify the user name, password, administration server host, and JMS port number (8686 by default), and then select Connect.
Specify the JMXServiceURL as service: jmx:rmi:///jndi/rmi://host:jms-port/jmxrmi, and then select Connect. The JMXServerURL is printed in the server.log file and is displayed in the command window of the domain creation command.
For more information on JConsole, see http://java.sun.com/javase/6/docs/technotes/guides/management/jconsole.html.