I was wondering if anyone could point m开发者_开发知识库e to right solution for simple performance dashboard for my web application. Technology stack: Tomcat + Springframework.
I was looking int OpenCore, but seams that their dashboard is quite expensive.
I would like to have easy access to memory usage and response times. I could try to write my own solution, but I would rather to not invent the wheel.
Googling for a while just gave me OpenCore.
Any suggestions?
The standard way to monitor Tomcat (and many other Java apps, too) is JMX.
After you start Tomcat with JMX enabled, launch jconsole
and connect to Tomcat process. You should see loads of things; all of this data is accessible from within your webapp.
In order to get response times, you need to look at Catalina
→ GlobalRequestProcessor
→ http-<yourPort>
→ Attributes
section. It has processingTime
and requestCount
; from these you can get the average if necessary.
To get heap memory usage, look at java.lang
→ Memory
→ Attributes
→ HeapMemoryUsage
and NonHeapMemoryUsage
.
精彩评论