Java Reference
In-Depth Information
Basic usage
jstatd <options>
jstatd provides a way of making information about local JVMs available over the
network. It achieves this using RMI, and can make these otherwise-local capabilities
accessible to JMX clients. This requires special security settings, which differ from
the JVM defaults. To start jstatd , first we need to create the following file and
name it jstatd.policy :
grant codebase " file: $ { java . home }../ lib / tools . jar {
permission java . security . AllPermission
This policy file grants all security permissions to any class loaded from the JDK's
tools.jar file.
s d
P r o i l e s
To launch jstatd with this policy, use this command line:
jstatd - J - Djava . security . policy =< path to jstat . policy >
Common switches
-p <port>
Look for an existing RMI registry on that port, and create one if not found
It is recommended that jstatd is always switched on in production environments,
but not over the public Internet. For most corporate and enterprise environments,
this is nontrivial to achieve and will require the cooperation of Operations and Net‐
work Engineering staff. However, the benefits of having telemetry data from pro‐
duction JVMs, especially during outages, are difficult to overstate.
A full discussion of JMX and monitoring techniques is outside the scope of this
Basic usage
jinfo <process ID> jinfo <core file>
This tool displays the system properties and JVM options for a running Java process
(or a core file).
Search WWH ::

Custom Search