Pergunta

I have a headless Java application, running on a remote server as a daemon-style process.

I want to extract Java level profiling information from the process, of the sort displayed by JVisualVM. For example, it should show method invocation times and so on.

What is the best way of doing this? My understanding is that JVisualVM does not profile when connecting remotely.

Ideally, the profiling information would be stored in a file for later inspection, in a manner similar to Java heap generation (with jmap) and later analysis (with a heap inspector).

Foi útil?

Solução

You can use NetBeans profiler remote profiling capability.

Remote Profiling

Profile an application that is running on a different system than your NetBeans IDE. The profiler's remote pack can be installed on a remote system, allowing you to profile an application that is started on that system.

In fact, VisualVM is based on it.

Beside various monitoring features, the tool contains a built-in profiler based on the NetBeans profiler. While the profiler UI in VisualVM looks simple (especially when compared to the NetBeans profiler), the profiling capabilities are almost as powerful as in NetBeans.

Here is a detailed blog post about Profiling a Java remote server using Netbeans.

Outras dicas

According to the link you will have to set up jstatd and jmx: http://javadevsoup.blogspot.de/2012/02/remote-java-profiling-using-visual-vm.html

I just found another product that I think does this: http://chrononsystems.com/products/chronon-recording-server

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top