1JSTATD(1)                        JDK Commands                        JSTATD(1)
2
3
4

NAME

6       jstatd  -  monitor  the  creation  and termination of instrumented Java
7       HotSpot VMs
8

SYNOPSIS

10       Note: This command is experimental and unsupported.
11
12       jstatd [options]
13
14       options
15              This represents the jstatd command-line  options.   See  Options
16              for the jstatd Command.
17

DESCRIPTION

19       The  jstatd  command is an RMI server application that monitors for the
20       creation and termination of instrumented Java HotSpot VMs and  provides
21       an  interface  to enable remote monitoring tools, jstat and jps, to at‐
22       tach to JVMs that are running on the local host and collect information
23       about the JVM process.
24
25       The  jstatd server requires an RMI registry on the local host.  The js‐
26       tatd server attempts to attach to the RMI registry on the default port,
27       or on the port you specify with the -p port option.  If an RMI registry
28       is not found, then one is created within the jstatd application  that's
29       bound  to the port that's indicated by the -p port option or to the de‐
30       fault RMI registry port when the -p port option is  omitted.   You  can
31       stop the creation of an internal RMI registry by specifying the -nr op‐
32       tion.
33

OPTIONS FOR THE JSTATD COMMAND

35       -nr    This option does not attempt to create an internal RMI  registry
36              within  the  jstatd  process when an existing RMI registry isn't
37              found.
38
39       -p port
40              This option sets the port number where the RMI registry  is  ex‐
41              pected to be found, or when not found, created if the -nr option
42              isn't specified.
43
44       -n rminame
45              This option sets the name to which  the  remote  RMI  object  is
46              bound in the RMI registry.  The default name is JStatRemoteHost.
47              If multiple jstatd servers are started on the  same  host,  then
48              the  name of the exported RMI object for each server can be made
49              unique by specifying this option.  However,  doing  so  requires
50              that  the  unique  server  name  be  included  in the monitoring
51              client's hostid and vmid strings.
52
53       -Joption
54              This option passes a Java option to the JVM, where the option is
55              one of those described on the reference page for the Java appli‐
56              cation launcher.  For example, -J-Xms48m sets the startup memory
57              to 48 MB.  See java.
58

SECURITY

60       The  jstatd server can monitor only JVMs for which it has the appropri‐
61       ate native access permissions.  Therefore, the jstatd process  must  be
62       running  with  the same user credentials as the target JVMs.  Some user
63       credentials, such as the root user in Oracle Solaris, Linux, and  OS  X
64       operating  systems,  have  permission to access the instrumentation ex‐
65       ported by any JVM on the system.  A jstatd process  running  with  such
66       credentials can monitor any JVM on the system, but introduces addition‐
67       al security concerns.
68
69       The jstatd server doesn't provide any authentication of remote clients.
70       Therefore,  running a jstatd server process exposes the instrumentation
71       export by all JVMs for which the jstatd process has access  permissions
72       to any user on the network.  This exposure might be undesirable in your
73       environment, and therefore, local security policies should  be  consid‐
74       ered  before  you  start the jstatd process, particularly in production
75       environments or on networks that aren't secure.
76
77       The jstatd server installs an instance  of  RMISecurityPolicy  when  no
78       other security manager is installed, and therefore, requires a security
79       policy file to be specified.  The policy file must conform  to  Default
80       Policy Implementation and Policy File Syntax.
81
82       If  your  security concerns can't be addressed with a customized policy
83       file, then the safest action is to not run the jstatd  server  and  use
84       the jstat and jps tools locally.  However, when using jps to get a list
85       of instrumented JVMs, the list will not include  any  JVMs  running  in
86       docker containers.
87

REMOTE INTERFACE

89       The interface exported by the jstatd process is proprietary and guaran‐
90       teed to change.  Users and developers are discouraged from  writing  to
91       this interface.
92

EXAMPLES

94       The  following  are examples of the jstatd command.  The jstatd scripts
95       automatically start the server in the background.
96

INTERNAL RMI REGISTRY

98       This example shows how to start a jstatd session with an  internal  RMI
99       registry.   This  example  assumes that no other server is bound to the
100       default RMI registry port (port 1099).
101
102              jstatd -J-Djava.security.policy=all.policy
103

EXTERNAL RMI REGISTRY

105       This example starts a jstatd session with an external RMI registry.
106
107              rmiregistry&
108              jstatd -J-Djava.security.policy=all.policy
109
110       This example starts a jstatd session  with  an  external  RMI  registry
111       server on port 2020.
112
113              jrmiregistry 2020&
114              jstatd -J-Djava.security.policy=all.policy -p 2020
115
116       This  example  starts a jstatd session with an external RMI registry on
117       port 2020 that's bound to AlternateJstatdServerName.
118
119              rmiregistry 2020&
120              jstatd -J-Djava.security.policy=all.policy -p 2020 -n AlternateJstatdServerName
121

STOP THE CREATION OF AN IN-PROCESS RMI REGISTRY

123       This example starts a jstatd session that doesn't create  an  RMI  reg‐
124       istry  when  one  isn't found.  This example assumes an RMI registry is
125       already running.  If an RMI registry isn't running, then an error  mes‐
126       sage is displayed.
127
128              jstatd -J-Djava.security.policy=all.policy -nr
129

ENABLE RMI LOGGING

131       This  example starts a jstatd session with RMI logging capabilities en‐
132       abled.  This technique is useful as a troubleshooting aid or for  moni‐
133       toring server activities.
134
135              jstatd -J-Djava.security.policy=all.policy -J-Djava.rmi.serv‐
136              er.logCalls=true
137
138
139
140JDK 14                               2020                            JSTATD(1)
Impressum