Dan Gravell
Dan Gravell

Reputation: 8275

How to profile a headless Java application, running remotely?

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).

Upvotes: 5

Views: 3313

Answers (3)

Dan Gravell
Dan Gravell

Reputation: 8275

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

Upvotes: 0

fglez
fglez

Reputation: 8552

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.

Upvotes: 1

chromanoid
chromanoid

Reputation: 545

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

Upvotes: 1

Related Questions