1. Overview of GlassFish Server Administration
Default Settings and Locations
Instructions for Administering GlassFish Server
4. Administering the Virtual Machine for the Java Platform
6. Administering Web Applications
7. Administering the Logging Service
8. Administering the Monitoring Service
How the Monitoring Tree Structure Works
Tree Structure of Monitorable Objects
About Monitoring for Add-on Components
Tools for Monitoring GlassFish Server
Viewing Common Monitoring Data
To View Common Monitoring Data
HTTP Listener Common Statistics
Viewing Comprehensive Monitoring Data
Guidelines for Using the list and get Subcommands for Monitoring
To View Comprehensive Monitoring Data
Comprehensive Monitoring Statistics
JMS/Connector Service Statistics
ORB Statistics (Connection Manager)
Resource Statistics (Connection Pool)
Configuring JConsole to View GlassFish Server Monitoring Data
To Connect JConsole to GlassFish Server
9. Writing and Running JavaScript Clients to Monitor GlassFish Server
10. Administering Life Cycle Modules
11. Extending and Updating GlassFish Server
Part II Resources and Services Administration
12. Administering Database Connectivity
13. Administering EIS Connectivity
14. Administering Internet Connectivity
15. Administering the Object Request Broker (ORB)
16. Administering the JavaMail Service
17. Administering the Java Message Service (JMS)
18. Administering the Java Naming and Directory Interface (JNDI) Service
19. Administering Transactions
By applying the list and get subcommands against the tree structure using dotted names, you can display more comprehensive monitoring data, such as a description of each of the statistics and its unit of measurement.
The following topics are addressed here:
The underlying assumptions for using the list and get subcommands with dotted names are:
A list subcommand that specifies a dotted name that is not followed by a wildcard (*) lists the current node’s immediate children. For example, the following subcommand lists all immediate children belonging to the server node:
list --monitor server
A list subcommand 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 subcommand lists all children of the applications node, their subsequent child nodes, and so on:
list --monitor server.applications.*
A list subcommand 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 subcommand followed by a .* or a * gets the set of attributes and their values that belong to the node specified.
For example, the following table explains the output of the list and get subcommands used with the dotted name for the resources node.
Table 8-4 Example Resources Level Dotted Names
|
For detailed information on dotted names, see the dotted-names(5ASC) help page.
Although the monitor subcommand is useful in many situations, 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 subcommands followed by the dotted name of a monitorable object.
Before You Begin
A monitorable object must be configured for monitoring before you can display information about the object. See To Enable Monitoring if needed.
For example, the following subcommand lists all components and services that have monitoring enabled for instance server.
asadmin> list --monitor "*" server.web server.connector-service server.orb server.jms-serviceserver.jvm server.applications server.http-service server.thread-pools
Example 8-8 Viewing Attributes for a Specific Type
This example gets information about all the attributes for object type jvm on instance server.
asadmin> get --monitor server.jvm.* server.jvm.class-loading-system.loadedclasscount = 3715 server.jvm.class-loading-system.totalloadedclasscount = 3731 server.jvm.class-loading-system.unloadedclasscount = 16 server.jvm.compilation-system.name-current = HotSpot Client Compiler server.jvm.compilation-system.totalcompilationtime = 769 server.jvm.garbage-collectors.Copy.collectioncount = 285 server.jvm.garbage-collectors.Copy.collectiontime = 980 server.jvm.garbage-collectors.MarkSweepCompact.collectioncount = 2 server.jvm.garbage-collectors.MarkSweepCompact.collectiontime = 383 server.jvm.memory.committedheapsize = 23498752 server.jvm.memory.committednonheapsize = 13598720 server.jvm.memory.initheapsize = 0 server.jvm.memory.initnonheapsize = 8585216 server.jvm.memory.maxheapsize = 66650112 server.jvm.memory.maxnonheapsize = 100663296 server.jvm.memory.objectpendingfinalizationcount = 0 server.jvm.memory.usedheapsize = 19741184 server.jvm.memory.usednonheapsize = 13398352 server.jvm.operating-system.arch-current = x86 server.jvm.operating-system.availableprocessors = 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 = 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
Example 8-9 Viewing Monitorable Applications
This example lists all the monitorable applications for instance server.
asadmin> list --monitor server.applications.* server.applications.app1 server.applications.app2 server.applications.app1.virtual-server1 server.applications.app2.virtual-server1
Example 8-10 Viewing Attributes for an Application
This example gets information about all the attributes for application hello.
asadmin> get --monitor server.applications.hello.* server.applications.hello.server.activatedsessionstotal = 0 server.applications.hello.server.activejspsloadedcount = 1 server.applications.hello.server.activeservletsloadedcount = 1 server.applications.hello.server.activesessionscurrent = 1 server.applications.hello.server.activesessionshigh = 1 server.applications.hello.server.errorcount = 0 server.applications.hello.server.expiredsessionstotal = 0 server.applications.hello.server.maxjspsloadedcount = 1 server.applications.hello.server.maxservletsloadedcount = 0 server.applications.hello.server.maxtime = 0 server.applications.hello.server.passivatedsessionstotal = 0 server.applications.hello.server.persistedsessionstotal = 0 server.applications.hello.server.processingtime = 0.0 server.applications.hello.server.rejectedsessionstotal = 0 server.applications.hello.server.requestcount = 0 server.applications.hello.server.sessionstotal = server.applications.hello.server.totaljspsloadedcount = 0 server.applications.hello.server.totalservletsloadedcount = 0
Example 8-11 Viewing a Specific Attribute
This example gets information about the jvm attribute runtime.vmversion-current on instance server.
asadmin> get --monitor server.jvm.runtime.vmversion-current 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 display the cumulative number of requests for the HTTP service on virtual-server1:
server.http-service.virtual-server1.request.requestcount
The tables in the following sections list the statistics that are available for each monitorable object:
EJBs fit into the tree of objects as shown in Applications Tree Hierarchy. Use the following dotted name pattern to get EJB statistics for an application:
server.applications.appname.ejbmodulename.ejbname.bean-cache.statistic
Note - EJB statistics for an application are available after the application is executed. If the application is deployed but has not yet been executed, all counts will show default values. When the application is undeployed, all its monitoring data is lost.
Statistics available for applications are shown in the following sections:
Use the following dotted name pattern for EJB cache statistics:
server.applications.appname.ejbmodulename.bean-cache.ejbname.statistic
The statistics available for EJB caches are listed in the following table.
Table 8-5 EJB Cache Monitoring Statistics
|
Use the following dotted name pattern for EJB container statistics:
server.applications.appname.ejbmodulename.container.ejbname
The statistics available for EJB containers are listed in the following table.
Table 8-6 EJB Container Monitoring Statistics
|
Use the following dotted name pattern for EJB method statistics:
server.applications.appname.ejbmodulename.bean-methods.ejbname.statistic
The statistics available for EJB method invocations are listed in the following table.
Table 8-7 EJB Method Monitoring Statistics
|
Use the following dotted name pattern for EJB pool statistics:
server.applications.appname.ejbmodulename.bean-pool.ejbname.statistic
The statistics available for EJB pools are listed in the following table.
Table 8-8 EJB Pool Monitoring Statistics
|
Use the following dotted name pattern for timer statistics:
server.applications.appname.ejbmodulename.timers.ejbname.statistic
The statistics available for timers are listed in the following table.
Table 8-9 Timer Monitoring Statistics
|
The HTTP service fits into the tree of objects as shown in HTTP Service Tree Hierarchy.
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 8-10 HTTP Service Virtual Server Monitoring Statistics
|
Jersey fits into the tree of objects as shown in Applications Tree Hierarchy.
Use the following dotted name pattern for Jersey statistics:
server.applications.jersey-application.jersey.resources.resource-0.hitcount.statistic
The statistics available for Jersey are shown in the following table.
Table 8-11 Jersey Statistics
|
The JMS/Connector Service fits into the tree of objects as shown in JMS/Container Service Tree Hierarchy.
JMS/Connector Service statistics are shown in the following sections:
Use the following dotted name pattern for JMS/Connector Service connection pool statistics:
server.connector-service.resource-adapter-1.connection-pool.statistic
JMS/Connector Service statistics available for the connector connection pools are shown in the following table.
Note - In order to improve system performance, connection pools are initialized lazily; that is, a pool is not initialized until an application first uses the pool or the pool is explicitly pinged. Monitoring statistics for a connection pool are not available until the pool is initialized.
Table 8-12 Connector Connection Pool Monitoring Statistics (JMS)
|
Use the following dotted name pattern for JMS/Connector Service work management statistics:
server.connector-service.resource-adapter-1.work-management.statistic
JMS/Connector Service statistics available for connector work management are listed in the following table.
Table 8-13 Connector Work Management Monitoring Statistics (JMS)
|
The JVM fits into the tree of objects as show in JVM Tree Hierarchy.
The statistics that are available for the Virtual Machine for Java platform (Java Virtual Machine) or 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
With Java SE, additional monitoring information can be obtained from the JVM. Set the monitoring level to LOW to enable the display of this additional information. Set the monitoring level to HIGH to also view information pertaining to each live thread in the system. More information about the additional monitoring features for Java SE is available in Monitoring and Management for the Java Platform.
The Java SE monitoring tools are discussed at http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/technotes/tools/.
The statistics that are available for class loading in the JVM for Java SE are shown in the following table.
Table 8-14 JVM Monitoring Statistics for Java SE Class Loading
|
The statistics available for threads in the JVM in Java SE are shown in the following table.
Table 8-15 JVM Monitoring Statistics for Java SE - Threads
|
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 8-16 JVM Monitoring Statistics for Java SE 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 8-17 JVM Monitoring Statistics for Java SE Garbage Collectors
|
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 8-18 JVM Monitoring Statistics for Java SE Memory
|
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 8-19 JVM Statistics for the Java SE Operating System
|
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 8-20 JVM Monitoring Statistics for Java SE Runtime
|
Network fits into the tree of objects as shown in Network Tree Hierarchy.
Network statistics are described in the following sections:
Use the following dotted name pattern for network keep alive statistics:
server.network.type-of-listener.keep-alive.statistic
Statistics available for network keep alive are shown in the following table.
Table 8-21 Network Keep Alive Statistics
|
Use the following dotted name pattern for network connection queue statistics:
server.network.type-of-listener.connection-queue.statistic
Statistics available for network connection queue are shown in the following table.
Table 8-22 Network Connection Queue Statistics
|
Use the following dotted name pattern for network file cache statistics:
server.network.type-of-listener.file-cache.statistic
Statistics available for network file cache are shown in the following table.
Table 8-23 Network File Cache Statistics
|
Use the following dotted name pattern for network thread pool statistics:
server.network.type-of-listener.thread-pool.statistic
Statistics available for network thread pool are shown in the following table.
Table 8-24 Network Thread Pool Statistics
|
The ORB fits into the tree of objects as shown in ORB Tree Hierarchy.
Use the following dotted name patterns for ORB statistics:
server.orb.transport.connectioncache.inbound.statistic server.orb.transport.connectioncache.outbound.statistic
The statistics available for the connection manager in an ORB are listed in the following table.
Table 8-25 ORB Monitoring Statistics (Connection Manager)
|
By monitoring connection pool resources you can measure performance and capture resource usage at runtime. Connections are expensive and frequently cause performance bottlenecks in applications. It is important to monitor how a connection pool is releasing and creating new connections and how many threads are waiting to retrieve a connection from a particular pool.
The connection pool resources fit into the tree of objects as shown in Resources Tree Hierarchy.
Use the following dotted name pattern for general connection pool statistics:
server.resources.pool-name.statistic
Use the following dotted name pattern for application-scoped connection pool statistics:
server.applications.application-name.resources.pool-name.statistic
Use the following dotted name pattern for module-scoped connection pool statistics:
server.applications.application-name.module-name.resources.pool-name.statistic
The connection pool statistics are shown in the following tables.
Note - In order to improve system performance, connection pools are initialized lazily; that is, a pool is not initialized until an application first uses the pool or the pool is explicitly pinged. Monitoring statistics for a connection pool are not available until the pool is initialized.
Table 8-26 General Resource Monitoring Statistics (Connection Pool)
|
Table 8-27 Application Specific Resource Monitoring Statistics (Connection Pool)
|
Security fits into the tree of objects as shown in Security Tree Hierarchy.
Statistics available for security are shown in the following sections:
Use the following dotted name pattern for EJB security statistics:
server.security.ejb.statistic
The statistics available for EJB security are listed in the following table.
Table 8-28 EJB Security Monitoring Statistics
|
Use the following dotted name pattern for web security statistics:
server.security.web.statistic
The statistics available for web security are listed in the following table.
Table 8-29 Web Security Monitoring Statistics
|
Use the following dotted name pattern for realm security statistics:
server.security.realm.statistic
The statistics available for realm security are listed in the following table.
Table 8-30 Realm Security Monitoring Statistics
|
The thread pool fits into the tree of objects as shown in Thread Pool Tree Hierarchy.
The statistics available for thread pools are shown in the following sections:
Use the following dotted name pattern for thread pool statistics:
server.thread-pool.thread-pool.statistic
The statistics available for the thread pool are shown in the following table.
Table 8-31 Thread Pool Monitoring Statistics
|
The statistics available for ThreadInfo in the JVM in Java SE are shown in the following table.
Table 8-32 JVM Monitoring Statistics for Java SE - Thread Info
|
The transaction service allows the client to freeze the transaction subsystem in order to roll back transactions and determine which transactions are in process at the time of the freeze. The transaction service fits into the tree of objects as shown in Transactions Service Tree Hierarchy.
Use the following dotted name pattern for transaction service statistics:
server.transaction-service.statistic
The statistics available for the transaction service are shown in the following table.
Table 8-33 Transaction Service Monitoring Statistics
|
The web module 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 module servlet statistics:
server.applications.web-module.virtual-server.servlet.statistic server.applications.application.web-module.virtual-server.servlet.statistic
The available web module servlet statistics are shown in the following table.
Table 8-34 Web Module Servlet Statistics
|
Use the following dotted name pattern for web JSP statistics:
server.applications.web-module.virtual-server.statistic server.applications.application.web-module.virtual-server.statistic
The available web JSP statistics are shown in the following table.
Table 8-35 Web JSP Monitoring Statistics
|
Use the following dotted name pattern for web request statistics:
server.applications.web-module.virtual-server.statistic server.applications.application.web-module.virtual-server.statistic
The available web request statistics are shown in the following table.
Table 8-36 Web Request Monitoring Statistics
|
Use the following dotted name pattern for web servlet statistics:
server.applications.web-module.virtual-server.statistic server.applications.application.web-module.virtual-server.statistic
The available web servlet statistics are shown in the following table.
Table 8-37 Web Servlet Monitoring Statistics
|
Use the following dotted name pattern for web session statistics:
server.applications.web-module.virtual-server.statistic server.applications.application.web-module.virtual-server.statistic
The available web session statistics are shown in the following table.
Table 8-38 Web Session Monitoring Statistics
|