2362N/A." or visit www.oracle.com if you need additional information or have any
0N/ACommand\-line options. The options may be in any order. If there are redundant or contradictory options, the last option specified will take precedence.
0N/AThe \f3jstatd\fP tool is an RMI server application that monitors for the creation and termination of instrumented HotSpot Java virtual machines (JVMs) and provides a interface to allow remote monitoring tools to attach to JVMs running on the local host.
0N/AThe \f3jstatd\fP server requires the presence of an RMI registry on the local host. The \f3jstatd\fP server will attempt to attach to the RMI registry on the default port, or on the port indicated by the \f2\-p port\fP option. If an RMI registry is not found, one will be created within the \f3jstatd\fP application bound to the port indicated by the \f2\-p port\fP option or to the default RMI registry port if \f2\-p port\fP is omitted. Creation of an internal RMI registry can be inhibited by specifying the \f2\-nr\fP option.
0N/A\f3NOTE:\fP This utility is unsupported and may or may not be available in future versions of the JDK. It is not currently available on the Windows 98 and Windows ME platforms.
0N/ADo not attempt to create an internal RMI registry within the \f2jstatd\fP process when an existing RMI registry is not found.
0N/APort number where the RMI registry is expected to be found, or, if not found, created if \f2\-nr\fP is not specified.
1178N/AName to which the remote RMI object is bound in the RMI registry. The default name is \f2JStatRemoteHost\fP. If multiple \f3jstatd\fP servers are started on the same host, the name of the exported RMI object for each server can be made unique by specifying this option. However, doing so will require that the unique server name be included in the monitoring client's \f2hostid\fP and \f2vmid\fP strings.
0N/APass \f2option\fP to the \f3java\fP launcher called by \f3javac\fP. For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes. It is a common convention for \f3\-J\fP to pass options to the underlying VM executing applications written in Java.
0N/AThe \f3jstatd\fP server can only monitor JVMs for which it has the appropriate native access permissions. Therefor the \f3jstatd\fP process must be running with the same user credentials as the target JVMs. Some user credentials, such as the \f2root\fP user in UNIX(TM) based systems, have permission to access the instrumentation exported by any JVM on the system. A \f3jstatd\fP process running with such credentials can monitor any JVM on the system, but introduces additional security concerns.
0N/AThe \f3jstatd\fP server does not provide any authentication of remote clients. Therefore, running a \f3jstatd\fP server process exposes the instrumentation export by all JVMs for which the \f3jstatd\fP process has access permissions to any user on the network. This exposure may be undesireable in your environment and local security policies should be considered before starting the \f3jstatd\fP process, particularly in production environments or on unsecure networks.
0N/AThe \f3jstatd\fP server installs an instance of RMISecurityPolicy if no other security manager has been installed and therefore requires a security policy file to be specified. The policy file must conform to the default policy implementation's
0N/AThe following policy file will allow the \f3jstatd\fP server to run without any security exceptions. This policy is less liberal then granting all permissions to all codebases, but is more liberal than a policy that grants the minimal permissions to run the \f3jstatd\fP server.
0N/A permission java.security.AllPermission;\fP
0N/ATo use this policy, copy the text into a file called \f2jstatd.all.policy\fP and run the \f3jstatd\fP server as follows:
0N/AFor sites with more restrictive security practices, it is possible to use a custom policy file to limit access to specific trusted hosts or networks, though such techniques are subject to IP addreess spoofing attacks. If your security concerns cannot be addressed with a customized policy file, then the safest action is to not run the \f3jstatd\fP server and use the \f3jstat\fP and \f3jps\fP tools locally.
0N/AThe interface exported by the \f3jstatd\fP process is proprietary and is guaranteed to change. Users and developers are discouraged from writing to this interface.
0N/AHere are some examples of starting \f3jstatd\fP. Note that the \f3jstatd\fP scripts automatically start the server in the background.
0N/AThis example demonstrates starting \f3jstatd\fP with an internal RMI registry. This example assumes that no other server is bound to the default RMI Registry port (port 1099).
0N/AThis example demonstrates starting \f3jstatd\fP with an external RMI registry server on port 2020.
0N/AThis example demonstrates starting \f3jstatd\fP with an external RMI registry on port 2020, bound to name AlternateJstatdServerName.
0N/AThis example demonstrates starting \f3jstatd\fP such that it will not create a RMI registry if one is not found. This example assumes an RMI registry is already running. If it is not, an appropriate error message is emitted.
0N/AThis example demonstrates starting \f3jstatd\fP with RMI logging capabilities enabled. This technique is useful as a troubleshooting aid or for monitoring server activities.
4880N/Ahttp://docs.oracle.com/javase/7/docs/technotes/tools/index.html#rmi \- the Java Remote Object Registry