Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
published by the Free Software Foundation.
This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
version 2 for more details (a copy is included in the LICENSE file that
accompanied this code).
You should have received a copy of the GNU General Public License version
2 along with this work; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
or visit www.oracle.com if you need additional information or have any
questions.
Arch: generic
Software: JDK 8
Date: 21 November 2013
SectDesc: Monitoring Tools
Title: jstatd.1
* Define some portability stuff
-----------------------------------------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://bugs.debian.org/507673
http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------------------------------------------------------
* set default formatting
-----------------------------------------------------------------
disable hyphenation
disable justification (adjust text to left margin only)
-----------------------------------------------------------------
* MAIN CONTENT STARTS HERE *
-----------------------------------------------------------------
jstatd [ options ]
options The command-line options. See Options.
The \f3jstatd server requires an RMI registry on the local host. The \f3jstatd server attempts to attach to the RMI registry on the default port, or on the port you specify with the \f3-p\f3port option. If an RMI registry is not found, then one is created within the \f3jstatd application that is bound to the port that is indicated by the \f3-p\f3port option or to the default RMI registry port when the \f3-p\f3port option is omitted. You can stop the creation of an internal RMI registry by specifying the \f3-nr option.
-nr
Does not attempt to create an internal RMI registry within the \f3jstatd process when an existing RMI registry is not found.
-p port
The port number where the RMI registry is expected to be found, or when not found, created if the \f3-nr option is not specified.
-n rminame
Name to which the remote RMI object is bound in the RMI registry. The default name is \f3JStatRemoteHost. If multiple \f3jstatd servers are started on the same host, then the name of the exported RMI object for each server can be made unique by specifying this option. However, doing so requires that the unique server name be included in the monitoring client's \f3hostid and \f3vmid strings.
-Joption
Passes \f3option to the JVM, where option is one of the \f3options described on the reference page for the Java application launcher. For example, \f3-J-Xms48m sets the startup memory to 48 MB. See java(1).
The \f3jstatd server does not provide any authentication of remote clients. Therefore, running a \f3jstatd server process exposes the instrumentation export by all JVMs for which the \f3jstatd process has access permissions to any user on the network. This exposure might be undesirable in your environment, and therefore, local security policies should be considered before you start the \f3jstatd process, particularly in production environments or on networks that are not secure.
The \f3jstatd server installs an instance of \f3RMISecurityPolicy when no other security manager is installed, and therefore, requires a security policy file to be specified. The policy file must conform to Default Policy Implementation and Policy File Syntax at http://docs.oracle.com/javase/8/docs/technotes/guides/security/PolicyFiles.html
The following policy file allows the \f3jstatd server to run without any security exceptions. This policy is less liberal than granting all permissions to all code bases, but is more liberal than a policy that grants the minimal permissions to run the \f3jstatd server.
\f3grant codebase "file:${java.home}/../lib/tools.jar" {
\f3 permission java.security.AllPermission;
\f3};
\f3To use this policy setting, copy the text into a file called \f3jstatd.all.policy and run the \f3jstatd server as follows:
\f3jstatd -J-Djava.security.policy=jstatd.all.policy
\f3For 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 address spoofing attacks. If your security concerns cannot be addressed with a customized policy file, then the safest action is to not run the \f3jstatd server and use the \f3jstat and \f3jps tools locally.
\f3jstatd -J-Djava.security.policy=all.policy
\f3
\f3rmiregistry&
\f3jstatd -J-Djava.security.policy=all.policy
\f3This example starts a \f3jstatd session with an external RMI registry server on port 2020.
\f3jrmiregistry 2020&
\f3jstatd -J-Djava.security.policy=all.policy -p 2020
\f3This example starts a \f3jstatd session with an external RMI registry on port 2020 that is bound to \f3AlternateJstatdServerName.
\f3rmiregistry 2020&
\f3jstatd -J-Djava.security.policy=all.policy -p 2020
\f3 -n AlternateJstatdServerName
\f3
\f3jstatd -J-Djava.security.policy=all.policy -nr
\f3
\f3jstatd -J-Djava.security.policy=all.policy
\f3 -J-Djava.rmi.server.logCalls=true
\f3
0.2i java(1)
0.2i jps(1)
0.2i jstat(1)
0.2i rmiregistry(1)
'pl 8.5i 'bp