Chapter 16
Monitoring Components and Services
This chapter contains information about monitoring components using the Application Server Admin Console. This chapter contains the following sections:
About Monitoring
Monitoring in the Application Server
Use monitoring to observe the runtime state of various components and services deployed in a server instance of the Sun Java System Application Server Platform Edition 8.1 2005Q1. With the information on the state of runtime components and processes, it is possible to identify performance bottlenecks for tuning purposes, aid capacity planning, predict failures, do root cause analysis in case of failures, and ensure that everything is functioning as expected.
Turning monitoring on reduces performance by increasing overhead.
Overview of Monitoring
To monitor the Application Server, perform these steps:
About the Tree Structure of Monitorable Objects
The Application Server uses a tree structure to track monitorable objects. Because the tree of monitoring objects is dynamic, it changes as components are added, updated, or removed in the instance. The root object in the tree is the server instance name, for example, server. (In the Platform Edition, just one server instance is permitted.)
The following command displays the top level of the tree:
asadmin> list --monitor server
server.applications
server.http-service
server.connector-service
server.jms-service
server.jvm
server.orb
server.resources
server.thread-pools
The following sections describe these sub-trees:
The Applications Tree
The following schematic shows the top and child nodes for the various components of enterprise applications. The nodes at which monitoring statistics are available are marked with an asterisk (*). For more information, refer to "EJB Container Statistics" and "Web Container Statistics".
Figure 16-1 Applications Node Tree Structure
applications
|--- application1
| |--- ejb-module-1
| | |--- ejb1 *
| | |--- cache (for entity/sfsb) *
| | |--- pool (for slsb/mdb/entity) *
| | |--- methods
| | |---method1 *
| | |---method2 *
| | |--- stateful-session-store (for sfsb)*
| | |--- timers (for s1sb/entity/mdb) *
| |--- web-module-1
| | |--- virtual-server-1 *
| | |---servlet1 *
| | |---servlet2 *
|--- standalone-web-module-1
| | |----- virtual-server-2 *
| | |---servlet3 *
| | |---servlet4 *
| | |----- virtual-server-3 *
| | |---servlet3 *(same servlet on different vs)
| | |---servlet5 *
|--- standalone-ejb-module-1
| | |--- ejb2 *
| | |--- cache (for entity/sfsb) *
| | |--- pool (for slsb/mdb/entity) *
| | |--- methods
| | |--- method1 *
| | |--- method2 *
|--- application2
The HTTP Service Tree
The nodes of the HTTP service are shown in the following schematic. The nodes at which monitoring information is available are marked with an asterisk (*). See "The HTTP Service Tree".
Figure 16-2 HTTP Service Schematic (PE version)
http-service
|--- virtual-server-1
|--- http-listener-1 *
|--- http-listener-2 *
|--- virtual-server-2
|--- http-listener-1 *
|--- http-listener-2 *
Figure 16-3 HTTP Service Schematic (EE version)
http-service *
|---connection-queue *
|---dns *
|---file-cache *
|---keep-alive *
|---pwc-thread-pool *
|---virtual-server-1*
| |--- request *
|---virtual-server-2*
| |--- request *
The Resources Tree
The resources node holds monitorable attributes for pools such as the JDBC connection pool and connector connection pool. The following schematic shows the top and child nodes for the various resource components. The nodes at which monitoring statistics are available are marked with an asterisk (*). See "JDBC Connection Pools Statistics" and "JMS/Connector Service Statistics".
Figure 16-4 Resources Schematic
resources
|---connection-pool1(either connector-connection-pool or jdbc)*
|---connection-pool2(either connector-connection-pool or jdbc)*
The Connector Service Tree
The connector services node holds monitorable attributes for pools such as the connector connection pool. The following schematic shows the top and child nodes for the various connector service components. The nodes at which monitoring statistics are available are marked with an asterisk (*). See "JMS/Connector Service Statistics".
Figure 16-5 Connector Service Schematic
connector-service
|--- resource-adapter-1
| |-- connection-pools
| | |-- pool-1 (All pool stats for this pool)
| |-- work-management (All work mgmt stats for this RA)
The JMS Service Tree
The JMS services node holds monitorable attributes for pools such as the connector connection pool. The following schematic shows the top and child nodes for the various JMS service components. The nodes at which monitoring statistics are available are marked with an asterisk (*).
Figure 16-6 JMS Service Schematic
jms-service
|-- connection-factories [AKA conn. pools in the RA world]
| |-- connection-factory-1 (All CF stats for this CF)
|-- work-management (All work mgmt stats for the MQ-RA)
The ORB Tree
The ORB node holds monitorable attributes for connection managers. The following schematic shows the top and child nodes for the ORB components. The nodes at which monitoring statistics are available are marked with an asterisk (*). See "Statistics for Connection Managers in an ORB".
Figure 16-7 ORB Schematic
orb
|--- connection-managers
| |--- connection-manager-1 *
| |--- connection-manager-1 *
The Thread Pool Tree
The thread pool node holds monitorable attributes for connection managers. The following schematic shows the top and child nodes for the ORB components. The nodes at which monitoring statistics are available are marked with an asterisk (*). See "Thread Pools Statistics".
Figure 16-8 Thread Pool Schematic
thread-pools
| |--- thread-pool-1 *
| |--- thread-pool-2 *
About Statistics for Monitored Components and Services
This section describes the monitoring statistics that are available:
EJB Container Statistics
EJB statistics are described in Table 16-1.
Table 16-1 EJB Statistics
|
Attribute Name
|
Data Type
|
Description
|
|
createcount
|
Count Statistic
|
Number of times an EJB’s create method is called.
|
|
removecount
|
Count Statistic
|
Number of times an EJB’s remove method is called.
|
|
pooledcount
|
Range Statistic
|
Number of entity beans in pooled state.
|
|
readycount
|
Range Statistic
|
Number of entity beans in ready state.
|
|
messagecount
|
Count Statistic
|
Number of messages received for a message-driven bean.
|
|
methodreadycount
|
Range Statistic
|
Number of stateful or stateless session beans that are in the MethodReady state.
|
|
passivecount
|
Range Statistic
|
Number of stateful session beans that are in Passive state.
|
The statistics available for EJB method invocations are listed in Table 16-2.
Table 16-2 EJB Method Statistics
|
Attribute Name
|
Datatype
|
Description
|
|
methodstatistic
|
Time Statistic
|
Number of times an operation is called; the total time that is spent during the invocation, and so on.
|
|
totalnumerrors
|
Count Statistic
|
Number of times the method execution resulted in an exception. This is collected for stateless and stateful session beans and entity beans if monitoring is enabled for the EJB container.
|
|
totalnumsuccess
|
Count Statistic
|
Number of times the method successfully executed. This is collected for stateless and stateful session beans and entity beans if monitoring enabled is true for EJB container.
|
|
executiontime
|
Count Statistic
|
Time (ms) spent executing the method for the last successful/unsuccessful attempt to execute the operation. This is collected for stateless and stateful session beans and entity beans if monitoring is enabled on the EJB container.
|
The statistics for EJB Session Stores are listed in Table 16-3.
Table 16-3 EJB Session Store Statistics
|
Attribute Name
|
Datatype
|
Description
|
|
currentSize
|
Range Statistic
|
Number of passivated or checkpointed sessions currently in the store.
|
|
activationCount
|
Count Statistic
|
Number of sessions activated from the store.
|
|
activationSuccessCount
|
Count Statistic
|
Number of sessions successfully activated from the store
|
|
activationErrorCount
|
Count Statistic
|
Time (ms) spent executing the method for the last successful/unsuccessful attempt to execute the operation. This is collected for stateless and stateful session beans and entity beans, if monitoring is enabled on the EJB container.
|
|
passivationCount
|
Count Statistic
|
Number of sessions passivated (unactivated) using this store.
|
|
passivationSuccessCount
|
Count Statistic
|
Number of sessions successfully passivated using this store.
|
|
passivationErrorCount
|
Count Statistic
|
Number of sessions that could not be passivated using this store.
|
|
expiredSessionCount
|
Count Statistic
|
Number of expired sessions that were removed by this store.
|
|
passivatedBeanSize
|
Count Statistic
|
Total number of bytes passivated by this store, including total, minimum, and maximum.
|
|
passivationTime
|
Count Statistic
|
Time spent on passivating beans to the store, including the total, minimum, and maximum.
|
|
checkpointCount (EE only)
|
Count Statistic
|
Number of sessions checkpointed using this store.
|
|
checkpointSuccessCount (EE only)
|
Count Statistic
|
Number of sessions checkpointed successfully.
|
|
checkpointErrorCount (EE only)
|
Count Statistic
|
Number of sessions that couldn't be checkpointed.
|
|
checkpointedBeanSize (EE only)
|
Value Statistic
|
Total number of beans checkpointed by the store.
|
|
checkpointTime (EE only)
|
Time Statistic
|
Time spent on checkpointing beans to the store.
|
The statistics available for EJB pools are listed in Table 16-4.
Table 16-4 EJB Pool Statistics
|
Attribute Name
|
Data Type
|
Description
|
|
numbeansinpool
|
Bounded Range Statistic
|
Number of EJB’s in the associated pool, providing an idea about how the pool is changing.
|
|
numthreadswaiting
|
Bounded Range Statistic
|
Number of threads waiting for free beans, giving an indication of possible congestion of requests.
|
|
totalbeanscreated
|
Count Statistic
|
Number of beans created in associated pool since the gathering of data started.
|
|
totalbeansdestroyed
|
Count Statistic
|
Number of beans destroyed from associated pool since the gathering of data started.
|
|
jmsmaxmessagesload
|
Count Statistic
|
The maximum number of messages to load into a JMS session at one time for a message-driven bean to serve. Default is 1. Applies only to pools for message driven beans.
|
The statistics available for EJB caches are listed in Table 16-5.
Table 16-5 EJB Cache Statistics
|
Attribute Name
|
Datatype
|
Description
|
|
cachemisses
|
Bounded Range Statistic
|
The number of times a user request does not find a bean in the cache.
|
|
cachehits
|
Bounded Range Statistic
|
The number of times a user request found an entry in the cache.
|
|
numbeansincache
|
Bounded Range Statistic
|
The number of beans in the cache. This is the current size of the cache.
|
|
numpassivations
|
Count Statistic
|
Number of passivations. Applies only to stateful session beans.
|
|
numpassivationerrors
|
Count Statistic
|
Number of errors during passivation. Applies only to stateful session beans.
|
|
numexpiredsessionsremoved
|
Count Statistic
|
Number of expired sessions removed by the cleanup thread. Applies only to stateful session beans.
|
|
numpassivationsuccess
|
Count Statistic
|
Number of times passivation completed successfully. Applies only to stateful session beans.
|
The statistics available for Timers are listed in Table 16-6.
Table 16-6 Timer Statistics
|
Statistic
|
Data Type
|
Description
|
|
numtimerscreated
|
CountStatistic
|
Number of timers created in the system.
|
|
numtimersdelivered
|
CountStatistic
|
Number of timers delivered by the system.
|
|
numtimersremoved
|
CountStatistic
|
Number of timers removed from the system.
|
Web Container Statistics
The web container fits into the tree of objects as shown in Figure 16-1. Web container statistics are displayed for each individual web application. Statistics available for the web container for Servlets are shown in Table 16-7 and statistics available for web modules are shown in Table 16-8.
Table 16-7 Web Container (Servlet) Statistics
|
Statistic
|
Units
|
Data Type
|
Comments
|
|
errorcount
|
Number
|
CountStatistic
|
Cumulative number of cases where the response code is greater than or equal to 400.
|
|
maxtime
|
Milliseconds
|
CountStatistic
|
The maximum amount of time the web container waits for requests.
|
|
processingtime
|
Milliseconds
|
CountStatistic
|
Cumulative value of the amount of time required to process each request. The processing time is the average of request processing times divided by the request count.
|
|
requestcount
|
Number
|
CountStatistic
|
The total number of requests processed so far.
|
Statistics available for web modules are shown in Table 16-8.
Table 16-8 Web Container (Web Module) Statistics
|
Statistic
|
Data Type
|
Comments
|
|
jspcount
|
CountStatistic
|
Number of JSP pages that have been loaded in the web module.
|
|
jspreloadcount
|
CountStatistic
|
Number of JSP pages that have been reloaded in the web module.
|
|
sessionstotal
|
CountStatistic
|
Total number of sessions that have been created for the web module.
|
|
activesessionscurrent
|
CountStatistic
|
Number of currently active sessions for the web module.
|
|
activesessionshigh
|
CountStatistic
|
Maximum number of concurrently active sessions for the web module.
|
|
rejectedsessionstotal
|
CountStatistic
|
Total number of rejected sessions for the web module. This is the number of sessions that were not created because the maximum allowed number of sessions were active.
|
|
expiredsessionstotal
|
CountStatistic
|
Total number of expired sessions for the web module.
|
|
sessionsize (EE only)
|
AverageRange Statistic
|
Size of the session for the web module. Value is either high, low, or average, or is in bytes for serialized sessions.
|
|
containerlatency (EE only)
|
AverageRange Statistic
|
Latency for the web container’s part of the overall latency request. Value is either high, low, or average.
|
|
sessionpersisttime (EE only)
|
AverageRange Statistics
|
Time (in ms, low, high, or average) taken to persist HTTP session state to back-end store for the web module.
|
|
cachedsessionscurrent (EE only)
|
CountStatistic
|
Current number of sessions cached in memory for the web module.
|
|
passivatedsessionscurrent (EE only)
|
CountStatistic
|
Current number of sessions passivated for the web module.
|
HTTP Service Statistics
The statistics available for the HTTP service are shown in Table 16-9. These statistics are applicable to the Platform Edition only. For statistics for the HTTP Service on the Enterprise Edition, see Table 16-32.
Table 16-9 HTTP Service Statistics (applicable to Platform Edition only)
|
Statistic
|
Units
|
Data Type
|
Comments
|
|
bytesreceived
|
Bytes
|
Count Statistic
|
The cumulative value of the bytes received by each of the request processors.
|
|
bytessent
|
Bytes
|
Count Statistic
|
The cumulative value of the bytes sent by each of the request processors.
|
|
currentthreadcount
|
Number
|
Count Statistic
|
The number of processing threads currently in the listener thread pool.
|
|
currentthreadsbusy
|
Number
|
Count Statistic
|
The number of request processing threads currently in use in the listener thread pool serving requests.
|
|
errorcount
|
Number
|
Count Statistic
|
The cumulative value of the error count, which represents the number of cases where the response code is greater than or equal to 400.
|
|
maxsparethreads
|
Number
|
Count Statistic
|
The maximum number of unused response processing threads that can exist.
|
|
minsparethreads
|
Number
|
Count Statistic
|
The minimum number of unused response processing threads that can exist.
|
|
maxthreads
|
Number
|
Count Statistic
|
The maximum number of request processing threads created by the listener.
|
|
maxtime
|
Milliseconds
|
Count Statistic
|
The maximum amount of time for processing threads.
|
|
processing-time
|
Milliseconds
|
Count Statistic
|
The cumulative value of the times taken to process each request. The processing time is the average of request processing times divided by the request count.
|
|
request-count
|
Number
|
Count Statistic
|
The total number of requests processed so far.
|
JDBC Connection Pools Statistics
Monitor JDBC resources to measure performance and capture resource usage at runtime. As the creation of JDBC connections are expensive and frequently cause performance bottlenecks in applications, it is crucial to monitor how a JDBC connection pool is releasing and creating new connections and how many threads are waiting to retrieve a connection from a particular pool.
The statistics available for the JDBC connection pool are shown in Table 16-10.
Table 16-10 JDBC Connection Pool Statistics
|
Statistic
|
Units
|
Data Type
|
Description
|
|
numconnfailedvalidation
|
Number
|
Count Statistic
|
The total number of connections in the connection pool that failed validation from the start time until the last sample time.
|
|
numconnused
|
Number
|
Range Statistic
|
Provides connection usage statistics. The total number of connections that are currently being used, as well as information about the maximum number of connections that were used (the high water mark).
|
|
numconnfree
|
Range Statistic
|
Count Statistic
|
The total number of free connections in the pool as of the last sampling.
|
|
numconntimedout
|
Count Statistic
|
Bounded Range Statistic
|
The total number of connections in the pool that timed out between the start time and the last sample time.
|
|
averageconnwaittime
|
Number
|
Count Statistic
|
Indicates the average wait time of connections for successful connection request attempts to the connector connection pool.
|
|
waitqueuelength
|
Number
|
Count Statistic
|
Number of connection requests in the queue waiting to be serviced.
|
|
connectionrequestwaittime
|
|
Range Statistic
|
The longest and shortest wait times of connection requests. The current value indicates the wait time of the last request that was serviced by the pool.
|
|
numconncreated
|
Milliseconds
|
CountStatistic
|
The number of physical connections that were created since the last reset.
|
|
numconndestroyed
|
Number
|
Count Statistic
|
Number of physical connections that were destroyed since the last reset.
|
|
numconnacquired
|
Number
|
Count Statistic
|
Number of logical connections acquired from the pool.
|
|
numconnreleased
|
Number
|
Count Statistic
|
Number of logical connections released to the pool.
|
JMS/Connector Service Statistics
The statistics available for the connector connection pool are shown in Table 16-11. Statistics for Connector Work Management are shown in Table 16-12.
Table 16-11 Connector Connection Pool Statistics
|
Statistic
|
Units
|
Data Type
|
Description
|
|
numconnfailed validation
|
Number
|
Count Statistic
|
The total number of connections in the connection pool that failed validation from the start time until the last sample time.
|
|
numconnused
|
Number
|
Range Statistic
|
Provides connection usage statistics. The total number of connections that are currently being used, as well as information about the maximum number of connections that were used (the high water mark).
|
|
numconnfree
|
Number
|
Range Statistic
|
The total number of free connections in the pool as of the last sampling.
|
|
numconntimedout
|
Number
|
Count Statistic
|
The total number of connections in the pool that timed out between the start time and the last sample time.
|
|
averageconnwaittime
|
Number
|
Count Statistic
|
Average wait time of connections before they are serviced by the connection pool.
|
|
waitqueuelenght
|
Number
|
Count Statistic
|
Number of connection requests in the queue waiting to be serviced.
|
|
connectionrequest waittime
|
|
Range Statistic
|
The longest and shortest wait times of connection requests. The current value indicates the wait time of the last request that was serviced by the pool.
|
|
numconncreated
|
Milliseconds
|
CountStatistic
|
The number of physical connections that were created since the last reset.
|
|
numconndestroyed
|
Number
|
Count Statistic
|
Number of physical connections that were destroyed since the last reset.
|
|
numconnacquired
|
Number
|
Count Statistic
|
Number of logical connections acquired from the pool.
|
|
numconnreleased
|
Number
|
Count Statistic
|
Number of logical connections released to the pool.
|
Statistics available for Connector Work Management are listed in Table 16-12,
Table 16-12 Connector Work Management Statistics
|
Statistic
|
Data Type
|
Description
|
|
activeworkcount
|
Range Statistic
|
Number of work objects executed by the connector.
|
|
waitqueuelength
|
Range Statistic
|
Number of work objects waiting in the queue before executing.
|
|
workrequestwaittime
|
Range Statistic
|
Longest and shortest wait of a work object before it gets executed.
|
|
submittedworkcount
|
Count Statistic
|
Number of work objects submitted by a connector module.
|
|
rejectedworkcount
|
Count Statistic
|
Number of work objects rejected by the Application Server.
|
|
completedworkcount
|
Count Statistic
|
Number of work objects that were completed.
|
Statistics for Connection Managers in an ORB
The statistics available for the connection manager in an ORB are listed in Table 16-13.
Table 16-13 Connection Manager (in an ORB) Statistics
|
Statistic
|
Units
|
Data Type
|
Description
|
|
connectionsidle
|
Number
|
CountStatistic
|
Provides total number of connections that are idle to the ORB.
|
|
connectionsinuse
|
Number
|
CountStatistic
|
Provides total number of connections in use to the ORB.
|
|
totalconnections
|
Number
|
BoundedRange Statistic
|
Total number of connections to the ORB.
|
Thread Pools Statistics
The statistics available for the thread pool are shown in Table 16-14.
Table 16-14 Thread Pool Statistics
|
Statistic
|
Units
|
Data Type
|
Description
|
|
averagetimeinqueue
|
Milliseconds
|
RangeStatistics
|
The average amount of time in milliseconds a request waited in the queue before getting processed.
|
|
averageworkcompletion- time
|
Milliseconds
|
RangeStatistics
|
The average amount of time taken to complete an assignment, in milliseconds.
|
|
currentnumberofthreads
|
Number
|
BoundedRange Statistic
|
Current number of request processing threads.
|
|
numberofavailablethreads
|
Number
|
CountStatistic
|
The number of threads that are available.
|
|
numberofbusythreads
|
Number
|
CountStatistic
|
The number of threads that are busy.
|
|
totalworkitemsadded
|
Number
|
CountStatistic
|
The total number of work items added so far to the work queue.
|
Transaction Service Statistics
The transaction service allows the client to freeze the transaction subsystem in order to roll back transactions and determine the transactions that are in process at the time of the freeze. The statistics available for the transaction service are shown in Table 16-15.
Table 16-15 Transaction Service Statistics
|
Statistic
|
Data Type
|
Description
|
|
activecount
|
CountStatistic
|
Number of transactions currently active.
|
|
activeids
|
String Statistic
|
The ID’s of the transactions that are currently active. Every such transaction can be rolled back after freezing the transaction service.
|
|
committedcount
|
CountStatistic
|
Number of transactions that have been committed.
|
|
rolledbackcount
|
CountStatistic
|
Number of transactions that have been rolled back.
|
|
state
|
String Statistic
|
Indicates whether or not the transaction has been frozen.
|
Java Virtual Machine (JVM) Statistics
The JVM has monitorable attributes that are always enabled. The statistics available for the JVM are shown in Table 16-16.
Table 16-16 JVM Statistics
|
Statistic
|
Data Type
|
Description
|
|
heapsize
|
BoundedRange Statistic
|
The resident memory footprint with the higher and lower bounds of the JVM’s memory heap size.
|
|
uptime
|
CountStatistic
|
The amount of time the JVM has been running.
|
JVM Statistics in J2SE 5.0
If the Application Server is configured to run on J2SE version 5.0 or higher, 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 on the additional monitoring features available in J2SE 5.0 is available in a document titled Monitoring and Management for the Java Platform, which is available from the following URL:
http://java.sun.com/j2se/1.5.0/docs/guide/management/
The J2SE 5.0 monitoring tools are discussed at:
http://java.sun.com/j2se/1.5.0/docs/tooldocs/#manage
The statistics available for class loading in the JVM in J2SE 5.0 are shown in Table 16-17.
Table 16-17 JVM Statistics for J2SE 5.0 - Class Loading
|
Statistic
|
Data Type
|
Description
|
|
loadedclasscount
|
CountStatistic
|
Number of classes that are currently loaded in the JVM.
|
|
totalloadedclasscount
|
CountStatistic
|
Total number of classes that have been loaded since the JVM began execution.
|
|
unloadedclasscount
|
CountStatistic
|
Number of classes that have been unloaded from the JVM since the JVM began execution.
|
The statistics available for compilation in the JVM in J2SE 5.0 are shown in Table 16-18.
Table 16-18 JVM Statistics for J2SE 5.0 - Compilation
|
Statistic
|
Data Type
|
Description
|
|
totalcompilationtime
|
CountStatistic
|
Accumulated time (in milliseconds) spent in compilation.
|
The statistics available for garbage collection in the JVM in J2SE 5.0 are shown in Table 16-19.
Table 16-19 JVM Statistics for J2SE 5.0 - Garbage Collection
|
Statistic
|
Data Type
|
Description
|
|
collectioncount
|
CountStatistic
|
Total number of collections that have occurred.
|
|
collectiontime
|
CountStatistic
|
Accumulated collection time (in milliseconds).
|
The statistics available for memory in the JVM in J2SE 5.0 are shown in Table 16-20.
Table 16-20 JVM Statistics for J2SE 5.0 - Memory
|
Statistic
|
Data Type
|
Description
|
|
objectpendingfinalizationcount
|
CountStatistic
|
Approximate number of objects that are pending finalization.
|
|
initheapsize
|
CountStatistic
|
Size of the heap initially requested by the JVM.
|
|
usedheapsize
|
CountStatistic
|
Size of the heap currently in use.
|
|
maxheapsize
|
CountStatistic
|
Maximum amount of memory (in bytes) that can be used for memory management.
|
|
committedheapsize
|
CountStatistic
|
Amount of memory (in bytes) that is committed for the JVM to use.
|
|
initnonheapsize
|
CountStatistic
|
Size of the non-heap area initially requested by the JVM.
|
|
usednonheapsize
|
CountStatistic
|
Size of the non-heap area currently in use.
|
|
maxnonheapsize
|
CountStatistic
|
Maximum amount of memory (in bytes) that can be used for memory management.
|
|
committednonheapsize
|
CountStatistic
|
Amount of memory (in bytes) that is committed for the JVM to use.
|
The statistics available for the operating system in the JVM in J2SE 5.0 are shown in Table 16-21.
Table 16-21 JVM Statistics for J2SE 5.0 - Operating System
|
Statistic
|
Data Type
|
Description
|
|
arch
|
StringStatistic
|
Operating system architecture.
|
|
availableprocessors
|
CountStatistic
|
Number of processors available to the JVM.
|
|
name
|
StringStatistic
|
Operating system name.
|
|
version
|
StringStatistic
|
Operating system version.
|
The statistics available for the runtime in the JVM in J2SE 5.0 are shown in Table 16-22.
Table 16-22 JVM Statistics for J2SE 5.0 - Runtime
|
Statistic
|
Data Type
|
Description
|
|
name
|
StringStatistic
|
Name representing the running JVM
|
|
vmname
|
StringStatistic
|
JVM implementation name.
|
|
vmvendor
|
StringStatistic
|
JVM implementation vendor.
|
|
vmversion
|
StringStatistic
|
JVM implementation version.
|
|
specname
|
StringStatistic
|
JVM specification name.
|
|
specvendor
|
StringStatistic
|
JVM specification vendor.
|
|
specversion
|
StringStatistic
|
JVM specification version.
|
|
managementspecversion
|
StringStatistic
|
Management spec. version implemented by the JVM.
|
|
classpath
|
StringStatistic
|
Classpath that is used by the system class loader to search for class files.
|
|
librarypath
|
StringStatistic
|
Java library path.
|
|
bootclasspath
|
StringStatistic
|
Classpath that is used by the bootstrap class loader to search for class files.
|
|
inputarguments
|
StringStatistic
|
Input arguments passed to the JVM. Does not include the arguments to the main method.
|
|
uptime
|
CountStatistic
|
Uptime of the JVM (in milliseconds).
|
The statistics available for ThreadInfo in the JVM in J2SE 5.0 are shown in Table 16-23.
Table 16-23 JVM Statistics for J2SE 5.0 - ThreadInfo
|
Statistic
|
Data Type
|
Description
|
|
threadid
|
CountStatistic
|
Id of the thread.
|
|
threadname
|
StringStatistic
|
Name of the thread.
|
|
threadstate
|
StringStatistic
|
State of the thread.
|
|
blockedtime
|
CountStatistic
|
Time elapsed (in milliseconds) since the thread entered the BLOCKED state. Returns -1 if thread contention monitoring is disabled.
|
|
blockedcount
|
CountStatistic
|
Total number of times that the thread entered the BLOCKED state.
|
|
waitedtime
|
CountStatistic
|
Elapsed time (in milliseconds) that the thread has been in a WAITING state. Returns -1 if thread contention monitoring is disabled.
|
|
waitedcount
|
CountStatistic
|
Total number of times the thread was in WAITING or TIMED_WAITING states.
|
|
lockname
|
StringStatistic
|
String representation of the monitor lock that the thread is blocked to enter or waiting to be notified through the Object.wait method.
|
|
lockownerid
|
CountStatistic
|
Id of the thread that holds the monitor lock of an object on which this thread is blocking.
|
|
lockownername
|
StringStatistic
|
Name of the thread that holds the monitor lock of the object this thread is blocking on.
|
|
stacktrace
|
StringStatistic
|
Stack trace associated with this thread.
|
The statistics available for threads in the JVM in J2SE 5.0 are shown in Table 16-24.
Table 16-24 JVM Statistics for J2SE 5.0 - Threads
|
Statistic
|
Data Type
|
Description
|
|
threadcount
|
CountStatistic
|
Current number of live daemon and non-daemon threads.
|
|
peakthreadcount
|
CountStatistic
|
Peak live thread count since the JVM started or the peak was reset.
|
|
totalstartedthreadcount
|
CountStatistic
|
Total number of threads created and/or started since the JVM started.
|
|
daemonthreadcount
|
CountStatistic
|
Current number of live daemon threads.
|
|
allthreadids
|
StringStatistic
|
List of all live thread ids.
|
|
currentthreadcputime
|
CountStatistic
|
CPU time for the current thread (in nanoseconds) if CPU time measurement is enabled. If CPU time measurement is disabled, returns -1.
|
|
monitordeadlockedthreads
|
StringStatistic
|
List of thread ids that are monitor deadlocked.
|
Production Web Container (PWC) Statistics
Statistics are available for the following PWC components and services on the Enterprise Edition (EE) of the Application Server:
Statistics for PWC virtual servers are listed in Table 16-25.
Table 16-25 PWC Virtual Server Statistics (EE only)
|
Attribute Name
|
Data Type
|
Description
|
|
id
|
String Statistic
|
The ID of the virtual server.
|
|
mode
|
String Statistic
|
The mode the virtual server is in. Options include unknown or active.
|
|
hosts
|
String Statistic
|
Name of the hosts serviced by this virtual server.
|
|
interfaces
|
String Statistic
|
Type of interfaces (listeners) for which the virtual server is configured.
|
The statistics available for PWC requests are listed in Table 16-26.
Table 16-26 PWC Request Statistics (EE only)
|
Attribute Name
|
Datatype
|
Description
|
|
method
|
String Statistic
|
Method used for request.
|
|
uri
|
String Statistic
|
Last URI served.
|
|
countrequests
|
Count Statistic
|
Number of requests served.
|
|
countbytestransmitted
|
Count Statistic
|
Number of bytes transmitted, or 0 if this information is not available
|
|
countbytesreceived
|
Count Statistic
|
Number of bytes received, or 0 if this information is not available.
|
|
ratebytesreceived
|
Count Statistic
|
Rate at which data was transmitted over some server-defined interval, or 0 if this information is not available
|
|
maxbytestransmissionrate
|
Count Statistic
|
Maximum rate at which data was transmitted over some server-defined interval, or 0 if this information is not available.
|
|
countopenconnections
|
Count Statistic
|
Number of connections that are currently open, or 0 if this information is not available.
|
|
maxopenconnections
|
Count Statistic
|
Maximum number of concurrently open connections, or 0 if this information is not available.
|
|
count2xx
|
Count Statistic
|
Total number of responses of code 2XX.
|
|
count3xx
|
Count Statistic
|
Total number of responses of code 3XX.
|
|
count4xx
|
Count Statistic
|
Total number of responses of code 4XX.
|
|
count5xx
|
Count Statistic
|
Total number of responses of code 5XX.
|
|
countother
|
Count Statistic
|
Total number of responses with other response codes.
|
|
count200
|
Count Statistic
|
Total number of responses of code 200.
|
|
count302
|
Count Statistic
|
Total number of responses of code 302.
|
|
count304
|
Count Statistic
|
Total number of responses of code 304.
|
|
count400
|
Count Statistic
|
Total number of responses of code 400.
|
|
count401
|
Count Statistic
|
Total number of responses of code 401.
|
|
count403
|
Count Statistic
|
Total number of responses of code 403.
|
|
count404
|
Count Statistic
|
Total number of responses of code 404.
|
|
count503
|
Count Statistic
|
Total number of responses of code 503.
|
The cache information section provides information on how the file cache is being used. Statistics for PWC file caches are listed in Table 16-27.
Table 16-27 PWC File Cache Statistics (EE only)
|
Attribute Name
|
Data Type
|
Description
|
|
flagenabled
|
Count Statistic
|
Indicates whether the file cache is enabled. Valid values are 0 for no or 1 for yes.
|
|
secondsmaxage
|
Count Statistic
|
Maximum age of a valid cache entry, in seconds.
|
|
countentries
|
Count Statistic
|
Number of current cache entries. A single cache entry represents a single URI.
|
|
maxentries
|
Count Statistic
|
Maximum number of simultaneous cache entries.
|
|
countopenentries
|
Count Statistic
|
Number of entries associated with an open file.
|
|
maxopenentries
|
Count Statistic
|
Maximum number of simultaneous cache entries associated with an open file.
|
|
sizeheapcache
|
Count Statistic
|
Heap space used for cache content.
|
|
maxheapcachesize
|
Count Statistic
|
Maximum heap space used for cache file content.
|
|
sizemmapcache
|
Count Statistic
|
Amount of address space used by memory mapped file content.
|
|
maxmmapcachesize
|
Count Statistic
|
Maximum amount of address space used by the file cache for memory mapped file content.
|
|
counthits
|
Count Statistic
|
Number of successful cache lookups.
|
|
countmisses
|
Count Statistic
|
Number of failed cache lookups.
|
|
countinfohits
|
Count Statistic
|
Number of times a file information lookup succeeded.
|
|
countinfomisses
|
Count Statistic
|
Number of misses on cached file information.
|
|
countcontenthits
|
Count Statistic
|
Number of hits on cached file content.
|
|
countcontentmisses
|
Count Statistic
|
Number of times a file information lookup failed.
|
This section provides information about the server's HTTP-level keep-alive system. The statistics available for PWC Keep Alive are listed in Table 16-28.
Table 16-28 PWC Keep Alive Statistics (EE only)
|
Attribute Name
|
Datatype
|
Description
|
|
countconnections
|
Count Statistic
|
Number of connections in keep-alive mode.
|
|
maxconnections
|
Count Statistic
|
Maximum number of connections simultaneously allowed in keep-alive mode.
|
|
counthits
|
Count Statistic
|
The total number of times connections in keep-alive mode have subsequently made a valid request.
|
|
countflushes
|
Count Statistic
|
The number of times keep-alive connections have been closed by the server.
|
|
countrefusals
|
Count Statistic
|
The number of times the server could not hand off the connection to a keep-alive thread, possibly due to too many persistent connections.
|
|
counttimeouts
|
Count Statistic
|
The number of times the server terminated keep-alive connections as the client connections timed out without any activity.
|
|
secondstimeout
|
Count Statistic
|
The time (in seconds) before idle keep-alive connections are closed.
|
The DNS Cache caches IP addresses and DNS names. The server’s DNS cache is disabled by default. A single cache entry represents a singular IP address or DNS name lookup. The statistics available for PWC DNS are listed in Table 16-29.
Table 16-29 PWC DNS Statistics (EE only)
|
Attribute Name
|
Datatype
|
Description
|
|
flagcacheenabled
|
Count Statistic
|
Indicates whether the DNS cache is enabled (on). Either 0 for off or 1 for on.
|
|
countcacheentries
|
Count Statistic
|
Number of DNS entries presently in the cache.
|
|
maxcacheentries
|
Count Statistic
|
Maximum number of DNS entries that can be accommodated by the cache.
|
|
countcachehits
|
Count Statistic
|
Number of times a DNS cache lookup has succeeded.
|
|
countcachemisses
|
Count Statistic
|
Number of times a DNS cache lookup has failed.
|
|
flagasyncenabled
|
Count Statistic
|
Indicates whether asynchronous DNS lookups are enabled (on). Either 0 for off or 1 for on.
|
|
countasyncnamelookups
|
Count Statistic
|
Total number of asynchronous DNS name lookups.
|
|
countasyncaddrlookups
|
Count Statistic
|
Total number of asynchronous DNS address lookups.
|
|
countasynclookupsinprogress
|
Count Statistic
|
Number of asynchronous lookups in progress.
|
Statistics for PWC thread pools are listed in Table 16-30.
Table 16-30 PWC Thread Pool Statistics (EE only)
|
Attribute Name
|
Data Type
|
Description
|
|
id
|
String Statistic
|
ID of the thread pool.
|
|
countthreadsidle
|
Count Statistic
|
Number of request-processing threads currently idle.
|
|
countthreads
|
Count Statistic
|
Current number of request-processing threads.
|
|
maxthreads
|
Count Statistic
|
Maximum number of request processing threads that can exist concurrently.
|
|
countqueued
|
Count Statistic
|
Number of requests queued for processing by this thread pool.
|
|
peakqueued
|
Count Statistic
|
The largest number of requests in the queue simultaneously.
|
|
maxqueued
|
Count Statistic
|
Maximum number of requests that can be in the queue at one time.
|
The Connection Queue is the queue in which requests are held prior to being serviced. Statistics for the connection queue show the number of sessions in the queue and the average delay before the connection is accepted. Statistics for PWC connection queues are listed in Table 16-31.
Table 16-31 PWC Connection Queue Statistics (EE only)
|
Attribute Name
|
Data Type
|
Description
|
|
id
|
String Statistic
|
ID of the connection queue.
|
|
counttotalconnections
|
Count Statistic
|
Total number of connections that have been accepted.
|
|
countqueued
|
Count Statistic
|
Number of connections currently in the queue.
|
|
peakqueued
|
Count Statistic
|
Largest number of connections that were in the queue simultaneously.
|
|
maxqueued
|
Count Statistic
|
Maximum size of the connection queue.
|
|
countoverflows
|
Count Statistic
|
The number of times the queue has been too full to accommodate a connection.
|
|
counttotalqueued
|
Count Statistic
|
The total number of connections that have been queued. A given connection may be queued multiple times, so counttotalqueued may be greater than or equal to counttotalconnections.
|
|
tickstotalqueued
|
Count Statistic
|
The total number of ticks that connections have spent in the queue. A tick is a system-dependent unit of time.
|
|
countqueued1minuteaverage
|
Count Statistic
|
Average number of connections queued in the last 1 minute.
|
|
countqueued5minuteaverage
|
Count Statistic
|
Average number of connections queued in the last 5 minutes.
|
|
countqueued15minuteaverage
|
Count Statistic
|
Average number of connections queued in the last 15 minutes.
|
Statistics for PWC HTTP service are listed in Table 16-32.
Table 16-32 PWC HTTP Service Statistics (EE only)
|
Attribute Name
|
Data Type
|
Description
|
|
id
|
String Statistic
|
Instance name of the HTTP service.
|
|
versionserver
|
String Statistic
|
Version number of the HTTP service.
|
|
timestarted
|
String Statistic
|
Time the HTTP service was started (GMT).
|
|
secondsrunning
|
Count Statistic
|
Time (in seconds) since the HTTP service started.
|
|
maxthreads
|
Count Statistic
|
Maximum number of worker threads in each instance.
|
|
maxvirtualservers
|
Count Statistic
|
Maximum number of virtual servers that can be configured in each instance.
|
|
flagprofilingenabled
|
Count Statistic
|
Whether or not HTTP service performance profiling is enabled. Valid values are 0 or 1.
|
|
flagvirtualserveroverflow
|
Count Statistic
|
Indicates whether more than maxvirtualservers are configured. If this is set to 1, statistics are not being tracked for all virtual servers.
|
|
load1minuteaverage
|
Count Statistic
|
Average load for requests in the last 1 minute.
|
|
load5minuteaverage
|
Count Statistic
|
Average load for requests in the last 5 minutes.
|
|
load15minuteaverage
|
Count Statistic
|
Average load for requests in the last 15 minutes.
|
|
ratebytestransmitted
|
Count Statistic
|
The rate at which data is transmitted over some server-defined interval. The result is 0 when this information is not available.
|
|
ratebytesreceived
|
Count Statistic
|
The rate at which data is received over some server-defined interval. The result is 0 when this information is not available.
|
Admin Console Tasks for Enabling and Disabling Monitoring
Configuring Monitoring Levels Using the Admin Console
- Access the Monitoring Service page. To do this,
- In the tree component, select the Application Server node.
- Select the Monitor page.
- Select the Setup tab.
- On the Monitoring Service page, choose the appropriate value from the combo box opposite the component(s) or service(s) whose monitoring level is changing.
By default, monitoring is turned off for all components and services except for the Java Virtual Machine (JVM), which is always monitorable. To turn monitoring on, select LOW or HIGH from the combo box. To turn monitoring off, select OFF from the combo box. It is possible to turn monitoring on or off for the following components and services:
- JVM - Set the monitoring level to LOW for this option to monitor the Java Virtual Machine.
- HTTP Service - Set the monitoring level to LOW for this option to monitor all HTTP listeners and virtual servers.
- Transaction Service - Set the monitoring level to LOW for this option to monitor any transaction subsystem.
- JMS/Connector Service - Set the monitoring level to LOW for this option to monitor any Java Message Service (JMS).
- ORB - Set the monitoring level to LOW for this option to monitor the system ORB used by the Application Server core and its connection managers.
- Web Container - Set the monitoring level to LOW for this option to monitor all deployed servlets.
- EJB Container - Set the monitoring level to LOW for this option to monitor all deployed EJBs, EJB pools, and EJB caches. Set this method to HIGH to also monitor EJB business methods.
- JDBC Connection Pool - Set the monitoring level to LOW for this option to monitor all JDBC connection pools.
- Thread Pool - Set the monitoring level to LOW for this option to monitor all thread pools.
- Click Save.
There are no Additional Monitoring Service Properties in this release, therefore ignore the Additional Properties table.
Equivalent asadmin command: set, for example, to turn on monitoring for the HTTP Service, use the following asadmin command:
asadmin> set --user admin_user
server.monitoring-service.module-monitoring-levels.http-service=LOW
Configuring Monitoring Using the asadmin Tool
To turn monitoring off, or to set a level for monitoring a component or service, you can use the Admin Console as described in "Configuring Monitoring Levels Using the Admin Console", or use the asadmin tool as described in this section.
- Use the
get command to find out what services and components currently have monitoring enabled:
asadmin> get --user admin_user
server.monitoring-service.module-monitoring-levels.*
Returns:
server.monitoring-service.module-monitoring-levels.
connector-connection-pool = OFF
server.monitoring-service.module-monitoring-levels.
connector-service = OFF
server.monitoring-service.module-monitoring-levels.ejb-container = OFF
server.monitoring-service.module-monitoring-levels.http-service = OFF
server.monitoring-service.module-monitoring-levels.jdbc-connection-pool
= OFF
server.monitoring-service.module-monitoring-levels.jms-service = OFF
server.monitoring-service.module-monitoring-levels.jvm = OFF
server.monitoring-service.module-monitoring-levels.orb = OFF
server.monitoring-service.module-monitoring-levels.thread-pool = OFF
server.monitoring-service.module-monitoring-levels.transaction-service
= OFF
server.monitoring-service.module-monitoring-levels.web-container = OFF
- Use the
set command to enable monitoring.
For example, to enable monitoring for the HTTP service:
asadmin> set --user admin_user
server.monitoring-service.module-monitoring-levels.http-service=LOW
To disable monitoring, use the set command and specify OFF for the monitoring level.
Admin Console Tasks for Viewing Monitoring Data
Viewing Monitoring Data in the Admin Console
To view monitoring data for a component or service deployed in a server instance using the Application Server Admin Console, follow these steps. For more description on the attributes for each component or service, refer to "About Statistics for Monitored Components and Services".
- Access the Monitoring page. To do this:
- In the tree component, select the Application Server node.
- Select the Monitor page.
- Select the Monitor Values tab.
- From the View list, select a component or service that has been deployed onto the server instance and for which monitoring is enabled.
Monitoring data for the selected component or service displays below the View field. For a description of the monitorable properties, refer to "About Statistics for Monitored Components and Services".
On this page, it is possible to view monitoring data for JVM, Server, Thread Pools, HTTP Service, and Transaction Service if monitoring is enabled for these components and services. A diagram showing how these components and services are organized is shown in "About the Tree Structure of Monitorable Objects".
- If you do not see the component or service you wish to monitor in this list, the Setup tab to enable and disable monitoring for selected components and services. Select OFF to disable monitoring for a component or service. Select LOW or HIGH to enable monitoring for a component or service.
For more information on enabling and disabling monitoring, refer to "Configuring Monitoring Levels Using the Admin Console" or "Configuring Monitoring Using the asadmin Tool".
- Select the Applications page to view monitoring data for application components that are deployed onto the server instance and for which monitoring is enabled. Select the application from the Application list. Select the specific component from the Component list.
If no monitoring data appears for the application or component, select the Setup tab to enable or disable monitoring for a component or service. To monitor applications, turn on the container in which they execute: for example, select Low or High for the Web Container for web applications and/or the EJB Container for EJB applications.
If no monitoring data is displayed for applications, it is most likely that the application does not exist or is not exercised. Applications monitoring data is available only when the application exists, monitoring is enabled for the application, and the application is being exercised. Once the application is executed, it is registered in the monitoring registry and the monitoring data displays.
Monitoring data for the selected component displays below the selected component. For a description of the monitorable properties, refer to "About Statistics for Monitored Components and Services". A diagram showing how these components and services are organized for applications can be viewed in "About the Tree Structure of Monitorable Objects".
- Select the Resources page to view monitoring data for resources that are deployed onto the server instance and for which monitoring has been enabled. Select the resource from the View list. If the resource for which you wish to view monitoring data does not appear, select the Setup tab to enable or disable monitoring for a resource.
If no monitoring data is displayed for resources, it is most likely that the resource does not exist or is not exercised. Resources monitoring data is available only when the resources exist, monitoring is enabled for the resource at a level of HIGH, and the resource is being exercised. For example, if you have created a JDBC connector service, but applications that use that connector service have not yet requested a connector from the service, that service has not yet been created, therefore, no service exists and no monitoring data is available. Once the JDBC application is executed and requests a connector from a service, the service is registered in the monitoring registry and monitoring data appears.
Monitoring data for the selected component or service displays below the View field. For a description of the monitorable properties, refer to "About Statistics for Monitored Components and Services". A diagram showing how these components and services are organized for resources can be viewed in "About the Tree Structure of Monitorable Objects".
- Select the Transactions page to freeze the transaction subsystem in order to roll back transactions and determine the transactions that are in process at the time of the freeze. To enable monitoring for the Transaction Service, select the Setup tab and make sure that Transaction Service is set to LOW. To freeze the Transaction Service in order to roll back transactions, select Freeze. To rollback a transaction, select the checkbox beside the transaction and click Rollback.
Equivalent asadmin command: get --monitor, for example, to view monitoring data for the JVM, use the following asadmin command:
asadmin> get --monitor server.jvm.*
Viewing Monitoring Data With the asadmin Tool
Using the asadmin Tool to View Monitoring Data
To view monitoring data using the asadmin tool, use the asadmin list and asadmin get commands followed by the dotted name of a monitorable object. As a general approach to using the asadmin tool to view monitoring data, follow these steps:
- To view the names of the objects that can be monitored, use the
asadmin list command. For example, to view a list of application components and subsystems that have monitoring enable for the server instance, type the following command in a terminal window:
asadmin> list --monitor server
The preceding command returns a list of application components and subsystems that have monitoring enabled, for example:
server.resources
server.connector-service
server.orb
server.jms-service
server.jvm
server.applications
server.http-service
server.thread-pools
Sun Java System Application Server Platform Edition 8.1 2005Q1For further examples using the list command, refer to "Examples of the list and get Commands". For further information on the dotted names you can use with the list command, refer to "Understanding and Specifying Dotted Names".
- To display monitoring statistics for an application component or subsystem for which monitoring has been enabled, use the
asadmin get command. To get the statistics, type the asadmin get command in a terminal window, specifying a name displayed by the list command in the preceding step. The following example attempts to get all attributes from a subsystem for a specific object:
asadmin> get --monitor server.jvm.*
The command returns the following attributes and data:
server.jvm.dotted-name = server.jvm
server.jvm.heapsize-current = 21241856
server.jvm.heapsize-description = Provides statistical information
about the JVM's memory heap size.
server.jvm.heapsize-highwatermark = 21241856
server.jvm.heapsize-lastsampletime = 1080232913938
server.jvm.heapsize-lowerbound = 0
server.jvm.heapsize-lowwatermark = 0
server.jvm.heapsize-name = JvmHeapSize
server.jvm.heapsize-starttime = 1080234457308
server.jvm.heapsize-unit = bytes
server.jvm.heapsize-upperbound = 518979584
server.jvm.uptime-count = 1080234457308
server.jvm.uptime-description = Provides the amount of time the JVM has
been running.
server.jvm.uptime-lastsampletime = 1080234457308
server.jvm.uptime-name = JvmUpTime
server.jvm.uptime-starttime = 1080232913928
server.jvm.uptime-unit = milliseconds
Sun Java System Application Server Platform Edition 8.1 2005Q1For further examples using the get command, refer to "Examples of the list and get Commands". For further information on the dotted names you can use with the get command, refer to "Understanding and Specifying Dotted Names".
Understanding and Specifying Dotted Names
In the asadmin list and get commands, specify the dotted name of monitorable objects. All child objects are addressed using the dot (.) character as separator, thus these are referred to as dotted names. If a child node is of singleton type, then only the monitoring object type is needed to address the object, otherwise a name of the form type.name is needed to address the object.
For example, http-service is one of the valid monitorable object types and is a singleton. To address a singleton child node representing the http-service of instance server, the dotted name is:
server.http-service
Another example, application, is a valid monitorable object type and is not a singleton. To address a non-singleton child node representing, for example, the application PetStore, the dotted name is:
server.applications.petstore
The dotted names can also address specific attributes in monitorable objects. For example, http-service has a monitorable attribute called bytesreceived-lastsampletime. The following name addresses the bytesreceived attribute:
server.http-service.server.http-listener-1.
bytesreceived-lastsampletime
The administrator is not expected to know the valid dotted names for asadmin list and get commands. The list command displays available monitorable objects, while the get command used with a wildcard parameter allows the inspection of all available attributes on any monitorable object.
The underlying assumptions for using the list and get commands with dotted names are:
- Any
list command that has a dotted name that is not followed by a wildcard (*) gets as its result the current node’s immediate children. For example, list --monitor server lists all immediate children belonging to the server node.
- Any
list command that has a dotted name followed by a wildcard of the form .* gets as its result a hierarchical tree of children nodes from the current node. For example, list --monitor server.applications.* lists all children of applications and their subsequent child nodes and so on.
- Any
list command that has a dotted name preceded or followed by a wildcard of the form *dottedname or dotted * name or dotted name * gets as its result all nodes and their children matching the regular expression created by the provided matching pattern.
- A
get command followed by a .* or a * gets as its result the set of attributes and their values belonging to the current node to be matched.
For more information, read "Expected Output for list and get Commands at All Levels".
Examples of the list and get Commands
This section contains the following topics:
- Examples for the list --monitor Command
- Examples for the get --monitor Command
- Petstore Example
Examples for the list --monitor Command
The list command provides information about the application components and subsystems currently being monitored for the specified server instance name. Using this command, you can see the monitorable components and sub-components for a server instance. For a more complete listing of list examples, see "Expected Output for list and get Commands at All Levels".
Example 1
asadmin> list --monitor server
The preceding command returns a list of application components and subsystems that have monitoring enabled, for example:
server.resources
server.orb
server.jvm
server.jms-service
server.connector-service
server.applications
server.http-service
server.thread-pools
It is also possible to list applications that are currently monitored in the specified server instance. This is useful when particular monitoring statistics are sought from an application using the get command.
Example 2
asadmin> list --monitor server.applications
Returns:
server.applications.adminapp
server.applications.admingui
server.applications.myApp
For a more comprehensive example, see "Petstore Example".
Examples for the get --monitor Command
This command retrieves the following monitored information:
- All attribute(s) monitored within a component or subsystem
- Specific attribute monitored within a component or subsystem
When an attribute is requested that does not exist for a particular component or subsystem, an error is returned. Similarly, when a specific attribute is requested that is not active for a component or subsystem, an error is returned.
Refer to "Expected Output for list and get Commands at All Levels" for more information on the use of the get command.
Example 1
Attempt to get all attributes from a subsystem for a specific object:
asadmin> get --monitor server.jvm.*
Returns:
server.jvm.dotted-name= server.jvm
server.jvm.heapsize-current = 21241856
server.jvm.heapsize-description = Provides statistical information
about the JVM's memory heap size.
server.jvm.heapsize-highwatermark = 21241856
server.jvm.heapsize-lastsampletime = 1080232913938
server.jvm.heapsize-lowerbound = 0
server.jvm.heapsize-lowwatermark = 0
server.jvm.heapsize-name = JvmHeapSize
server.jvm.heapsize-starttime = 1080234457308
server.jvm.heapsize-unit = bytes
server.jvm.heapsize-upperbound = 518979584
server.jvm.uptime-count = 1080234457308
server.jvm.uptime-description = Provides the amount of time the JVM has
been running.
server.jvm.uptime-lastsampletime = 1080234457308
server.jvm.uptime-name = JvmUpTime
server.jvm.uptime-starttime = 1080232913928
server.jvm.uptime-unit = milliseconds
Example 2
Attempt to get all attributes from a J2EE application:
asadmin> get --monitor server.applications.myJ2eeApp.*
Returns:
No matches resulted from the wildcard expression.
CLI137 Command get failed.
There are no monitorable attributes exposed at the J2EE-application level, therefore this reply displays.
Example 3
Attempt to get a specific attribute from a subsystem:
asadmin> get --monitor server.jvm.uptime-lastsampletime
Returns:
server.jvm.uptime-lastsampletime = 1093215374813
Example 4
Attempt to get an unknown attribute from within a subsystem attribute:
asadmin> get --monitor server.jvm.badname
Returns:
No such attribute found from reflecting the corresponding Stats
interface: [badname]
CLI137 Command get failed.
Petstore Example
The following example illustrates how the asadmin tool might be used for monitoring purposes.
A user wants to inspect the number of calls made to a method in the sample Petstore application after it has been deployed onto the Application Server. The instance onto which it has been deployed is named server. A combination of the list and get commands are used to access desired statistics on a method.
- Start the Application Server and the
asadmin tool.
- Set some useful environment variables to avoid entering them for every command:
asadmin>export AS_ADMIN_USER=admin AS_ADMIN_PASSWORD=admin123
asadmin>export AS_ADMIN_HOST=localhost AS_ADMIN_PORT=4848
- List monitorable components for instance
server:
asadmin>list --monitor server*
Returns (output will be similar to:
server
server.applications
server.applications.CometEJB
server.applications.ConverterApp
server.applications.petstore
server.http-service
server.resources
server.thread-pools
The list of monitorable components includes thread-pools, http-service, resources, and all deployed (and enabled) applications.
- List the monitorable subcomponents in the Petstore application (
-m can be used instead of --monitor):
asadmin>list -m server.applications.petstore
Returns:
server.applications.petstore.signon-ejb_jar
server.applications.petstore.catalog-ejb_jar
server.applications.petstore.uidgen-ejb_jar
server.applications.petstore.customer-ejb_jar
server.applications.petstore.petstore-ejb_jar
server.applications.petstore.petstore\.war
server.applications.petstore.AsyncSenderJAR_jar
server.applications.petstore.cart-ejb_jar
- List the monitorable subcomponents in the EJB module
signon-ejb_jar of the Petstore application:
asadmin>list -m server.applications.petstore.signon-ejb_jar
Returns:
server.applications.petstore.signon-ejb_jar.SignOnEJB
server.applications.petstore.signon-ejb_jar.UserEJB
- List the monitorable subcomponents in the entity bean
UserEJB for the EJB module signon-ejb_jar of the Petstore application:
asadmin>list -m server.applications.petstore.signon-ejb_jar.UserEJB
Returns (with dotted name removed for space considerations):
server.applications.petstore.signon-ejb_jar.UserEJB.bean-cache
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods
server.applications.petstore.signon-ejb_jar.UserEJB.bean-pool
- List the monitorable subcomponents in the method
getUserName for the entity bean UserEJB in the EJB module signon-ejb_jar of the Petstore application:
asadmin>list -m server.applications.petstore.signon-ejb_jar.
UserEJB.bean-methods.getUserName
Returns:
Nothing to list at server.applications.petstore.signon-ejb_jar.
UserEJB.bean-methods.getUserName. To get the valid names beginning with
a string, use the wildcard “*” character. For example, to list all names
that begin with “server”, use “list server*”.
- There are no monitorable subcomponents for methods. Get all monitorable statistics for the method
getUserName.
asadmin>get -m server.applications.petstore.signon-ejb_jar.
UserEJB.bean-methods.getUserName.*
Returns:
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.executiontime-count = 0
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.executiontime-description = Provides the time in
milliseconds spent during the last successful/unsuccessful attempt
to execute the operation.
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.executiontime-lastsampletime = 1079981809259
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.executiontime-name = ExecutionTime
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.executiontime-starttime = 1079980593137
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.executiontime-unit = count
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.methodstatistic-count = 0
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.methodstatistic-description = Provides the number of times
an operation was called, the total time that was spent during the
invocation and so on.
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.methodstatistic-lastsampletime = 1079980593137
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.methodstatistic-maxtime = 0
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.methodstatistic-mintime = 0
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.methodstatistic-name = ExecutionTime
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.methodstatistic-starttime = 1079980593137
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.methodstatistic-totaltime = 0
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.methodstatistic-unit =
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.totalnumerrors-count = 0
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.totalnumerrors-description = Provides the total number of
errors that occured during invocation or execution of an operation.
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.totalnumerrors-lastsampletime = 1079981809273
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.totalnumerrors-name = TotalNumErrors
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.totalnumerrors-starttime = 1079980593137
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.totalnumerrors-unit = count
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.totalnumsuccess-count = 0
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.totalnumsuccess-description = Provides the total number of
successful invocations of the method.
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.totalnumsuccess-lastsampletime = 1079981809255
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.totalnumsuccess-name = TotalNumSuccess
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.totalnumsuccess-starttime = 1079980593137
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.totalnumsuccess-unit = count
- To also get a specific statistic, such as execution time, use a command such as the following:
asadmin>get -m server.applications.petstore.signon-ejb_jar.
UserEJB.bean-methods.getUserName.executiontime-count
Returns:
server.applications.petstore.signon-ejb_jar.UserEJB.bean-methods.
getUserName.executiontime-count = 1
Expected Output for list and get Commands at All Levels
The following tables show the command, dotted name, and corresponding output at each level of the tree.
Table 16-33 Top Level
|
Command
|
Dotted Name
|
Output
|
|
list -m
|
server
|
server.applications server.thread-pools server.resources server.http-service server.transaction-service server.orb.connection-managers server.orb.connection-managers.orb\.Connections\.Inbound\. AcceptedConnections server.jvm
|
|
list -m
|
server.*
|
Hierarchy of child nodes below this node.
|
|
get -m
|
server.*
|
No output except a message saying there are no attributes at this node.
|
Table 16-34 shows the command, dotted name, and corresponding output for the applications level.
Table 16-34 Applications Level
|
Command
|
Dotted Name
|
Output
|
|
list -m
|
server.applications
or
*applications
|
appl1 app2 web-module1_war ejb-module2_jar ...
|
|
list -m
|
server.applications.*
or
*applications.*
|
Hierarchy of child nodes below this node.
|
|
get -m
|
server.applications.*
or
*applications.*
|
No output except message saying there are no attributes at this node.
|
Table 16-35 shows the command, dotted name, and corresponding output for stand-alone modules and enterprise applications at the applications level.
Table 16-35 Applications - Enterprise Applications and Standalone Modules
|
Command
|
Dotted Name
|
Output
|
|
list -m
|
server.applications.app1
or
*app1
Note: this level is only applicable if an enterprise application has been deployed. It is not applicable if a standalone module is deployed.
|
ejb-module1_jar web-module2_war ejb-module3_jar web-module3_war ...
|
|
list -m
|
server.applications.app1.*
or
*app1.*
|
Hierarchy of child nodes below this node.
|
|
get -m
|
server.applications.app1.*
or
*app1.*
|
No output except message saying there are no attributes at this node.
|
|
list -m
|
server.applications.app1.ejb-module1_jar
or
*ejb-module1_jar
or
server.applications.ejb-module1_jar
|
bean1 bean2 bean3 ...
|
|
list -m
|
server.applications.app1.ejb-module1_jar
or
*ejb-module1_jar
or
server.applications.ejb-module1_jar
|
Hierarchy of child nodes below this node.
|
|
get -m
|
server.applications.app1.ejb-module1_jar.*
or
*ejb-module1_jar.*
or
server.applications.ejb-module1_jar.*
|
No output except message saying there are no attributes at this node.
|
|
list -m
|
server.applications.app1.ejb-module1_jar.bean1
Note: In standalone modules, the node containing the application name (app1 in this example) will not appear.
|
List of child nodes:
bean-pool bean-cache bean-method
|
|
list -m
|
server.applications.app1.ejb-module1_jar.bean1
Note: In standalone modules, the node containing the application name (app1 in this example) will not appear.
|
Hierarchy of child nodes and a list of all attributes for this node and for any subsequent child nodes.
|
|
get -m
|
server.applications.app1.ejb-module1_jar.bean1.*
Note: In standalone modules, the node containing the application name (app1 in this example) does not appear.
|
The following attributes and their associated values:
CreateCount_Count CreateCount_Description CreateCount_LastSampleTime CreateCount_Name CreateCount_StartTime CreateCount_Unit MethodReadyCount_Current MethodReadyCount_Description MethodReadyCount_HighWaterMark MethodReadyCount_LastSampleTime MethodReadyCount_LowWaterMark MethodReadyCount_Name MethodReadyCount_StartTime MethodReadyCount_Unit RemoveCount_Count RemoveCount_Description RemoveCount_LastSampleTime RemoveCount_Name RemoveCount_StartTime Attribute RemoveCount_Unit
|
|
list -m
|
server.applications.app1.ejb-module1_jar.bean1.bean-pool
Note: In standalone modules, the node containing the application name (app1 in this example) will not appear.
|
No attributes, but a message saying “Use get command with the --monitor option to view this node’s attributes and values.”
|
|
get -m
|
server.applications.app1.ejb-module1_jar.bean1.bean-pool.*
Note: In standalone modules, the node containing the application name (app1 in this example) will not appear.
|
List of attributes and values corresponding to EJB Pool attributes as described in Table 1-4.
|
|
list -m
|
server.applications.app1.ejb-module1_jar.bean1.bean-cache
Note: In standalone modules, the node containing the application name (app1 in this example) will not appear.
|
No attributes, but a message saying “Use get command with the --monitor option to view this node’s attributes and values.”
|
|
get -m
|
server.applications.app1.ejb-module1_jar.bean1.bean-cache.*
Note: In standalone modules, the node containing the application name (app1 in this example) does not appear.
|
List of attributes and values corresponding to EJB Cache attributes as described in Table 1-5.
|
|
list -m
|
server.applications.app1.ejb-module1_jar.bean1.bean-method.method1
Note: In standalone modules, the node containing the application name (app1 in this example) will not appear.
|
No attributes, but a message saying “Use get command with the --monitor option to view this node’s attributes and values.”
|
|
get -m
|
server.applications.app1.ejb-module1_jar.bean1.bean-method.method1.*
Note: In standalone modules, the node containing the application name (app1 in this example) will not appear.
|
List of attributes and values corresponding to EJB Methods attributes as described in Table 1-2.
|
|
list -m
|
server.applications.app1.web-module1_war
|
Displays the virtual server(s) assigned to the module.
|
|
get -m
|
server.applications.app1.web-module1_war.*
|
No output except a message saying there are no attributes at this node.
|
|
list -m
|
server.applications.app1.web-module1_war. virtual_server
|
Displays list of servlets registered.
|
|
get -m
|
server.applications.app1.web-module1_war. virtual_server.*
|
No output except a message saying there are no attributes at this node.
|
|
list -m
|
server.applications.app1.web-module1_war. virtual_server.servlet1
|
No attributes, but a message saying “Use get command with the --monitor option to view this node’s attributes and values.”
|
|
get -m
|
server.applications.app1.web-module1_war. virtual_server.servlet1.*
|
List of attributes and values corresponding to web container (Servlet) attributes as described in Table 1-7.
|
Table 16-36 shows the command, dotted name, and corresponding output for the HTTP Service level.
Table 16-36 HTTP-Service Level
|
Command
|
Dotted Name
|
Output
|
|
list -m
|
server.http-service
|
List of virtual servers.
|
|
get -m
|
server.http-service.*
|
No output except message saying there are no attributes at this node.
|
|
list -m
|
server.http-service.server
|
List of HTTP Listeners.
|
|
get -m
|
server.http-service.server.*
|
No output except message saying there are no attributes at this node.
|
|
list -m
|
server.http-service.server. http-listener1
|
No attributes, but a message saying “Use get command with the --monitor option to view this node’s attributes and values.”
|
|
get -m
|
server.http-service.server.*
|
List of attributes and values corresponding to HTTP Service attributes as described in Table 1-9.
|
Table 16-37 shows the command, dotted name, and corresponding output for the thread pools level.
Table 16-37 Thread-Pools Level
|
Command
|
Dotted Name
|
Output
|
|
list -m
|
server.thread-pools
|
List of thread-pool names.
|
|
get -m
|
server.thread-pools.*
|
No output except message saying there are no attributes at this node.
|
|
list -m
|
server.thread-pools.orb\.threadpool\ .thread-pool-1
|
No attributes, but a message saying “Use get command with the --monitor option to view this node’s attributes and values.”
|
|
get -m
|
server.thread-pools..orb\.threadpool\ .thread-pool-1.*
|
List of attributes and values corresponding to Thread Pool attributes as described in Table 1-14.
|
Table 16-38 shows the command, dotted name, and corresponding output for the resources level.
Table 16-38 Resources Level
|
Command
|
Dotted Name
|
Output
|
|
list -m
|
server.resources
|
List of pool names.
|
|
get -m
|
server.resources.*
|
No output except message saying there are no attributes at this node.
|
|
list -m
|
server.resources.jdbc-connection-pool-pool.connection-pool1
|
No attributes, but a message saying “Use get command with the --monitor option to view this node’s attributes and values.”
|
|
get -m
|
server.resources.jdbc-connection-pool-pool.connection-pool1.*
|
List of attributes and values corresponding to Connection Pool attributes as described in Table 1-10.
|
Table 16-39 shows the command, dotted name, and corresponding output for the transaction service level.
Table 16-39 Transaction-Service Level
|
Command
|
Dotted Name
|
Output
|
|
list -m
|
server.transaction-service
|
No attributes, but a message saying “Use get command with the --monitor option to view this node’s attributes and values.”
|
|
get -m
|
server.transaction-service.*
|
List of attributes and values corresponding to Transaction Service attributes as described in Table 1-15.
|
Table 16-40 shows the command, dotted name, and corresponding output for the ORB level.
Table 16-40 ORB Level
|
Command
|
Dotted Name
|
Output
|
|
list -m
|
server.orb
|
server-orb.connection-managers
|
|
get -m
|
server.orb.*
|
No output except message saying there are no attributes at this node.
|
|
list -m
|
server.orb.connection-managers
|
Name(s) of ORB connection managers.
|
|
get -m
|
server.orb.connection-managers.*
|
No output except message saying there are no attributes at this node.
|
|
list -m
|
server.orb.connection-managers. orb\.Connections\.Inbound\ .AcceptedConnections
|
No attributes, but a message saying “Use get command with the --monitor option to view this node’s attributes and values.”
|
|
get -m
|
server.orb.connection-managers. orb\.Connections\.Inbound\ .AcceptedConnections.*
|
List of attributes and values corresponding to ORB Connection Manager attributes as described in Table 1-13.
|
Table 16-34 shows the command, dotted name, and corresponding output for the JVM level.
Table 16-41 JVM Level
|
Command
|
Dotted Name
|
Output
|
|
list -m
|
server.jvm
|
No attributes, but a message saying “Use get command with the --monitor option to view this node’s attributes and values.”
|
|
get -m
|
server.jvm.*
|
List of attributes and values corresponding to JVM attributes as described in Table 1-16.
|
Using JConsole
For JConsole to work with the Application Server, security has to be disabled for the JMX connector. The current version of the Application Server (SE/EE edition) has security enabled by default.
To disable security for the JMX Connector, use one of these techniques:
- Use the Admin Console to disable security for the JMX Connector. To do this from the Admin Console,
- Expand the Configurations node.
- Expand the Admin Service node.
- Select the
system node.
- In the SSL section, unselect SSL3 and TLS.
- Select Save.
- Use
asadmin to disable security for the JMX Connector. To do this from a terminal window or command prompt,
- Enter this command:
asadmin set
server.admin-service.jmx-connector.system.security-enabled=false
- Restart the domain application server (DAS).
For the PE version, the JMX Connector is disabled by default, therefore there is no need to change any configuration for PE.
- Start JConsole and enter the JMX URL, user name, and password on the Advanced tab for logging in. The JMX URL is of the form:
service:jmx:rmi:///jndi/rmi://<your machine name>:<port>/management/rmi-jmx-connector
NOTE: You can get the exact JMX URL from the admin server.log file if you search for message ADM1501.