jdk

Форк
0
219 строк · 7.4 Кб
1
.\" Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved.
2
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3
.\"
4
.\" This code is free software; you can redistribute it and/or modify it
5
.\" under the terms of the GNU General Public License version 2 only, as
6
.\" published by the Free Software Foundation.
7
.\"
8
.\" This code is distributed in the hope that it will be useful, but WITHOUT
9
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
.\" FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
11
.\" version 2 for more details (a copy is included in the LICENSE file that
12
.\" accompanied this code).
13
.\"
14
.\" You should have received a copy of the GNU General Public License version
15
.\" 2 along with this work; if not, write to the Free Software Foundation,
16
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17
.\"
18
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
19
.\" or visit www.oracle.com if you need additional information or have any
20
.\" questions.
21
.\"
22
.\" Automatically generated by Pandoc 2.19.2
23
.\"
24
.\" Define V font for inline verbatim, using C font in formats
25
.\" that render this, and otherwise B font.
26
.ie "\f[CB]x\f[R]"x" \{\
27
. ftr V B
28
. ftr VI BI
29
. ftr VB B
30
. ftr VBI BI
31
.\}
32
.el \{\
33
. ftr V CR
34
. ftr VI CI
35
. ftr VB CB
36
. ftr VBI CBI
37
.\}
38
.TH "JSTATD" "1" "2025" "JDK 24-ea" "JDK Commands"
39
.hy
40
.SH NAME
41
.PP
42
jstatd - monitor the creation and termination of instrumented Java
43
HotSpot VMs
44
.SH SYNOPSIS
45
.PP
46
\f[B]WARNING:\f[R] This command is experimental, unsupported, and
47
deprecated.
48
It will be removed in a future release.
49
.PP
50
\f[V]jstatd\f[R] [\f[I]options\f[R]]
51
.TP
52
\f[I]options\f[R]
53
This represents the \f[V]jstatd\f[R] command-line options.
54
See \f[B]Options for the jstatd Command\f[R].
55
.SH DESCRIPTION
56
.PP
57
The \f[V]jstatd\f[R] command is an RMI server application that monitors
58
for the creation and termination of instrumented Java HotSpot VMs and
59
provides an interface to enable remote monitoring tools, \f[V]jstat\f[R]
60
and \f[V]jps\f[R], to attach to JVMs that are running on the local host
61
and collect information about the JVM process.
62
.PP
63
The \f[V]jstatd\f[R] server requires an RMI registry on the local host.
64
The \f[V]jstatd\f[R] server attempts to attach to the RMI registry on
65
the default port, or on the port you specify with the \f[V]-p\f[R]
66
\f[V]port\f[R] option.
67
If an RMI registry is not found, then one is created within the
68
\f[V]jstatd\f[R] application that\[aq]s bound to the port that\[aq]s
69
indicated by the \f[V]-p\f[R] \f[V]port\f[R] option or to the default
70
RMI registry port when the \f[V]-p\f[R] \f[V]port\f[R] option is
71
omitted.
72
You can stop the creation of an internal RMI registry by specifying the
73
\f[V]-nr\f[R] option.
74
.SH OPTIONS FOR THE JSTATD COMMAND
75
.TP
76
\f[V]-nr\f[R]
77
This option does not attempt to create an internal RMI registry within
78
the \f[V]jstatd\f[R] process when an existing RMI registry isn\[aq]t
79
found.
80
.TP
81
\f[V]-p\f[R] \f[I]port\f[R]
82
This option sets the port number where the RMI registry is expected to
83
be found, or when not found, created if the \f[V]-nr\f[R] option
84
isn\[aq]t specified.
85
.TP
86
\f[V]-r\f[R] \f[I]rmiport\f[R]
87
This option sets the port number to which the RMI connector is bound.
88
If not specified a random available port is used.
89
.TP
90
\f[V]-n\f[R] \f[I]rminame\f[R]
91
This option sets the name to which the remote RMI object is bound in the
92
RMI registry.
93
The default name is \f[V]JStatRemoteHost\f[R].
94
If multiple \f[V]jstatd\f[R] servers are started on the same host, then
95
the name of the exported RMI object for each server can be made unique
96
by specifying this option.
97
However, doing so requires that the unique server name be included in
98
the monitoring client\[aq]s \f[V]hostid\f[R] and \f[V]vmid\f[R] strings.
99
.TP
100
\f[V]-J\f[R]\f[I]option\f[R]
101
This option passes a Java \f[V]option\f[R] to the JVM, where the option
102
is one of those described on the reference page for the Java application
103
launcher.
104
For example, \f[V]-J-Xms48m\f[R] sets the startup memory to 48 MB.
105
See \f[B]java\f[R].
106
.SH SECURITY
107
.PP
108
The \f[V]jstatd\f[R] server can monitor only JVMs for which it has the
109
appropriate native access permissions.
110
Therefore, the \f[V]jstatd\f[R] process must be running with the same
111
user credentials as the target JVMs.
112
Some user credentials, such as the root user in Linux and macOS
113
operating systems, have permission to access the instrumentation
114
exported by any JVM on the system.
115
A \f[V]jstatd\f[R] process running with such credentials can monitor any
116
JVM on the system, but introduces additional security concerns.
117
.PP
118
The \f[V]jstatd\f[R] server doesn\[aq]t provide any authentication of
119
remote clients.
120
Therefore, running a \f[V]jstatd\f[R] server process exposes the
121
instrumentation export by all JVMs for which the \f[V]jstatd\f[R]
122
process has access permissions to any user on the network.
123
This exposure might be undesirable in your environment, and therefore,
124
local security policies should be considered before you start the
125
\f[V]jstatd\f[R] process, particularly in production environments or on
126
networks that aren\[aq]t secure.
127
.PP
128
For security purposes, the \f[V]jstatd\f[R] server uses an RMI
129
ObjectInputFilter to allow only essential classes to be deserialized.
130
.PP
131
If your security concerns can\[aq]t be addressed, then the safest action
132
is to not run the \f[V]jstatd\f[R] server and use the \f[V]jstat\f[R]
133
and \f[V]jps\f[R] tools locally.
134
However, when using \f[V]jps\f[R] to get a list of instrumented JVMs,
135
the list will not include any JVMs running in docker containers.
136
.SH REMOTE INTERFACE
137
.PP
138
The interface exported by the \f[V]jstatd\f[R] process is proprietary
139
and guaranteed to change.
140
Users and developers are discouraged from writing to this interface.
141
.SH EXAMPLES
142
.PP
143
The following are examples of the \f[V]jstatd\f[R] command.
144
The \f[V]jstatd\f[R] scripts automatically start the server in the
145
background.
146
.SH INTERNAL RMI REGISTRY
147
.PP
148
This example shows how to start a \f[V]jstatd\f[R] session with an
149
internal RMI registry.
150
This example assumes that no other server is bound to the default RMI
151
registry port (port \f[V]1099\f[R]).
152
.RS
153
.PP
154
\f[V]jstatd\f[R]
155
.RE
156
.SH EXTERNAL RMI REGISTRY
157
.PP
158
This example starts a \f[V]jstatd\f[R] session with an external RMI
159
registry.
160
.IP
161
.nf
162
\f[CB]
163
rmiregistry&
164
jstatd
165
\f[R]
166
.fi
167
.PP
168
This example starts a \f[V]jstatd\f[R] session with an external RMI
169
registry server on port \f[V]2020\f[R].
170
.IP
171
.nf
172
\f[CB]
173
jrmiregistry 2020&
174
jstatd -p 2020
175
\f[R]
176
.fi
177
.PP
178
This example starts a \f[V]jstatd\f[R] session with an external RMI
179
registry server on port \f[V]2020\f[R] and JMX connector bound to port
180
\f[V]2021\f[R].
181
.IP
182
.nf
183
\f[CB]
184
jrmiregistry 2020&
185
jstatd -p 2020 -r 2021
186
\f[R]
187
.fi
188
.PP
189
This example starts a \f[V]jstatd\f[R] session with an external RMI
190
registry on port 2020 that\[aq]s bound to
191
\f[V]AlternateJstatdServerName\f[R].
192
.IP
193
.nf
194
\f[CB]
195
rmiregistry 2020&
196
jstatd -p 2020 -n AlternateJstatdServerName
197
\f[R]
198
.fi
199
.SH STOP THE CREATION OF AN IN-PROCESS RMI REGISTRY
200
.PP
201
This example starts a \f[V]jstatd\f[R] session that doesn\[aq]t create
202
an RMI registry when one isn\[aq]t found.
203
This example assumes an RMI registry is already running.
204
If an RMI registry isn\[aq]t running, then an error message is
205
displayed.
206
.RS
207
.PP
208
\f[V]jstatd -nr\f[R]
209
.RE
210
.SH ENABLE RMI LOGGING
211
.PP
212
This example starts a \f[V]jstatd\f[R] session with RMI logging
213
capabilities enabled.
214
This technique is useful as a troubleshooting aid or for monitoring
215
server activities.
216
.RS
217
.PP
218
\f[V]jstatd -J-Djava.rmi.server.logCalls=true\f[R]
219
.RE
220

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.