MBeans in Payara Server
Below is a non-exhaustive list of MBeans which are useful to monitor in Payara Server. Other MBeans not listed show static information or are JDK-specific.
JVM MBeans
Class Loading
In JMX Monitoring logging set the value to java.lang:type=ClassLoading
to monitor this MBean
Attribute | Description | Comment |
---|---|---|
|
Number of classes currently loaded in the Java virtual machine |
|
|
Total number of classes that have been loaded since the Java virtual machine has started execution |
|
|
Total number of classes unloaded since the Java virtual machine has started execution |
Classes are only unloaded from Payara when the application they are in is undeployed. |
Garbage Collectors
In JMX Monitoring logging set the value to java.lang:type=GarbageCollector,name=collectors-name
to monitor this MBean The garbage collector’s name will be one of the following depending on your JDK configuration options:
-
Copy
-
G1 Young Generation
-
G1 Mixed Generation
-
MarkSweepCompact
-
ParNew
-
PS MarkSweep
-
PS Scavenge
Attribute | Description | Comment |
---|---|---|
|
Total number of collections that have occurred |
The number of times this garbage collector has been called since Payara Server was started |
|
Approximate accumulated collection elapsed time in milliseconds |
How much time has been spent on garbage collection since Payara Server was started |
Memory
In JMX Monitoring logging set the value to java.lang:type=Memory
to monitor this MBean
Attribute | Description | Comment |
---|---|---|
|
Approximate number of objects for which finalization is pending |
|
|
Amount of used memory in bytes |
|
|
Amount of used memory in bytes |
Runtime
In JMX Monitoring logging set the value to java.lang:type=Runtime
to monitor this MBean.
Attribute | Description | Comment |
---|---|---|
|
Uptime of the Java virtual machine in milliseconds |
Thread System
In JMX Monitoring logging set the value to java.lang:type=Threading
to monitor this MBean.
Attribute | Description | Comment |
---|---|---|
|
Returns the total CPU time for the current thread in nanoseconds |
|
|
Returns the CPU time that the current thread has executed in user mode in nanoseconds |
|
|
Returns the current number of live daemon threads |
|
|
Finds cycles of threads that are in deadlock waiting to acquire object monitors |
Is either a list of deadlocked threads or the sentence "None of the threads are monitor deadlocked." |
|
Finds cycles of threads that are in deadlock waiting to acquire object monitors |
Is either a list of deadlocked threads or the sentence "None of the threads are monitor deadlocked." |
|
Returns the peak live thread count since the Java virtual machine started or peak was reset |
|
|
Returns the current number of live threads including both daemon and non-daemon threads |
|
|
Returns the total number of threads created and also started since the Java virtual machine started |
Payara MBeans
These MBeans are part of Payara and provide additional information about current usage. They are all in the form of amx:pp=amx:pp=/mon/server-mon[instance-name],type=type-of-mbean,name=MBeanName
where instance-name
is replaced by the name of the instance i.e. amx:pp=/mon/server-mon[server],type=web-request-mon,name=web/request
.
See Viewing JMX Monitoring Data for how to view all available MBeans.
Payara MBeans are only available when AMX is booted. This is done automatically once a JMX client connects. For all other cases, AMX must be either configured to boot at server startup (through domain config) or booted via a JMX operation bootAMX on the amx-support:type=boot-amx MBean using a non-JMX client (e.g. over a local socket). Programmatic activation during application deployment (by means of a Startup EJB singleton for example) will not work.
|
Connection Queue
Network Connection Queue Statistics
In JMX Logging set value to
amx:pp=/mon/server-mon[server],type=connection-queue-mon,name=network//connection-queue
to use this MBean. To monitor a specific network connection set the name value
to be network/name-of-listener/connection-queue
i.e. name=network/http-listener-1/connection-queue
.
Attribute | Description | Comment |
---|---|---|
|
Largest number of connections that were in the queue simultaneously |
|
|
Number of times the queue has been too full to accommodate a connection |
|
|
Total number of connections that have been accepted |
|
|
The number of open/active connections |
|
|
Number of connections currently in the queue |
|
|
Average number of connections queued in the last 1 minute |
|
|
Average number of connections queued in the last 5 minutes |
|
|
Average number of connections queued in the last 15 minutes |
|
|
Total number of connections that have been queued |
Connector Service
Connector Container Work Management Statistics
In JMX Logging set value to
amx:pp=/mon/server-mon[server],type=connector-service-mon,name=jms-service/work-management
to monitor this MBean.
Attribute | Description | Comment |
---|---|---|
|
Number of active work objects |
|
|
Wait time of a work object before it gets executed |
|
|
Number of work objects waiting in the queue for execution |
|
|
Number of work objects rejected by the application server |
|
|
Number of work objects submitted by a connector module for execution |
|
|
Number of work objects completed execution |
Deployment
Deployment Module Statistics
In JMX Logging set value to
amx:pp=/mon/server-mon[server],type=deployment-mon,name=deployment/lifecycle
to monitor this MBean.
Attribute | Description | Comment |
---|---|---|
|
Number of applications deployed |
|
|
Total number of applications ever deployed |
This does not persist across restarts |
Thread Pool Executor
ThreadPoolExecutor
Statistics
In JMX Logging set value to
amx:pp=/mon/server-mon[server],type=exec-pool-mon,name=ejb/default-exec-pool
to monitor this MBean.
Attribute | Description | Comment |
---|---|---|
|
Core number of threads in the associated pool |
|
|
Maximum number of threads in the associated pool |
|
|
Current number of threads in the associated pool |
|
|
Number of active threads in the associated pool |
|
|
Number of tasks created in the associated pool |
|
|
Keep-Alive time for threads in the associated pool |
|
|
Number of tasks completed in the associated pool |
|
|
Largest number of simultaneous threads in the associated pool |
JDBC Connection Pool
JDBC Connection Statistics
In JMX Logging set value to
amx:pp=/mon/server-mon[server],type=jdbc-connection-pool-mon,name=resources/NameOfPool
to monitor this MBean, replacing NameOfPool
to whatever the actual name of
the pool is i.e. DerbyPool.
Attribute | Description | Comment |
---|---|---|
|
The number of physical connections that were created since the last reset |
|
|
Number of physical connections that were destroyed since the last reset. |
|
|
The total number of free connections in the pool as of the last sampling |
|
|
Number of potential connection leaks |
|
|
The total number of connections in the connection pool that failed validation from the start time until the last sample time |
|
|
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. |
Unit is milliseconds |
|
Number of logical connections acquired from the pool |
|
|
Number of logical connections released to the pool |
|
|
Average wait-time-duration per successful connection request |
Unit is milliseconds |
|
Number of connections successfully matched |
|
|
Number of connections rejected during matching |
|
|
Number of connection requests in the queue waiting to be serviced |
|
|
The total number of connections in the pool that timed out between the start time and the last sample time |
Keep Alive
Keep-Alive Statistics
This MBean is for network connections in keep-alive mode. For more details on
keep-alive
see RFC 7230 6.3.
As of HTTP 1.1 all connections are keep-alive
unless declared otherwise.
In JMX Logging set value to
amx:pp=/mon/server-mon[server],type=keep-alive-mon,name=network//keep-alive
to use this MBean. To monitor a specific network connection set the name value
to be network/name-of-listener/keep-alive
i.e. name=network/http-listener-1/keep-alive
.
Attribute | Description | Comment |
---|---|---|
|
Number of keep-alive connections that timed out |
|
|
Number of requests received by connections in keep-alive mode |
|
|
Number of connections in keep-alive mode |
|
|
Number of keep-alive connections that were closed |
|
|
Number of keep-alive connections that were rejected |
Managed Executor Service
ManagedExecutorService
Statistics
In JMX Logging set value to
amx:pp=/mon/server-mon[server],type=managed-executor-service-mon,name=executorService/concurrent/NameOfManagedExecutorService
to use this MBean, replacing NameOfManagedExecutorService
to whatever the actual
name of the service is i.e. __defaultManagedExecutorService
.
Attribute | Description | Comment |
---|---|---|
|
The current number of threads in the pool |
|
|
The approximate number of active threads |
|
|
Number of tasks completed |
|
|
The largest number of threads that have ever simultaneously been in the pool |
|
|
The number of tasks executed by the executor service |
Message Driven Beans
In JMX Logging set value to
amx:pp=/mon/server-mon[server],type=message-driven-bean-mon,name=applicationName/ClassUsingBean
to use this MBean, replacing applicationName
with the name of your application
using JMS and ClassUsingBean
with the class that has the @MessageDriven
annotation on it.
Attribute | Description | Comment |
---|---|---|
|
Number of times EJB create method is called |
|
|
Number of times EJB remove method is called |
|
|
Number of messages received for the message-driven bean |
Request
Web Container HTTP Service Statistics
In JMX Logging set value to
amx:pp=/mon/server-mon[server],type=request-mon,name=http-service/VirtualServer/request
to use this MBean, replacing VirtualServer
name of the virtual server it is
running on. This MBean differs from Connection Queue statistics by being selected
by virtual server rather than by listener, as well as providing some additional
information about responses.
Attribute | Description | Comment |
---|---|---|
|
The method of the last request serviced |
This will be one of |
|
The number of open connections |
Unlike most other attributes with count in the name, this one is the current number rather than total over the server lifetime |
|
The number of requests received |
The number of requests received since the server was started |
|
The URI of the last request serviced |
|
|
Longest response time for a request; not a cumulative value, but the largest response time from among the response times |
|
|
Number of responses with a status code equal to 200 |
This is the total since the server started |
|
Number of responses with a status code in the 2xx range |
This is the total since the server started |
|
Number of responses with a status code equal to 302 |
This is the total since the server started |
|
Number of responses with a status code equal to 304 |
This is the total since the server started |
|
Number of responses with a status code in the 3xx range |
This is the total since the server started |
|
Number of responses with a status code equal to 400 |
This is the total since the server started |
|
Number of responses with a status code equal to 401 |
This is the total since the server started |
|
Number of responses with a status code equal to 403 |
This is the total since the server started |
|
Number of responses with a status code equal to 404 |
This is the total since the server started |
|
Number of responses with a status code in the 4xx range |
This is the total since the server started |
|
Number of responses with a status code in the 5xx range |
This is the total since the server started |
|
Number of responses with a status code outside the 2xx, 3xx, 4xx, and 5xx range |
This is the total since the server started |
|
The number of bytes transmitted |
|
|
The number of bytes received |
|
|
Cumulative value of the error count, with error count representing the number of cases where the response code was greater than or equal to 400 |
|
|
Average request processing time |
Unit is milliseconds |
Security Realm
In JMX Logging set value to
amx:pp=/mon/server-mon[server],type=security-realm-mon,name=security/realm
to use this MBean.
Attribute | Description | Comment |
---|---|---|
|
Security Realm Count |
Server
In JMX Logging set value to
amx:pp=/mon/server-mon[server],type=server-runtime-mon
to use this MBean.
Attribute | Description | Comment |
---|---|---|
|
state of the server such as Running, Stopped, Failed |
|
|
uptime of the Java virtual machine in milliseconds |
Servlet
Web Container Servlet Statistics
In JMX Logging set value to
amx:pp=/mon/server-mon[server],type=servlet-mon,name=ApplicationName/InstanceName/ServletName
to use this MBean, where ApplicationName
is the name of your application and
InstanceName
is the instance it is running. This MBean provides information on
all servlets within an application.
Attribute | Description | Comment |
---|---|---|
|
Total number of Servlets ever loaded |
|
|
Number of Servlets loaded |
|
|
Cumulative Servlet processing times |
Unit is milliseconds |
Web Container Servlet Instance Statistics
In JMX Logging set value to
amx:pp=/mon/server-mon[server],type=servlet-instance-mon,name=ApplicationName/VirtualServerName/ServletName
to use this MBean, where ApplicationName
is the name of your application,
VirtualServerName
is the virtual server it is running on and ServletName
is the name of the servlet to access. If the servlet is annotation with
@WebServlet(name = "ServletName")
then the servlet name will be the name in the
annotation, otherwise it is the fully qualified class name.
Attribute | Description | Comment |
---|---|---|
|
Number of error responses (that is, responses with a status code greater than or equal to 400) |
|
|
Number of requests processed |
|
|
Average response time |
Unit is milliseconds |
|
Maximum response time |
Unit is milliseconds |
|
Aggregate response time |
Singleton Bean
In JMX Logging set value to
amx:pp=/mon/server-mon[server],type=singleton-bean-mon,name=ApplicationsName/ClassName
where ApplicationName
is the name of your application and ClassName
of the
name of the Singleton EJB class.
Attribute | Description | Comment |
---|---|---|
|
Number of times EJB create method is called |
|
|
Number of times EJB remove method is called |
Stateful Bean
In JMX Logging set value to
amx:pp=/mon/server-mon[server],type=stateful-bean-mon,name=ApplicationsName/ClassName
where ApplicationName
is the name of your application and ClassName
of the
name of the Stateful EJB class.
Attribute | Description | Comment |
---|---|---|
|
Number of times EJB create method is called |
|
|
Number of times EJB remove method is called |
|
|
Number of stateful session beans in |
|
|
Number of stateful session beans in Passive state |
Stateless Bean
In JMX Logging set value to
amx:pp=/mon/server-mon[server],type=stateless-bean-mon,name=ApplicationsName/ClassName
where ApplicationName
is the name of your application and ClassName
of the
name of the Stateless EJB class.
Attribute | Description | Comment |
---|---|---|
|
Number of times EJB create method is called |
|
|
Number of times EJB remove method is called |
|
|
Number of stateful session beans in |
Thread Pool
Thread Pool Statistics
In JMX Logging set value to
amx:pp=/mon/server-mon[server],type=thread-pool-mon,name=network/NetworkListenerName/thread-pool
where NetworkListenerName
is the name of the network listener to monitor.
Alternatively set the value to amx:pp=/mon/server-mon[server],type=thread-pool-mon,name=network//global-thread-pool-stats
for totals across all thread pools.
Attribute | Description | Comment |
---|---|---|
|
Core number of threads in the thread pool |
|
|
Provides the total number of tasks, which were executed by the thread pool |
|
|
Maximum number of threads allowed in the thread pool |
|
|
Provides the number of request processing threads currently in the listener thread pool |
|
|
Provides the number of request processing threads currently in use in the listener thread pool serving requests |
Transaction Service
In JMX Logging set value to
amx:pp=/mon/server-mon[server],type=transaction-service-mon,name=transaction-service
to use this MBean.
Attribute | Description | Comment |
---|---|---|
|
Provides the number of transactions that are currently active. |
|
|
Provides the number of transactions that have been committed. |
|
|
Provides the number of transactions that have been rolled back. |
|
|
Indicates if the transaction service has been frozen. |
Returns |
Virtual Server
In JMX Logging set value to
amx:pp=/mon/server-mon[server],type=virtualserverinfo-mon,name=http-service/VirtualServerName
where VirtualServerName
is the name of the virtual server.
Attribute | Description | Comment |
---|---|---|
|
The id of the virtual server |
|
|
The host (alias) names of the virtual server" |
|
|
The mode of the virtual server |
Is either active or unknown |
|
The state of the virtual server |
Web Request
In JMX Logging set value to
amx:pp=/mon/server-mon[server],type=web-request-mon,name=ApplicationName/VirtualServer
where ApplicationName
is the name of your application and VirtualServer
is
the name of the virtual server it is running on. There is also the special value of
web/request
for all requests to every virtual server and application.
Attribute | Description | Comment |
---|---|---|
|
Cumulative value of the error count, with error count representing the number of cases where the response code was greater than or equal to 400 |
|
|
Cumulative number of requests processed so far |
|
|
Average request processing time |
|
|
Longest response time for a request; not a cumulative value, but the largest response time from among the response times |
OpenMQ MBeans
Payara Server includes OpenMQ as a JMS broker, which includes its own MBeans. Documentation on them can be found in the official GlassFish reference guide for coding JMX clients. Check section 3: Message Queue MBean Reference