-2

I would like to monitor the Java application created which has UI being rendered in JSP, containing Servlets and Tomcat Server and DB and mysql.

I would like to monitor the flow at each level - to check the performance at each level (for each request and response).

PS: I do not want to modify my application code. I want to monitor it without accessing or modifying the code. Access it only using port no via separate application. No Third party tools.

Jaic E V
  • 1
  • 1

1 Answers1

0

There are multiple ways to monitor performance, but below is one of simplest ways.

1.Add logger.info() into your code wherever needed.

2.Add timestamp to each line of log messages into console as below.

log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss}

Now, each log line contains the timestamp when it is printed,

by reading this log lines you can easily find which code block (between log lines) is taking more time.

Sundararaj Govindasamy
  • 8,180
  • 5
  • 44
  • 77
  • I do not want to modify my application code. I want to monitor it without accessing or modifying the code. Access it only using port no. No Third party tools. – Jaic E V Jan 26 '18 at 02:05