1jstatd(1)                   General Commands Manual                  jstatd(1)
2
3
4

NAME

6       jstatd - Virtual Machine jstat Daemon
7

SYNOPSIS

9       jstatd [ options ]
10
11

PARAMETERS

13       options
14          Command-line  options. The options may be in any order. If there are
15          redundant or contradictory options, the last option  specified  will
16          take precedence.
17

DESCRIPTION

19       The jstatd tool is an RMI server application that monitors for the cre‐
20       ation and termination of instrumented  HotSpot  Java  virtual  machines
21       (JVMs)  and  provides  a  interface to allow remote monitoring tools to
22       attach to JVMs running on the local host.
23
24       The jstatd server requires the presence of an RMI registry on the local
25       host.  The  jstatd server will attempt to attach to the RMI registry on
26       the default port, or on the port indicated by the -p port option. If an
27       RMI registry is not found, one will be created within the jstatd appli‐
28       cation bound to the port indicated by the -p  port  option  or  to  the
29       default  RMI registry port if -p port is omitted. Creation of an inter‐
30       nal RMI registry can be inhibited by specifying the -nr option.
31
32       NOTE: This utility is unsupported and may or may not  be  available  in
33       future  versions  of the JDK. It is not currently available on the Win‐
34       dows 98 and Windows ME platforms.
35

OPTIONS

37       The jstatd command supports the following options:
38
39       -nr
40          Do not attempt to create an internal RMI registry within the  jstatd
41          process when an existing RMI registry is not found.
42
43       -p  port
44          Port  number  where the RMI registry is expected to be found, or, if
45          not found, created if -nr is not specified.
46
47       -n  rminame
48          Name to which the remote RMI object is bound in  the  RMI  registry.
49          The  default name is JStatRemoteHost. If multiple jstatd servers are
50          started on the same host, the name of the exported  RMI  object  for
51          each  server  can  be made unique by by specifying this option. How‐
52          ever, doing so will require that the unique server name be  included
53          in the monitoring client's hostid and vmid strings.
54
55       -Joption
56          Pass  option  to  the  java  launcher  called by javac. For example,
57          -J-Xms48m sets the startup memory to 48 megabytes. It  is  a  common
58          convention  for  -J  to  pass options to the underlying VM executing
59          applications written in Java.
60

SECURITY

62       The jstatd server can only monitor JVMs for which it has the  appropri‐
63       ate native access permissions. Therefor the jstatd process must be run‐
64       ning with the same user credentials as the target JVMs. Some user  cre‐
65       dentials, such as the root user in UNIX(TM) based systems, have permis‐
66       sion to access the instrumentation exported by any JVM on the system. A
67       jstatd process running with such credentials can monitor any JVM on the
68       system, but introduces additional security concerns.
69
70       The jstatd  server  does  not  provide  any  authentication  of  remote
71       clients. Therefore, running a jstatd server process exposes the instru‐
72       mentation export by all JVMs for which the jstatd  process  has  access
73       permissions  to any user on the network. This exposure may be undesire‐
74       able in your environment and local security policies should be  consid‐
75       ered  before  starting  the  jstatd process, particularly in production
76       environments or on unsecure networks.
77
78       The jstatd server installs an instance of RMISecurityPolicy if no other
79       security  manager  has been installed and therefore requires a security
80       policy file to be specified.  The  policy  file  must  conform  to  the
81       default policy implementation's Policy File Syntax @
82       http://java.sun.com/javase/6/docs/technotes/guides/security/Policy
83       Files.html.
84
85       The following policy file will allow the jstatd server to run without
86       any security exceptions. This policy is less liberal then granting all
87       permissions to all codebases, but is more liberal than a policy that
88       grants the minimal permissions to run the jstatd server.
89
90       grant codebase "file:${java.home}/../lib/tools.jar" {
91          permission java.security.AllPermission;
92       };
93
94
95       To use this policy, copy the text into a file called jstatd.all.policy
96       and run the jstatd server as follows:
97
98       jstatd -J-Djava.security.policy=jstatd.all.policy
99
100
101       For sites with more restrictive security practices, it is possible to
102       use a custom policy file to limit access to specific trusted hosts or
103       networks, though such techniques are subject to IP addreess spoofing
104       attacks. If your security concerns cannot be addressed with a custom‐
105       ized policy file, then the safest action is to not run the jstatd
106       server and use the jstat and jps tools locally.
107

REMOTE

109       INTERFACE"
110
111       The interface exported by the jstatd process is proprietary and is
112       guaranteed to change. Users and developers are discouraged from writing
113       to this interface.
114

EXAMPLES

116       Here are some examples of starting jstatd. Note that the jstatd scripts
117       automatically start the server in the background.
118
119   Using Internal RMI
120       Registry
121
122       This example demonstrates starting jstatd with an internal RMI reg‐
123       istry. This example assumes that no other server is bound to the
124       default RMI Registry port (port 1099).
125
126       jstatd -J-Djava.security.policy=all.policy
127
128
129   Using
130       External RMI Registry
131
132       This example demonstrates starting jstatd with a external RMI registry.
133
134       rmiregistry&
135       jstatd -J-Djava.security.policy=all.policy
136
137
138       This example demonstrates starting jstatd with an external RMI registry
139       server on port 2020.
140
141       rmiregistry 2020&
142       jstatd -J-Djava.security.policy=all.policy -p 2020
143
144
145       This example demonstrates starting jstatd with an external RMI registry
146       on port 2020, bound to name AlternateJstatdServerName.
147
148       rmiregistry 2020&
149       jstatd -J-Djava.security.policy=all.policy -p 2020 -n AlternateJstatdServerName
150
151
152   Inhibiting creation of an in-process RMI
153       registry
154
155       This example demonstrates starting jstatd such that it will not create
156       a RMI registry if one is not found. This example assumes an RMI reg‐
157       istry is already running. If it is not, an appropriate error message is
158       emitted.
159
160       jstatd -J-Djava.security.policy=all.policy -nr
161
162
163   Enabling RMI
164       logging capabilities.
165
166       This example demonstrates starting jstatd with RMI logging capabilities
167       enabled. This technique is useful as a troubleshooting aid or for moni‐
168       toring server activities.
169
170       jstatd -J-Djava.security.policy=all.policy -J-Djava.rmi.server.logCalls=true
171
172

SEE ALSO

174          * java - the Java Application Launcher
175
176          * jps - the Java Process Status Application
177
178          * jstat - the Java Virtual Machine Statistics Monitoring Tool
179
180          * rmiregistry - the Java Remote Object Registry
181
182
183                                  05 Aug 2006                        jstatd(1)
Impressum