jdk/src/bsd/doc/man/jps.1
changeset 21743 3d979da7bdf0
parent 14342 8435a30053c1
child 31876 91b22707521a
equal deleted inserted replaced
21741:8cd632761233 21743:3d979da7bdf0
     1 ." Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
     1 '\" t
     2 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     2 .\"  Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
     3 ."
     3 .\"
     4 ." This code is free software; you can redistribute it and/or modify it
     4 .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5 ." under the terms of the GNU General Public License version 2 only, as
     5 .\"
     6 ." published by the Free Software Foundation.
     6 .\" This code is free software; you can redistribute it and/or modify it
     7 ."
     7 .\" under the terms of the GNU General Public License version 2 only, as
     8 ." This code is distributed in the hope that it will be useful, but WITHOUT
     8 .\" published by the Free Software Foundation.
     9 ." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
     9 .\"
    10 ." FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    10 .\" This code is distributed in the hope that it will be useful, but WITHOUT
    11 ." version 2 for more details (a copy is included in the LICENSE file that
    11 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    12 ." accompanied this code).
    12 .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
    13 ."
    13 .\" version 2 for more details (a copy is included in the LICENSE file that
    14 ." You should have received a copy of the GNU General Public License version
    14 .\" accompanied this code).
    15 ." 2 along with this work; if not, write to the Free Software Foundation,
    15 .\"
    16 ." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    16 .\" You should have received a copy of the GNU General Public License version
    17 ."
    17 .\" 2 along with this work; if not, write to the Free Software Foundation,
    18 ." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    18 .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    19 ." or visit www.oracle.com if you need additional information or have any
    19 .\"
    20 ." questions.
    20 .\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    21 ."
    21 .\" or visit www.oracle.com if you need additional information or have any
    22 .TH jps 1 "10 May 2011"
    22 .\" questions.
       
    23 .\"
       
    24 .\"     Arch: generic
       
    25 .\"     Software: JDK 8
       
    26 .\"     Date: 21 November 2013
       
    27 .\"     SectDesc: Monitoring Tools
       
    28 .\"     Title: jps.1
       
    29 .\"
       
    30 .if n .pl 99999
       
    31 .TH jps 1 "21 November 2013" "JDK 8" "Monitoring Tools"
       
    32 .\" -----------------------------------------------------------------
       
    33 .\" * Define some portability stuff
       
    34 .\" -----------------------------------------------------------------
       
    35 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       
    36 .\" http://bugs.debian.org/507673
       
    37 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
       
    38 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       
    39 .ie \n(.g .ds Aq \(aq
       
    40 .el       .ds Aq '
       
    41 .\" -----------------------------------------------------------------
       
    42 .\" * set default formatting
       
    43 .\" -----------------------------------------------------------------
       
    44 .\" disable hyphenation
       
    45 .nh
       
    46 .\" disable justification (adjust text to left margin only)
       
    47 .ad l
       
    48 .\" -----------------------------------------------------------------
       
    49 .\" * MAIN CONTENT STARTS HERE *
       
    50 .\" -----------------------------------------------------------------
    23 
    51 
    24 .LP
    52 .SH NAME    
    25 .SH "Name"
    53 jps \- Lists the instrumented Java Virtual Machines (JVMs) on the target system\&. This command is experimental and unsupported\&.
    26 jps \- Java Virtual Machine Process Status Tool
    54 .SH SYNOPSIS    
    27 .LP
    55 .sp     
    28 .SH "SYNOPSIS"
    56 .nf     
    29 .LP
       
    30 .nf
       
    31 \f3
       
    32 .fl
       
    33 \fP\f3jps\fP [ \f2options\fP ] [ \f2hostid\fP ]
       
    34 .br
       
    35 
    57 
    36 .fl
    58 \fBjps\fR [ \fIoptions\fR ] [ \fIhostid\fR ]
    37 .fi
    59 .fi     
    38 
    60 .sp     
    39 .LP
    61 .TP     
    40 .SH "PARAMETERS"
    62 \fIoptions\fR
    41 .LP
    63 Command-line options\&. See Options\&.
    42 .RS 3
    64 .TP     
    43 .TP 3
    65 \fIhostid\fR
    44 options
    66 The identifier of the host for which the process report should be generated\&. The \f3hostid\fR can include optional components that indicate the communications protocol, port number, and other implementation specific data\&. See Host Identifier\&.
    45 Command\-line options.
    67 .SH DESCRIPTION    
    46 .TP 3
    68 The \f3jps\fR command lists the instrumented Java HotSpot VMs on the target system\&. The command is limited to reporting information on JVMs for which it has the access permissions\&.
    47 hostid
    69 .PP
    48 The host identifier of the host for which the process report should be generated. The \f2hostid\fP may include optional components that indicate the communications protocol, port number, and other implementation specific data.
    70 If the \f3jps\fR command is run without specifying a \f3hostid\fR, then it searches for instrumented JVMs on the local host\&. If started with a \f3hostid\fR, then it searches for JVMs on the indicated host, using the specified protocol and port\&. A \f3jstatd\fR process is assumed to be running on the target host\&.
       
    71 .PP
       
    72 The \f3jps\fR command reports the local JVM identifier, or \f3lvmid\fR, for each instrumented JVM found on the target system\&. The \f3lvmid\fR is typically, but not necessarily, the operating system\&'s process identifier for the JVM process\&. With no options, \f3jps\fR lists each Java application\&'s \f3lvmid\fR followed by the short form of the application\&'s class name or jar file name\&. The short form of the class name or JAR file name omits the class\&'s package information or the JAR files path information\&.
       
    73 .PP
       
    74 The \f3jps\fR command uses the Java launcher to find the class name and arguments passed to the main method\&. If the target JVM is started with a custom launcher, then the class or JAR file name and the arguments to the \f3main\fR method are not available\&. In this case, the \f3jps\fR command outputs the string \f3Unknown\fR for the class name or JAR file name and for the arguments to the \f3main\fR method\&.
       
    75 .PP
       
    76 The list of JVMs produced by the \f3jps\fR command can be limited by the permissions granted to the principal running the command\&. The command only lists the JVMs for which the principle has access rights as determined by operating system-specific access control mechanisms\&.
       
    77 .SH OPTIONS    
       
    78 The \f3jps\fR command supports a number of options that modify the output of the command\&. These options are subject to change or removal in the future\&.
       
    79 .TP
       
    80 -q
       
    81 .br
       
    82 Suppresses the output of the class name, JAR file name, and arguments passed to the \f3main\fR method, producing only a list of local JVM identifiers\&.
       
    83 .TP
       
    84 -m
       
    85 .br
       
    86 Displays the arguments passed to the \f3main\fR method\&. The output may be \f3null\fR for embedded JVMs\&.
       
    87 .TP
       
    88 -l
       
    89 .br
       
    90 Displays the full package name for the application\&'s \f3main\fR class or the full path name to the application\&'s JAR file\&.
       
    91 .TP
       
    92 -v
       
    93 .br
       
    94 Displays the arguments passed to the JVM\&.
       
    95 .TP
       
    96 -V
       
    97 .br
       
    98 Suppresses the output of the class name, JAR file name, and arguments passed to the main method, producing only a list of local JVM identifiers\&.
       
    99 .TP
       
   100 -J\f3option\fR
       
   101 .br
       
   102 Passes \f3option\fR to the JVM, where option is one of the \f3options\fR described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
       
   103 .SH HOST\ IDENTIFIER    
       
   104 The host identifier, or \f3hostid\fR is a string that indicates the target system\&. The syntax of the \f3hostid\fR string corresponds to the syntax of a URI:
       
   105 .sp     
       
   106 .nf     
       
   107 \f3[protocol:][[//]hostname][:port][/servername]\fP
       
   108 .fi     
       
   109 .nf     
       
   110 \f3\fP
       
   111 .fi     
       
   112 .sp     
       
   113 .TP     
       
   114 \fIprotocol\fR
       
   115 The communications protocol\&. If the \f3protocol\fR is omitted and a \f3hostname\fR is not specified, then the default protocol is a platform-specific, optimized, local protocol\&. If the protocol is omitted and a host name is specified, then the default protocol is \f3rmi\fR\&.
       
   116 .TP     
       
   117 hostname
       
   118 A hostname or IP address that indicates the target host\&. If you omit the \f3hostname\fR parameter, then the target host is the local host\&.
       
   119 .TP     
       
   120 port
       
   121 The default port for communicating with the remote server\&. If the \f3hostname\fR parameter is omitted or the \f3protocol\fR parameter specifies an optimized, local protocol, then the \f3port\fR parameter is ignored\&. Otherwise, treatment of the \f3port\fR parameter is implementation specific\&. For the default \f3rmi\fR protocol, the \f3port\fR parameter indicates the port number for the rmiregistry on the remote host\&. If the \f3port\fR parameter is omitted, and the \f3protocol\fR parameter indicates \f3rmi\fR, then the default rmiregistry port (1099) is used\&.
       
   122 .TP     
       
   123 servername
       
   124 The treatment of this parameter depends on the implementation\&. For the optimized, local protocol, this field is ignored\&. For the \f3rmi\fR protocol, this parameter is a string that represents the name of the RMI remote object on the remote host\&. See the \f3jstatd\fR command \f3-n\fRoption for more information\&.
       
   125 .SH OUTPUT\ FORMAT    
       
   126 The output of the \f3jps\fR command follows the following pattern:
       
   127 .sp     
       
   128 .nf     
       
   129 \f3lvmid [ [ classname | JARfilename | "Unknown"] [ arg* ] [ jvmarg* ] ]\fP
       
   130 .fi     
       
   131 .nf     
       
   132 \f3\fP
       
   133 .fi     
       
   134 .sp     
       
   135 All output tokens are separated by white space\&. An \f3arg\fR value that includes embedded white space introduces ambiguity when attempting to map arguments to their actual positional parameters\&.
       
   136 .PP
       
   137 \fINote:\fR It is recommended that you do not write scripts to parse \f3jps\fR output because the format might change in future releases\&. If you write scripts that parse \f3jps\fR output, then expect to modify them for future releases of this tool\&.
       
   138 .SH EXAMPLES    
       
   139 This section provides examples of the \f3jps\fR command\&.
       
   140 .PP
       
   141 List the instrumented JVMs on the local host:
       
   142 .sp     
       
   143 .nf     
       
   144 \f3jps\fP
       
   145 .fi     
       
   146 .nf     
       
   147 \f318027 Java2Demo\&.JAR\fP
       
   148 .fi     
       
   149 .nf     
       
   150 \f318032 jps\fP
       
   151 .fi     
       
   152 .nf     
       
   153 \f318005 jstat\fP
       
   154 .fi     
       
   155 .nf     
       
   156 \f3\fP
       
   157 .fi     
       
   158 .sp     
       
   159 The following example lists the instrumented JVMs on a remote host\&. This example assumes that the \f3jstat\fR server and either the its internal RMI registry or a separate external rmiregistry process are running on the remote host on the default port (port 1099)\&. It also assumes that the local host has appropriate permissions to access the remote host\&. This example also includes the \f3-l\fR option to output the long form of the class names or JAR file names\&.
       
   160 .sp     
       
   161 .nf     
       
   162 \f3jps \-l remote\&.domain\fP
       
   163 .fi     
       
   164 .nf     
       
   165 \f33002 /opt/jdk1\&.7\&.0/demo/jfc/Java2D/Java2Demo\&.JAR\fP
       
   166 .fi     
       
   167 .nf     
       
   168 \f32857 sun\&.tools\&.jstatd\&.jstatd\fP
       
   169 .fi     
       
   170 .nf     
       
   171 \f3\fP
       
   172 .fi     
       
   173 .sp     
       
   174 The following example lists the instrumented JVMs on a remote host with a non-default port for the RMI registry\&. This example assumes that the \f3jstatd\fR server, with an internal RMI registry bound to port 2002, is running on the remote host\&. This example also uses the \f3-m\fR option to include the arguments passed to the \f3main\fR method of each of the listed Java applications\&.
       
   175 .sp     
       
   176 .nf     
       
   177 \f3jps \-m remote\&.domain:2002\fP
       
   178 .fi     
       
   179 .nf     
       
   180 \f33002 /opt/jdk1\&.7\&.0/demo/jfc/Java2D/Java2Demo\&.JAR\fP
       
   181 .fi     
       
   182 .nf     
       
   183 \f33102 sun\&.tools\&.jstatd\&.jstatd \-p 2002\fP
       
   184 .fi     
       
   185 .nf     
       
   186 \f3\fP
       
   187 .fi     
       
   188 .sp     
       
   189 .SH SEE\ ALSO    
       
   190 .TP 0.2i    
       
   191 \(bu
       
   192 java(1)
       
   193 .TP 0.2i    
       
   194 \(bu
       
   195 jstat(1)
       
   196 .TP 0.2i    
       
   197 \(bu
       
   198 jstatd(1)
       
   199 .TP 0.2i    
       
   200 \(bu
       
   201 rmiregistry(1)
    49 .RE
   202 .RE
    50 
   203 .br
    51 .LP
   204 'pl 8.5i
    52 .SH "DESCRIPTION"
   205 'bp
    53 .LP
       
    54 .LP
       
    55 The \f3jps\fP tool lists the instrumented HotSpot Java Virtual Machines (JVMs) on the target system. The tool is limited to reporting information on JVMs for which it has the access permissions.
       
    56 .LP
       
    57 .LP
       
    58 If \f3jps\fP is run without specifying a \f2hostid\fP, it will look for instrumented JVMs on the local host. If started with a \f2hostid\fP, it will look for JVMs on the indicated host, using the specified protocol and port. A \f3jstatd\fP process is assumed to be running on the target host.
       
    59 .LP
       
    60 .LP
       
    61 The \f3jps\fP command will report the local VM identifier, or \f2lvmid\fP, for each instrumented JVM found on the target system. The \f3lvmid\fP is typically, but not necessarily, the operating system's process identifier for the JVM process. With no options, \f3jps\fP will list each Java application's \f2lvmid\fP followed by the short form of the application's class name or jar file name. The short form of the class name or JAR file name omits the class's package information or the JAR files path information.
       
    62 .LP
       
    63 .LP
       
    64 The \f3jps\fP command uses the \f3java\fP launcher to find the class name and arguments passed to the \f2main\fP method. If the target JVM is started with a custom launcher, the class name (or JAR file name) and the arguments to the \f2main\fP method will not be available. In this case, the \f3jps\fP command will output the string \f2Unknown\fP for the class name or JAR file name and for the arguments to the main method.
       
    65 .LP
       
    66 .LP
       
    67 The list of JVMs produced by the \f3jps\fP command may be limited by the permissions granted to the principal running the command. The command will only list the JVMs for which the principle has access rights as determined by operating system specific access control mechanisms.
       
    68 .LP
       
    69 .LP
       
    70 \f3NOTE:\fP This utility is unsupported and may not be available in future versions of the JDK. It is not currently available on Windows 98 and Windows ME platforms.
       
    71 .LP
       
    72 .SH "OPTIONS"
       
    73 .LP
       
    74 .LP
       
    75 The \f3jps\fP command supports a number of options that modify the output of the command. These options are subject to change or removal in the future.
       
    76 .LP
       
    77 .RS 3
       
    78 .TP 3
       
    79 \-q
       
    80 Suppress the output of the class name, JAR file name, and arguments passed to the \f2main\fP method, producing only a list of local VM identifiers.
       
    81 .TP 3
       
    82 \-m
       
    83 Output the arguments passed to the main method. The output may be null for embedded JVMs.
       
    84 .TP 3
       
    85 \-l
       
    86 Output the full package name for the application's main class or the full path name to the application's JAR file.
       
    87 .TP 3
       
    88 \-v
       
    89 Output the arguments passed to the JVM.
       
    90 .TP 3
       
    91 \-V
       
    92 Output the arguments passed to the JVM through the flags file (the .hotspotrc file or the file specified by the \-XX:Flags=<\f2filename\fP> argument).
       
    93 .TP 3
       
    94 \-Joption
       
    95 Pass \f2option\fP to the \f3java\fP launcher called by \f3jps\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.
       
    96 .RE
       
    97 
       
    98 .LP
       
    99 .SS
       
   100 HOST IDENTIFIER
       
   101 .LP
       
   102 .LP
       
   103 The host identifier, or \f2hostid\fP is a string that indicates the target system. The syntax of the \f2hostid\fP string largely corresponds to the syntax of a URI:
       
   104 .LP
       
   105 .nf
       
   106 \f3
       
   107 .fl
       
   108 [\fP\f4protocol\fP\f3:][[//]\fP\f4hostname\fP\f3][:\fP\f4port\fP\f3][/\fP\f4servername\fP\f3]\fP
       
   109 .br
       
   110 \f3
       
   111 .fl
       
   112 \fP
       
   113 .fi
       
   114 
       
   115 .LP
       
   116 .RS 3
       
   117 .TP 3
       
   118 protocol
       
   119 The communications protocol. If the \f2protocol\fP is omitted and a \f2hostname\fP is not specified, the default protocol is a platform specific, optimized, local protocol. If the \f2protocol\fP is omitted and a \f2hostname\fP is specified, then the default protocol is \f3rmi\fP.
       
   120 .TP 3
       
   121 hostname
       
   122 A hostname or IP address indicating the target host. If \f2hostname\fP is omitted, then the target host is the local host.
       
   123 .TP 3
       
   124 port
       
   125 The default port for communicating with the remote server. If the \f2hostname\fP is omitted or the \f2protocol\fP specifies an optimized, local protocol, then \f2port\fP is ignored. Otherwise, treatment of the \f2port\fP parameter is implementation specific. For the default \f3rmi\fP protocol the \f2port\fP indicates the port number for the rmiregistry on the remote host. If \f2port\fP is omitted, and \f2protocol\fP indicates \f3rmi\fP, then the default rmiregistry port (1099) is used.
       
   126 .TP 3
       
   127 servername
       
   128 The treatment of this parameter depends on the implementation. For the optimized, local protocol, this field is ignored. For the \f3rmi\fP protocol, this parameter is a string representing the name of the RMI remote object on the remote host. See the \f3\-n\fP option for the jstatd(1) command.
       
   129 .RE
       
   130 
       
   131 .LP
       
   132 .SH "OUTPUT FORMAT"
       
   133 .LP
       
   134 .LP
       
   135 The output of the \f3jps\fP command follows the following pattern:
       
   136 .LP
       
   137 .nf
       
   138 \f3
       
   139 .fl
       
   140 \fP\f4lvmid\fP\f3 [ [ \fP\f4classname\fP\f3 | \fP\f4JARfilename\fP\f3 | "Unknown"] [ \fP\f4arg\fP\f3* ] [ \fP\f4jvmarg\fP\f3* ] ]\fP
       
   141 .br
       
   142 \f3
       
   143 .fl
       
   144 \fP
       
   145 .fi
       
   146 
       
   147 .LP
       
   148 .LP
       
   149 Where all output tokens are separated by white space. An \f2arg\fP that includes embedded white space will introduce ambiguity when attempting to map arguments to their actual positional parameters.
       
   150 .br
       
   151 .br
       
   152 \f3NOTE\fP: You are advised not to write scripts to parse \f3jps\fP output since the format may change in future releases. If you choose to write scripts that parse \f3jps\fP output, expect to modify them for future releases of this tool.
       
   153 .br
       
   154 
       
   155 .LP
       
   156 .SH "EXAMPLES"
       
   157 .LP
       
   158 .LP
       
   159 This section provides examples of the \f3jps\fP command.
       
   160 .LP
       
   161 .LP
       
   162 Listing the instrumented JVMs on the local host:
       
   163 .LP
       
   164 .nf
       
   165 \f3
       
   166 .fl
       
   167 \fP\f3jps\fP
       
   168 .br
       
   169 
       
   170 .fl
       
   171 18027 Java2Demo.JAR
       
   172 .br
       
   173 
       
   174 .fl
       
   175 18032 jps
       
   176 .br
       
   177 
       
   178 .fl
       
   179 18005 jstat
       
   180 .br
       
   181 
       
   182 .fl
       
   183 .fi
       
   184 
       
   185 .LP
       
   186 .LP
       
   187 Listing the instrumented JVMs on a remote host:
       
   188 .LP
       
   189 .LP
       
   190 This example assumes that the \f3jstat\fP server and either the its internal RMI registry or a separate external \f3rmiregistry\fP process are running on the remote host on the default port (port 1099). It also assumes that the local host has appropriate permissions to access the remote host. This example also includes the \f2\-l\fP option to output the long form of the class names or JAR file names.
       
   191 .LP
       
   192 .nf
       
   193 \f3
       
   194 .fl
       
   195 \fP\f3jps \-l remote.domain\fP
       
   196 .br
       
   197 
       
   198 .fl
       
   199 3002 /opt/jdk1.7.0/demo/jfc/Java2D/Java2Demo.JAR
       
   200 .br
       
   201 
       
   202 .fl
       
   203 2857 sun.tools.jstatd.jstatd
       
   204 .br
       
   205 
       
   206 .fl
       
   207 .fi
       
   208 
       
   209 .LP
       
   210 .LP
       
   211 Listing the instrumented JVMs on a remote host with a non\-default port for the RMI registry
       
   212 .LP
       
   213 .LP
       
   214 This example assumes that the \f3jstatd\fP server, with an internal RMI registry bound to port 2002, is running on the remote host. This example also uses the \f2\-m\fP option to include the arguments passed to the \f2main\fP method of each of the listed Java applications.
       
   215 .LP
       
   216 .nf
       
   217 \f3
       
   218 .fl
       
   219 \fP\f3jps \-m remote.domain:2002\fP
       
   220 .br
       
   221 
       
   222 .fl
       
   223 3002 /opt/jdk1.7.0/demo/jfc/Java2D/Java2Demo.JAR
       
   224 .br
       
   225 
       
   226 .fl
       
   227 3102 sun.tools.jstatd.jstatd \-p 2002
       
   228 .fl
       
   229 .fi
       
   230 
       
   231 .LP
       
   232 .SH "SEE ALSO"
       
   233 .LP
       
   234 .RS 3
       
   235 .TP 2
       
   236 o
       
   237 java(1) \- the Java Application Launcher
       
   238 .TP 2
       
   239 o
       
   240 jstat(1) \- the Java virtual machine Statistics Monitoring Tool
       
   241 .TP 2
       
   242 o
       
   243 jstatd(1) \- the jstat daemon
       
   244 .TP 2
       
   245 o
       
   246 rmiregistry(1) \- the Java Remote Object Registry
       
   247 .RE
       
   248 
       
   249 .LP
       
   250