from small one page howto to huge articles all in one place

search text in:




Other .linuxhowtos.org sites:gentoo.linuxhowtos.org



Last additions:
using iotop to find disk usage hogs

using iotop to find disk usage hogs

words:

887

views:

210204

userrating:


May 25th. 2007:
Words

486

Views

259174

why adblockers are bad


Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

words:

161

views:

150540

userrating:


April, 26th. 2006:

Druckversion
You are here: manpages





JPS

Section: JDK Commands (1)
Updated: 2023
Index Return to Main Contents
 

NAME

jps- list the instrumented JVMs on the target system  

SYNOPSIS

B]Note:R] This command is experimental and unsupported.

V]jpsR] [V-qR]] [V-mlvVR]] [I]hostidR]]

V]jpsR] [V-helpR]]  

OPTIONS

V-qR]
Suppresses the output of the class name, JAR file name, and arguments passed to the V]mainR] method, producing a list of only local JVM identifiers.
V-mlvVR]
You can specify any combination of these options.
[bu]
V-mR] displays the arguments passed to the V]mainR] method. The output may be V]nullR] for embedded JVMs.
[bu]
V-lR] displays the full package name for the application[aq]s V]mainR] class or the full path name to the application[aq]s JAR file.
[bu]
V-vR] displays the arguments passed to the JVM.
[bu]
V-VR] suppresses the output of the class name, JAR file name, and arguments passed to the V]mainR] method, producing a list of only local JVM identifiers.
I]hostidR]
The identifier of the host for which the process report should be generated. The V]hostidR] can include optional components that indicate the communications protocol, port number, and other implementation specific data. See B]Host IdentifierR].
V-helpR]
Displays the help message for the V]jpsR] command.
 

DESCRIPTION

The V]jpsR] 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.

If the V]jpsR] command is run without specifying a V]hostidR], then it searches for instrumented JVMs on the local host. If started with a V]hostidR], then it searches for JVMs on the indicated host, using the specified protocol and port. A V]jstatdR] process is assumed to be running on the target host.

The V]jpsR] command reports the local JVM identifier, or V]lvmidR], for each instrumented JVM found on the target system. The V]lvmidR] is typically, but not necessarily, the operating system[aq]s process identifier for the JVM process. With no options, the V]jpsR] command lists each Java application[aq]s V]lvmidR] followed by the short form of the application[aq]s class name or jar file name. The short form of the class name or JAR file name omits the class[aq]s package information or the JAR files path information.

The V]jpsR] 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 V]mainR] method aren[aq]t available. In this case, the V]jpsR] command outputs the string V]UnknownR] for the class name, or JAR file name, and for the arguments to the V]mainR] method.

The list of JVMs produced by the V]jpsR] command can be limited by the permissions granted to the principal running the command. The command lists only the JVMs for which the principal has access rights as determined by operating syste-specific access control mechanisms.  

HOST IDENTIFIER

The host identifier, or V]hostidR], is a string that indicates the target system. The syntax of the V]hostidR] string corresponds to the syntax of a URI:

[I]protocolR]V]:R]][[V]//R]]I]hostnameR]][V]:R]I]portR]][V]/R]I]servernameR]]

I]protocolR]
The communications protocol. If the I]protocolR] is omitted and a I]hostnameR] isn[aq]t specified, then the default protocol is a platfor-specific, optimized, local protocol. If the protocol is omitted and a host name is specified, then the default protocol is V]rmiR].
I]hostnameR]
A host name or IP address that indicates the target host. If you omit the I]hostnameR] parameter, then the target host is the local host.
I]portR]
The default port for communicating with the remote server. If the I]hostnameR] parameter is omitted or the I]protocolR] parameter specifies an optimized, local protocol, then the I]portR] parameter is ignored. Otherwise, treatment of the I]portR] parameter is implementatio-specific. For the default V]rmiR] protocol, the I]portR] parameter indicates the port number for the V]rmiregistryR] on the remote host. If the I]portR] parameter is omitted, and the I]protocolR] parameter indicates V]rmiR], then the default V]rmiregistryR] port (V]1099R]) is used.
I]servernameR]
The treatment of this parameter depends on the implementation. For the optimized, local protocol, this field is ignored. For the V]rmiR] protocol, this parameter is a string that represents the name of the RMI remote object on the remote host. See the B]jstatdR] command V-nR] option.
 

OUTPUT FORMAT OF THE JPS COMMAND

The output of the V]jpsR] command has the following pattern:

I]lvmidR] [ [ I]classnameR] | I]JARfilenameR] | V][dq]Unknown[dq]R]] [ I]argR]* ] [ I]jvmargR]* ] ]

All output tokens are separated by white space. An V]argR] value that includes embedded white space introduces ambiguity when attempting to map arguments to their actual positional parameters.

B]Note:R]

It[aq]s recommended that you don[aq]t write scripts to parse V]jpsR] output because the format might change in future releases. If you write scripts that parse V]jpsR] output, then expect to modify them for future releases of this tool.  

EXAMPLES

This section provides examples of the V]jpsR] command.

List the instrumented JVMs on the local host:

CB]
jps
18027 Java2Demo.JAR
18032 jps
18005 jstat
R]

The following example lists the instrumented JVMs on a remote host. This example assumes that the V]jstatR] server and either the its internal RMI registry or a separate external V]rmiregistryR] process are running on the remote host on the default port (port V]1099R]). It also assumes that the local host has appropriate permissions to access the remote host. This example includes the V-lR] option to output the long form of the class names or JAR file names.

CB]
jps-l remote.domain
3002 /opt/jdk1.7.0/demo/jfc/Java2D/Java2Demo.JAR
2857 sun.tools.jstatd.jstatd
R]

The following example lists the instrumented JVMs on a remote host with a nondefault port for the RMI registry. This example assumes that the V]jstatdR] server, with an internal RMI registry bound to port V]2002R], is running on the remote host. This example also uses the V-mR] option to include the arguments passed to the V]mainR] method of each of the listed Java applications.

CB]
jps-m remote.domain:2002
3002 /opt/jdk1.7.0/demo/jfc/Java2D/Java2Demo.JAR
3102 sun.tools.jstatd.jstatd-p 2002
R]


 

Index

NAME
SYNOPSIS
OPTIONS
DESCRIPTION
HOST IDENTIFIER
OUTPUT FORMAT OF THE JPS COMMAND
EXAMPLES





Support us on Content Nation
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2025 Sascha Nitsch Unternehmensberatung GmbH
Valid XHTML1.1 : Valid CSS
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 17.8 ms