jdk/src/linux/doc/man/jcmd.1
author alanb
Fri, 02 Nov 2012 15:50:11 +0000
changeset 14342 8435a30053c1
parent 11365 05d995976571
child 21743 3d979da7bdf0
permissions -rw-r--r--
7197491: update copyright year to match last edit in jdk8 jdk repository Reviewed-by: chegar, ksrini
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14342
8435a30053c1 7197491: update copyright year to match last edit in jdk8 jdk repository
alanb
parents: 11365
diff changeset
     1
." Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
11365
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
     2
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
     3
."
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
     4
." This code is free software; you can redistribute it and/or modify it
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
     5
." under the terms of the GNU General Public License version 2 only, as
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
     6
." published by the Free Software Foundation.
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
     7
."
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
     8
." This code is distributed in the hope that it will be useful, but WITHOUT
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
     9
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    10
." FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    11
." version 2 for more details (a copy is included in the LICENSE file that
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    12
." accompanied this code).
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    13
."
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    14
." You should have received a copy of the GNU General Public License version
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    15
." 2 along with this work; if not, write to the Free Software Foundation,
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    16
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    17
."
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    18
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    19
." or visit www.oracle.com if you need additional information or have any
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    20
." questions.
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    21
."
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    22
.TH jcmd 1 "22 Novembre 2011"
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    23
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    24
.LP
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    25
.SH "Name"
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    26
jcmd \- Diagnostic Command
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    27
.br
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    28
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    29
.LP
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    30
.SH "SYNOPSIS"
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    31
.LP
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    32
.nf
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    33
\f3
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    34
.fl
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    35
\fP\f3jcmd\fP [ option ]
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    36
.fl
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    37
\f3jcmd\fP <\fIpid\fR | \fImain class\fR> PerfCounter.print
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    38
.fl
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    39
\f3jcmd\fP <\fIpid\fR | \fImain class\fR> \fIcommand\fR [\fIarguments\fR]
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    40
.fl
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    41
\f3jcmd\fP <\fIpid\fR | \fImain class\fR> -f \fIfile\fR
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    42
.fl
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    43
.fl
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    44
.fi
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    45
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    46
.LP
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    47
.SH "DESCRIPTION"
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    48
.LP
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    49
.LP
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    50
\f3jcmd\fP is a utility to send diagnostic command requests to a Java 
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    51
Virtual Machine supporting this feature. 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. When a process id is specified on the command line, jcmd sends the diagnostic command request to the process with this id. When a main class is specified on the command line, jcmd sends the diagnostic command request to all Java processes with this main class. With the PerfCounter.print argument, jcmd prints the performance counters available on the targeted Java process(es). With the \-f option, jcmd sends to the targeted Java process(es) the diagnostic commands stored in the file \fIfile\fR.
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    52
.LP
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    53
\fP
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    54
.fi
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    55
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    56
.SH "OPTIONS"
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    57
.LP
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    58
.LP
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    59
Options are mutually exclusive. Options, if used, should follow immediately after the command name.
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    60
.LP
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    61
.RS 3
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    62
.TP 3
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    63
\-l 
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    64
prints the list of running Java processes with their process id, their
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    65
main class and their command line arguments. 
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    66
.TP 3
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    67
\-h 
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    68
prints a help message.
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    69
.br
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    70
.br
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    71
.TP 3
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    72
\-help 
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    73
prints a help message
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    74
.br
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    75
.RE
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    76
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    77
.LP
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    78
.SH "PARAMETERS"
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    79
.LP
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    80
.RS 3
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    81
.TP 3
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    82
\fIpid\fR
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    83
Identifies the process which will receive the diagnostic command requests. The process must be a Java process. To get a list of Java processes running on a machine, jps(1) or jcmd(1) may be used. 
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    84
.RE
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    85
.LP
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    86
.RS 3
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    87
.TP 3
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    88
\fImain class\fR
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    89
Main class of the process which will receive the diagnostic command requests. If several running Java processes share this main class, the diagnostic command request will be sent to all these processes. To get a list of Java processes running on a machine, jps(1) or jcmd(1) may be used. 
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    90
.RE
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    91
.RS 3
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    92
.TP 3
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    93
\fIcommand\fR [\fIarguments\fR]
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    94
Invoke the diagnostic command called \fIcommand\fR on the targeted Java
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    95
process(es). The list of available diagnostic commands for a given
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    96
process can be obtained by invoking the 'help' command on this process.
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    97
Each diagnostic command has its own set of \fIarguments\fR which can be 
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    98
obtained by invoking the 'help' command followed by the command name.
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
    99
.RE
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
   100
.RS 3
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
   101
.TP 3
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
   102
\fIPerfCounter.print\fR
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
   103
Print the performance counters available on the targeted Java
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
   104
process(es). The list of performance counters may vary with the Java
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
   105
process.
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
   106
.RE
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
   107
.RS 3
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
   108
.TP 3
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
   109
\fI-f file\fR
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
   110
Read commands from \fIfile\fR and invoke them on the targeted Java
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
   111
process(es). In  \fIfile\fR, each command must be written on a single line. 
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
   112
Lines starting with # are ignored. Processing of \fIfile\fR ends when
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
   113
all lines have been invoked or when a line containing the 'stop' keyword
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
   114
is read.
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
   115
.LP
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
   116
.SH "SEE ALSO"
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
   117
.LP
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
   118
.RS 3
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
   119
.TP 2
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
   120
o
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
   121
jps(1) 
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
   122
.RE
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
   123
05d995976571 7104647: Adding a diagnostic command framework
fparain
parents:
diff changeset
   124