view src/solaris/doc/sun/man/man1/jcmd.1 @ 4992:7f2d38ddd4e8

Merge
author mfang
date Wed, 16 May 2012 12:06:37 -0700
parents e931d7fb0043
children 0039f5c7fb51
line wrap: on
line source
." Copyright (c) 1994, 2012, 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.
."
.TH jcmd 1 "16 Mar 2012"

.LP
.SH "Name"
jcmd \- Diagnostic Command
.LP
.LP
\f3jcmd\fP is a utility to send diagnostic command requests to a running Java Virtual Machine.
.LP
.SH "SYNOPSIS"
.LP
.nf
\f3
.fl
    \fP\f3jcmd\fP [ option ] 
.fl
    \f3jcmd\fP <\f2pid\fP | \f2main class\fP> PerfCounter.print
.fl
    \f3jcmd\fP <\f2pid\fP | \f2main class\fP> \f2command\fP [\f2arguments\fP]
.fl
    \f3jcmd\fP <\f2pid\fP | \f2main class\fP> \-f \f2file\fP
.fl
.fi

.LP
.SH "DESCRIPTION"
.LP
.LP
\f3jcmd\fP is a utility to send diagnostic command requests to a Java Virtual Machine supporting this feature.
.LP
.LP
Used without arguments or with the \-l option, jcmd prints the list of running Java processes with their process id, their main class and their command line arguments.
.LP
.LP
When a process id is specified on the command line, jcmd sends the diagnostic command request to the process with this id.
.LP
.LP
When a main class is specified on the command line, jcmd sends the diagnostic command request to all Java processes with this main class.
.LP
.LP
With the PerfCounter.print argument, jcmd prints the performance counters available on the targeted Java process(es).
.LP
.LP
With the \-f option, jcmd sends to the targeted Java process(es) the diagnostic commands stored in the file \f2file\fP.
.LP
.SH "OPTIONS"
.LP
.LP
Options are mutually exclusive. Options, if used, should follow immediately after the command name.
.LP
.RS 3
.TP 3
\-l 
Prints the list of running Java processes with their process id, their main class and their command line arguments. 
.br
.TP 3
\-h 
Prints a help message. 
.br
.TP 3
\-help 
Prints a help message. 
.RE

.LP
.SH "PARAMETERS"
.LP
.RS 3
.TP 3
pid 
Identifies the process that receives the diagnostic command requests. The process must be a Java process. To get a list of Java processes running on a machine, use jps(1) or jcmd(1). 
.br
.TP 3
main class 
Main class of the process that receives the diagnostic command requests. If several running Java processes share this main class, the diagnostic command request is sent to all these processes. To get a list of Java processes running on a machine, use jps(1) or jcmd(1). 
.br
.TP 3
command [arguments] 
Invoke the diagnostic command called \f2command\fP on the targeted Java process(es). The list of available diagnostic commands for a given process can be obtained by invoking the \f3help\fP command on this process. Each diagnostic command has its own set of \f2arguments\fP, which can be obtained by invoking the \f3help\fP command followed by the command name. 
.br
.TP 3
Counter.print 
Print the performance counters available on the targeted Java process(es). The list of performance counters may vary with the Java process. 
.br
.TP 3
\-f file 
Read commands from \f2file\fP and invoke them on the targeted Java process(es). In \f2file\fP, each command must be written on a single line. Lines starting with # are ignored. Processing of \f2file\fP ends when all lines have been invoked or when a line containing the \f3stop\fP keyword is read. 
.RE

.LP
.SH "SEE ALSO"
.LP
.RS 3
.TP 2
o
jps(1) 
.RE

.LP
.LP
jps(1)
.LP