Monday, September 7, 2009

Using JRockit Mission Control

start your Java server application with:

-Xmanagement:ssl=false,authenticate=false,autodiscovery=true -Djrockit.managementserver.port=9010

(if you don' specify a port it will use 7091)

it will tell you:

[JRockit] Management server started on port 9010, ssl=false, authenticate=false.
[JRockit] JDP server up. Broadcasting target 10.66.3.19:7091 every 5000 ms.


the custom JMX service URL is:
service:jmx:rmi:///jndi/rmi://localhost:7091/jmxrmi


a thread dump will show you an extra thread:


"RMI TCP Accept-9010" id=13 idx=0x40 tid=2379 prio=5 alive, in native, daemon
at java/net/PlainSocketImpl.socketAccept(Ljava/net/SocketImpl;)V(Native Method)
at java/net/PlainSocketImpl.accept(PlainSocketImpl.java:384)
^-- Holding lock: java/net/SocksSocketImpl@0x14144818[thin lock]
at java/net/ServerSocket.implAccept(ServerSocket.java:450)
at java/net/ServerSocket.accept(ServerSocket.java:421)
at sun/rmi/transport/tcp/TCPTransport.run(TCPTransport.java:340)
at java/lang/Thread.run(Thread.java:595)
at jrockit/vm/RNI.c2java(JJJJJ)V(Native Method)
-- end of trace

No comments: