annotate src/linux/doc/man/jstatd.1 @ 0:37a05a11f281

Initial load
author duke
date Sat, 01 Dec 2007 00:00:00 +0000
children b056c42ea5b4
rev   line source
duke@0 1 .'" t
duke@0 2 ."
duke@0 3 ." Copyright 2004-2006 Sun Microsystems, Inc. All Rights Reserved.
duke@0 5 ."
duke@0 6 ." This code is free software; you can redistribute it and/or modify it
duke@0 7 ." under the terms of the GNU General Public License version 2 only, as
duke@0 8 ." published by the Free Software Foundation.
duke@0 9 ."
duke@0 10 ." This code is distributed in the hope that it will be useful, but WITHOUT
duke@0 11 ." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0 12 ." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@0 13 ." version 2 for more details (a copy is included in the LICENSE file that
duke@0 14 ." accompanied this code).
duke@0 15 ."
duke@0 16 ." You should have received a copy of the GNU General Public License version
duke@0 17 ." 2 along with this work; if not, write to the Free Software Foundation,
duke@0 18 ." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0 19 ."
duke@0 20 ." Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
duke@0 21 ." CA 95054 USA or visit if you need additional information or
duke@0 22 ." have any questions.
duke@0 23 ."
duke@0 24 ." `
duke@0 25 .TH jstatd 1 "05 Aug 2006"
duke@0 26 ." Generated by html2roff
duke@0 27
duke@0 28 .LP
duke@0 29 .SH NAME
duke@0 30 jstatd \- Virtual Machine jstat Daemon
duke@0 31 .LP
duke@0 32 .SH "SYNOPSIS"
duke@0 33 .LP
duke@0 34
duke@0 35 .LP
duke@0 36 .nf
duke@0 37 \f3
duke@0 38 .fl
duke@0 39 jstatd [ \fP\f4options\fP\f3 ]\fP
duke@0 40 .br
duke@0 41 \f3
duke@0 42 .fl
duke@0 43 \fP
duke@0 44 .fi
duke@0 45
duke@0 46 .LP
duke@0 47 .SH "PARAMETERS"
duke@0 48 .LP
duke@0 49
duke@0 50 .LP
duke@0 51 .TP 3
duke@0 52 options
duke@0 53 Command\-line options. The options may be in any order. If there are redundant or contradictory options, the last option specified will take precedence.
duke@0 54 .LP
duke@0 55 .SH "DESCRIPTION"
duke@0 56 .LP
duke@0 57
duke@0 58 .LP
duke@0 59 .LP
duke@0 60 The \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.
duke@0 61 .LP
duke@0 62 .LP
duke@0 63 The \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.
duke@0 64 .LP
duke@0 65 .LP
duke@0 66 \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.
duke@0 67 .LP
duke@0 68 .SH "OPTIONS"
duke@0 69 .LP
duke@0 70
duke@0 71 .LP
duke@0 72 .LP
duke@0 73 The \f3jstatd\fP command supports the following options:
duke@0 74 .LP
duke@0 75 .TP 3
duke@0 76 \-nr
duke@0 77 Do not attempt to create an internal RMI registry within the \f2jstatd\fP process when an existing RMI registry is not found.
duke@0 78 .TP 3
duke@0 79 \-p\ port
duke@0 80 Port number where the RMI registry is expected to be found, or, if not found, created if \f2\-nr\fP is not specified.
duke@0 81 .TP 3
duke@0 82 \-n\ rminame
duke@0 83 Name 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 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.
duke@0 84 .TP 3
duke@0 85 \-Joption
duke@0 86 Pass \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.
duke@0 87 .LP
duke@0 88 .SH "SECURITY"
duke@0 89 .LP
duke@0 90
duke@0 91 .LP
duke@0 92 .LP
duke@0 93 The \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.
duke@0 94 .LP
duke@0 95 .LP
duke@0 96 The \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.
duke@0 97 .LP
duke@0 98 .LP
duke@0 99 The \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
duke@0 100 .na
duke@0 101 \f2Policy File Syntax\fP @
duke@0 102 .fi
duke@0 103
duke@0 104 .LP
duke@0 105 .LP
duke@0 106 The 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.
duke@0 107 .LP
duke@0 108 .nf
duke@0 109 \f3
duke@0 110 .fl
duke@0 111 grant codebase "file:${java.home}/../lib/tools.jar" {\fP
duke@0 112 .br
duke@0 113 \f3
duke@0 114 .fl
duke@0 115 permission;\fP
duke@0 116 .br
duke@0 117 \f3
duke@0 118 .fl
duke@0 119 };\fP
duke@0 120 .br
duke@0 121 \f3
duke@0 122 .fl
duke@0 123 \fP
duke@0 124 .fi
duke@0 125
duke@0 126 .LP
duke@0 127 .LP
duke@0 128 To use this policy, copy the text into a file called \f2jstatd.all.policy\fP and run the \f3jstatd\fP server as follows:
duke@0 129 .LP
duke@0 130 .nf
duke@0 131 \f3
duke@0 132 .fl
duke@0 133 jstatd \-J\\fP
duke@0 134 .br
duke@0 135 \f3
duke@0 136 .fl
duke@0 137 \fP
duke@0 138 .fi
duke@0 139
duke@0 140 .LP
duke@0 141 .LP
duke@0 142 For 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.
duke@0 143 .LP
duke@0 144 .SH "REMOTE
duke@0 145 INTERFACE"
duke@0 146 .LP
duke@0 147
duke@0 148 .LP
duke@0 149 .LP
duke@0 150 The interface exported by the \f3jstatd\fP process is proprietary and is guaranteed to change. Users and developers are discouraged from writing to this interface.
duke@0 151 .LP
duke@0 152 .SH "EXAMPLES"
duke@0 153 .LP
duke@0 154
duke@0 155 .LP
duke@0 156 .LP
duke@0 157 Here are some examples of starting \f3jstatd\fP. Note that the \f3jstatd\fP scripts automatically start the server in the background.
duke@0 158 .LP
duke@0 159 .SS
duke@0 160 Using Internal RMI
duke@0 161 Registry
duke@0 162 .LP
duke@0 163 .LP
duke@0 164 This 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).
duke@0 165 .LP
duke@0 166 .nf
duke@0 167 \f3
duke@0 168 .fl
duke@0 169 jstatd \-J\
duke@0 170 .fl
duke@0 171 \fP
duke@0 172 .fi
duke@0 173
duke@0 174 .LP
duke@0 175 .SS
duke@0 176 Using
duke@0 177 External RMI Registry
duke@0 178 .LP
duke@0 179 .LP
duke@0 180 This example demonstrates starting \f3jstatd\fP with a external RMI registry.
duke@0 181 .LP
duke@0 182 .nf
duke@0 183 \f3
duke@0 184 .fl
duke@0 185 rmiregistry&
duke@0 186 .fl
duke@0 187 jstatd \-J\
duke@0 188 .fl
duke@0 189 \fP
duke@0 190 .fi
duke@0 191
duke@0 192 .LP
duke@0 193 .LP
duke@0 194 This example demonstrates starting \f3jstatd\fP with an external RMI registry server on port 2020.
duke@0 195 .LP
duke@0 196 .nf
duke@0 197 \f3
duke@0 198 .fl
duke@0 199 rmiregistry 2020&
duke@0 200 .fl
duke@0 201 jstatd \-J\ \-p 2020
duke@0 202 .fl
duke@0 203 \fP
duke@0 204 .fi
duke@0 205
duke@0 206 .LP
duke@0 207 .LP
duke@0 208 This example demonstrates starting \f3jstatd\fP with an external RMI registry on port 2020, bound to name AlternateJstatdServerName.
duke@0 209 .LP
duke@0 210 .nf
duke@0 211 \f3
duke@0 212 .fl
duke@0 213 rmiregistry 2020&
duke@0 214 .fl
duke@0 215 jstatd \-J\ \-p 2020 \-n AlternateJstatdServerName
duke@0 216 .fl
duke@0 217 \fP
duke@0 218 .fi
duke@0 219
duke@0 220 .LP
duke@0 221 .SS
duke@0 222 Inhibiting creation of an in\-process RMI
duke@0 223 registry
duke@0 224 .LP
duke@0 225 .LP
duke@0 226 This 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.
duke@0 227 .LP
duke@0 228 .nf
duke@0 229 \f3
duke@0 230 .fl
duke@0 231 jstatd \-J\ \-nr
duke@0 232 .fl
duke@0 233 \fP
duke@0 234 .fi
duke@0 235
duke@0 236 .LP
duke@0 237 .SS
duke@0 238 Enabling RMI
duke@0 239 logging capabilities.
duke@0 240 .LP
duke@0 241 .LP
duke@0 242 This example demonstrates starting \f3jstatd\fP with RMI logging capabilities enabled. This technique is useful as a troubleshooting aid or for monitoring server activities.
duke@0 243 .LP
duke@0 244 .nf
duke@0 245 \f3
duke@0 246 .fl
duke@0 247 jstatd \-J\ \-J\-Djava.rmi.server.logCalls=true
duke@0 248 .fl
duke@0 249 \fP
duke@0 250 .fi
duke@0 251
duke@0 252 .LP
duke@0 253 .SH "SEE ALSO"
duke@0 254 .LP
duke@0 255 .RS 3
duke@0 256 .TP 2
duke@0 257 *
duke@0 258 java \- the Java Application Launcher
duke@0 259 .TP 2
duke@0 260 *
duke@0 261 jps \- the Java Process Status Application
duke@0 262 .TP 2
duke@0 263 *
duke@0 264 jstat \- the Java Virtual Machine Statistics Monitoring Tool
duke@0 265 .TP 2
duke@0 266 *
duke@0 267 rmiregistry \- the Java Remote Object Registry
duke@0 268 .RE
duke@0 269
duke@0 270 .LP
duke@0 271
duke@0 272 .LP
duke@0 273