Trace java application at run time

I would like to track a Java application at runtime in order to record and analyze its every behavior.

Is it possible to connect to a Java application to get information about runtime, such as method calls (with parameters and return values) and the state of the object (i.e. its attributes and values)?

My goal is to get a complete understanding of application behavior and how it relates to data.

+4
source share
4 answers

If you need highly customizable registration and runtime processing, one alternative to profilers is to use aspects and load times> .

We use AspectJ in such a way as to capture and log authentication information for users who invoke several low-level methods for debugging purposes and discard erroneous changes.

+4
source

Use a profiler. For example JProfiler or one of this is an overview of openource java profile profiles. Whenever I had to look for dead ends, for example, these tools were priceless ...

+1
source

In Netbeans, the profiler exists and works correctly for use, see http://profiler.netbeans.org/

+1
source

Perhaps see the Glassbox troubleshoot agent for Java applications, which automatically diagnoses common problems. From Glassbox - Automatic Monitoring and Troubleshooting Using AOP :

Glassbox is deployed as a war file for your applications, and then uses AspectJ load weaving time to monitor application components and other artifacts, in order to identify problems such as excess or failed remote calls, slow queries, too many database queries, thread approval. even that request parameters caused failures. All this without changing the code or the build process. (...)

Glassbox monitors applications non-invasively, using aspects to track component interactions. We also track embedded JMX data, in particular, on the Java 5 VM, we select stream data (every 100 ms by default). As the request is processed, we summarize noteworthy events, such as the time during which time was spent, and what parameters were involved in slowing down or failing. We also discover higher-level operations (such as Struts actions or Spring controllers) that we use for reporting. Our AJAX web client then provides summary status data that runs on controlled machines, and we create a more detailed analysis on request. Glassbox allows you to control server clusters: a web application uses JMX Remote or direct RMI to access data from remote servers. We also provide JMX remote access to lower level summary statistics.

This is a nice application, try it.

0
source

All Articles