Tomcat

User rating:
5 (3 ratings)

1. Server setup

The prerequisite to use Tomcat monitor in LoadUI is to enable JMX monitoring on monitored server. Following parameters should be added to Tomcat start up script to get JXM enabled:

-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=8999
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false

tomcatSettings

If you want to add authentication, please read Enabling JMX Remote in Tomcat's documentation.

2. LoadUI setup

When defining new Tomcat monitor in LoadUI, user must specify server host (in server definition screen) and port. Username and password is only required if you have explicitly required this in the Server setup step. Click the Test connection button to verify the connection. Make sure that no firewall is blocking the port used in between the server and LoadUI.

Example settings for a Tomcat server running as localhost with the above Java options configured as shown:

  • Server label: My local tests Tomcat server
  • Hostname / IP address: localhost
  • Description: Test server, used for double-checking LoadUI tests are configured correctly
  • Port: 8999

3. Available Statistics

  • Cache (one set of statistics per directory)
    • Access Count
    • Cache Size
    • Hits Count
  • Data Source
    • Num Active (%)
    • Max Active
    • Max Idle
    • Num Active
    • Num Idle
  • Request Processor (one set of statistics per server instance)
    • Error count (%)
    • Bytes Sent
    • Error Count
    • Max Time
    • Processing Time
    • Request Count
  • Session (one set of statistics per directory)
    • Rejected Sessions (%)
    • Active Sessions
    • Expired Sessions
    • Max Active
    • Rejected Sessions
    • Session Average Alive Time
    • Session Counter
    • Session Max Alive Time
  • Thread Pool (one set of statistics per server instance)
    • Current Threads Busy (%)
    • Current Thread Count
    • Current Threads Busy
    • Max Threads
  • VM Garbage Collector
    • Collection Count
      • PS MarkSweep
      • PS Scavenge
    • Collection Time
      • PS MarkSweep
      • PS Scavenge
  • VM Memory
    • Heap Memory used (%)
    • Heap Memory Commited
    • Heap Memory Max
    • Heap Memory Used
  • VM Threading
    • Deamon Thread Count
    • Peak Thread Count
    • Thread Count