1jps(1)                         Monitoring Tools                         jps(1)
2
3
4

NAME

6       jps - Lists the instrumented Java Virtual Machines (JVMs) on the target
7       system. This command is experimental and unsupported.
8

SYNOPSIS

10       jps [ options ] [ hostid ]
11
12
13       options
14              Command-line options. See Options.
15
16       hostid The identifier of the host for which the process report should
17              be generated. The hostid can include optional components that
18              indicate the communications protocol, port number, and other
19              implementation specific data. See Host Identifier.
20

DESCRIPTION

22       The jps command lists the instrumented Java HotSpot VMs on the target
23       system. The command is limited to reporting information on JVMs for
24       which it has the access permissions.
25
26       If the jps command is run without specifying a hostid, then it searches
27       for instrumented JVMs on the local host. If started with a hostid, then
28       it searches for JVMs on the indicated host, using the specified
29       protocol and port. A jstatd process is assumed to be running on the
30       target host.
31
32       The jps command reports the local JVM identifier, or lvmid, for each
33       instrumented JVM found on the target system. The lvmid is typically,
34       but not necessarily, the operating system's process identifier for the
35       JVM process. With no options, jps lists each Java application's lvmid
36       followed by the short form of the application's class name or jar file
37       name. The short form of the class name or JAR file name omits the
38       class's package information or the JAR files path information.
39
40       The jps command uses the Java launcher to find the class name and
41       arguments passed to the main method. If the target JVM is started with
42       a custom launcher, then the class or JAR file name and the arguments to
43       the main method are not available. In this case, the jps command
44       outputs the string Unknown for the class name or JAR file name and for
45       the arguments to the main method.
46
47       The list of JVMs produced by the jps command can be limited by the
48       permissions granted to the principal running the command. The command
49       only lists the JVMs for which the principle has access rights as
50       determined by operating system-specific access control mechanisms.
51

OPTIONS

53       The jps command supports a number of options that modify the output of
54       the command. These options are subject to change or removal in the
55       future.
56
57       -q
58              Suppresses the output of the class name, JAR file name, and
59              arguments passed to the main method, producing only a list of
60              local JVM identifiers.
61
62       -m
63              Displays the arguments passed to the main method. The output may
64              be null for embedded JVMs.
65
66       -l
67              Displays the full package name for the application's main class
68              or the full path name to the application's JAR file.
69
70       -v
71              Displays the arguments passed to the JVM.
72
73       -V
74              Suppresses the output of the class name, JAR file name, and
75              arguments passed to the main method, producing only a list of
76              local JVM identifiers.
77
78       -Joption
79              Passes option to the JVM, where option is one of the options
80              described on the reference page for the Java application
81              launcher. For example, -J-Xms48m sets the startup memory to 48
82              MB. See java(1).
83

HOST IDENTIFIER

85       The host identifier, or hostid is a string that indicates the target
86       system. The syntax of the hostid string corresponds to the syntax of a
87       URI:
88
89       [protocol:][[//]hostname][:port][/servername]
90
91
92       protocol
93              The communications protocol. If the protocol is omitted and a
94              hostname is not specified, then the default protocol is a
95              platform-specific, optimized, local protocol. If the protocol is
96              omitted and a host name is specified, then the default protocol
97              is rmi.
98
99       hostname
100              A hostname or IP address that indicates the target host. If you
101              omit the hostname parameter, then the target host is the local
102              host.
103
104       port   The default port for communicating with the remote server. If
105              the hostname parameter is omitted or the protocol parameter
106              specifies an optimized, local protocol, then the port parameter
107              is ignored. Otherwise, treatment of the port parameter is
108              implementation specific. For the default rmi protocol, the port
109              parameter indicates the port number for the rmiregistry on the
110              remote host. If the port parameter is omitted, and the protocol
111              parameter indicates rmi, then the default rmiregistry port
112              (1099) is used.
113
114       servername
115              The treatment of this parameter depends on the implementation.
116              For the optimized, local protocol, this field is ignored. For
117              the rmi protocol, this parameter is a string that represents the
118              name of the RMI remote object on the remote host. See the jstatd
119              command -noption for more information.
120

OUTPUT FORMAT

122       The output of the jps command follows the following pattern:
123
124       lvmid [ [ classname | JARfilename | "Unknown"] [ arg* ] [ jvmarg* ] ]
125
126       All output tokens are separated by white space. An arg value that
127       includes embedded white space introduces ambiguity when attempting to
128       map arguments to their actual positional parameters.
129
130       Note: It is recommended that you do not write scripts to parse jps
131       output because the format might change in future releases. If you write
132       scripts that parse jps output, then expect to modify them for future
133       releases of this tool.
134

EXAMPLES

136       This section provides examples of the jps command.
137
138       List the instrumented JVMs on the local host:
139
140       jps
141       18027 Java2Demo.JAR
142       18032 jps
143       18005 jstat
144
145       The following example lists the instrumented JVMs on a remote host.
146       This example assumes that the jstat server and either the its internal
147       RMI registry or a separate external rmiregistry process are running on
148       the remote host on the default port (port 1099). It also assumes that
149       the local host has appropriate permissions to access the remote host.
150       This example also includes the -l option to output the long form of the
151       class names or JAR file names.
152
153       jps -l remote.domain
154       3002 /opt/jdk1.7.0/demo/jfc/Java2D/Java2Demo.JAR
155       2857 sun.tools.jstatd.jstatd
156
157       The following example lists the instrumented JVMs on a remote host with
158       a non-default port for the RMI registry. This example assumes that the
159       jstatd server, with an internal RMI registry bound to port 2002, is
160       running on the remote host. This example also uses the -m option to
161       include the arguments passed to the main method of each of the listed
162       Java applications.
163
164       jps -m remote.domain:2002
165       3002 /opt/jdk1.7.0/demo/jfc/Java2D/Java2Demo.JAR
166       3102 sun.tools.jstatd.jstatd -p 2002
167
168

SEE ALSO

170       · java(1)
171
172       · jstat(1)
173
174       · jstatd(1)
175
176       · rmiregistry(1)
177
178
179
180JDK 8                          21 November 2013                         jps(1)
Impressum