- 浏览: 72439 次
- 性别:
- 来自: 北京
文章分类
最新评论
copied from http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/jps.html
jps - Java Virtual Machine Process Status Tool
jps [ options ] [ hostid ]
options
hostid
The jps 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.
If jps is run without specifying a hostid , it will look for instrumented JVMs on the local host. If started with a hostid , it will look for JVMs on the indicated host, using the specified protocol and port. A jstatd process is assumed to be running on the target host.
The jps command will report the local VM identifier, or lvmid , for each instrumented JVM found on the target system. The lvmid is typically, but not necessarily, the operating system's process identifier for the JVM process. With no options, jps will list each Java application's lvmid 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.
The jps
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, the
class name (or JAR file name) and the arguments to the main
method will not be available. In this case, the jps
command will
output the string Unknown
for the class name or JAR file name and
for the arguments to the main method.
The list of JVMs produced by the jps 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.
NOTE: 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.
The jps command supports a number of options that modify the output of the command. These options are subject to change or removal in the future.
main
method, producing only
a list of local VM identifiers.
HOST IDENTIFIER
The host identifier, or hostid is a string that indicates the target system. The syntax of the hostid string largely corresponds to the syntax of a URI:
[protocol :][[//]hostname ][:port ][/servername ]
protocol
hostname
port
servername
The output of the jps command follows the following pattern:
lvmid [ [ classname | JARfilename | "Unknown"] [ arg * ] [ jvmarg * ] ]
Where all output tokens are separated by white space. An arg
that
includes embedded white space will introduce ambiguity when attempting to
map arguments to their actual positional parameters.
NOTE
: You are advised not to write scripts to parse jps
output since the format may change in
future releases. If you choose to write scripts that parse jps
output, expect to modify them for future releases of this tool.
This section provides examples of the jps command.
Listing the instrumented JVMs on the local host:
jps 18027 Java2Demo.JAR 18032 jps 18005 jstat
Listing the instrumented JVMs on a remote host:
This example assumes that the jstat 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 -l option to output the long form of the class names or JAR file names.
jps -l remote.domain 3002 /opt/j2sdk1.5.0/demo/jfc/Java2D/Java2Demo.JAR 2857 sun.tools.jstatd.jstatd
Listing the instrumented JVMs on a remote host with a non-default port for the RMI registry
This example assumes that the jstatd server, with an internal RMI registry bound to port 2002, is running on the remote host. This example also uses the -m option to include the arguments passed to the main method of each of the listed Java applications.
jps -m remote.domain:2002 3002 /opt/j2sdk1.5.0/demo/jfc/Java2D/Java2Demo.JAR 3102 sun.tools.jstatd.jstatd -p 2002
- java - the Java Application Launcher
- jstat - the Java virtual machine Statistics Monitoring Tool
- jstatd - the jstat daemon
- rmiregistry - the Java Remote Object Registry
Copyright © 2003 Sun Microsystems, Inc. All Rights Reserved. |
Java Software |
<script src="http://java.sun.com/js/omi/jsc/s_code_remote.js"></script><script src="http://www-cdn.sun.com/share/metrics/metrics_group1.js"></script>
发表评论
-
How to be a Programmer: A Short,Comprehensive,and Personal Summary
2013-10-28 10:38 593well written. http://samizdat ... -
js module pattern
2013-10-12 16:21 419http://www.adequatelygood.com/ ... -
GZip compressing HTML, JavaScript, CSS etc. makes the data sent to the browser s
2013-07-31 15:48 668this is fun. http://tutorials ... -
java collection matrix
2012-08-07 11:24 750http://www.janeve.me/articles/w ... -
ghost text (aka in-field text)
2012-04-01 11:18 707http://archive.plugins.jquery.c ... -
What is Optimistic Locking vs. Pessimistic Locking
2011-09-09 16:50 842What is Optimistic Locking vs. ... -
what is DAO
2011-04-15 13:42 774http://java.sun.com/blueprints/ ... -
indenting xml in vim with xmllint
2011-01-10 09:48 712I added to my “.vimrc” file: ... -
css sprite
2010-12-15 16:57 679http://css-tricks.com/css-sprit ... -
最牛B 的 Linux Shell 命令
2010-10-30 00:08 717http://hi.baidu.com/hy0kl/blog/ ... -
GPS Bearing VS Heading
2010-10-21 15:40 1677http://gps.about.com/od/glossar ... -
Document Type Declaration
2010-07-19 22:01 835Document Type Declaration h ... -
XML Declaration must be the first line in the document.
2010-06-12 17:54 905The XML declaration typically a ... -
UCM
2010-05-08 11:41 749Two links about UCM The power ... -
What is an MXBean?
2010-01-28 11:10 780refer to http://weblogs.java. ... -
why wait() always in a loop
2010-01-19 00:17 846As we know ,jdk API doc suggest ... -
Locks in Java
2010-01-18 22:48 942copied from http://tutorials.je ... -
My first error of Hello Wolrd Struts
2010-01-04 09:10 868It's my first time to touch Str ... -
Unit Testing Equals and HashCode of Java Beans
2009-12-29 10:07 1316copy from http://blog.cornetdes ... -
communicate between plug-ins in different sandboxes
2009-12-17 21:17 684Given that there are many cases ...
相关推荐
Java长期运行后,jps等工具无法连接jvm的原因和解决方法 Java长期运行后,jps等工具无法连接jvm是一个常见的问题,很多开发者都曾经遇到过这种情况。这种情况的出现使得故障诊断变得非常困难。那么,究竟是什么原因...
JVM性能调优监控工具jps、jstack、jmap、jhat、jstat使用详解 本文将对一些常用的 JVM 性能调优监控工具进行介绍,包括 jps、jstack、jmap、jhat、jstat 等工具的使用详解。这些工具对于 Java 程序员来说是必备的,...
JPS(Java Process Status Tool)是 Java 虚拟机的进程状态工具,用于显示当前 Java 进程的信息。然而,在某些情况下,JPS 命令可能不可用,导致无法查看 Java 进程的信息。 导致 JPS 不可用的原因可能是因为环境...
在编程和系统开发过程中,我们可能会遇到一个常见的错误——"Address already in use: JVM_Bind"。这个错误通常发生在尝试绑定一个已经被占用的网络端口时。本文将深入探讨这个问题,提供解决方案,并从源码角度解析...
jps 工具类似于 Unix/Linux 系统中的 ps 命令,用于列出本地或远程主机上正在运行的所有 Java 进程的 ID 和主类名或 JAR 文件名。这对于识别正在运行的 Java 应用程序非常有用,尤其是当系统中有多个 Java 进程时,...
在Windows操作系统中,我们可以使用`jps`命令,这是Java Virtual Machine Process Status Tool的一部分,用于显示正在运行的Java进程。打开命令行终端,输入以下命令: ``` jps -l ``` 这将列出所有JVM进程及其...
jps - JVM Process Status Tool **用途**:列出当前系统中正在运行的所有HotSpot虚拟机进程,并显示每个进程的PID及主类名。 **命令格式**: ``` jps [options] [hostid] ``` **执行示例**: ``` jps -l ``` **...
jps(Java Process Status)简单易用,用于列出系统中所有运行的JVM进程及其ID、启动路径等信息,是检查Java应用程序是否正常运行的快速方法。 8. **jstatd**: jstatd是JVM监控服务,它基于RMI(Remote Method ...
**JPS算法详解** JPS,全称Jump Point Search(跳跃点搜索),是一种优化的A*寻路算法,尤其适用于网格环境中的路径寻找。在游戏开发、机器人路径规划等领域,JPS能显著提高效率,降低计算量,同时保持路径质量。 ...
#### 一、jps (Java Virtual Machine Process Status Tool) `jps`是JDK自带的一个简单实用的工具,用于列出当前正在运行的所有Java应用程序的进程ID以及基本状态信息。其语法格式如下: ```shell jps [options] ...
**JPS(Jump Point Search)A*跳点搜索** JPS(Jump Point Search)是一种优化的路径搜索算法,它是A*算法的一种变体,专为网格环境中的路径规划设计。A*算法是广泛应用的最短路径查找算法,以其效率和准确性而闻名...
而JPS,全称Java Process Status,是Java应用程序的一种监控工具,主要用来查看运行在Java虚拟机(JVM)上的所有进程的状态。在电子地图服务中,JPS可能用于监控后台服务的运行状况,确保地图数据的实时更新、定位...
10. **JVM诊断工具**:JDK提供了丰富的命令行工具,如jps(Java进程查看)、jstat(统计JVM各种数据)、jmap(内存映射工具)、jhat(堆转储分析)、jconsole(GUI监控工具)等,用于监控和诊断JVM的运行状态。...
kotlin-jps-plugin.jar
JDK提供了一系列的工具,如jps(Java进程查看)、jstat(统计信息)、jmap(内存映射)、jhat(堆分析)、jstack(线程堆栈快照)等,用于监控JVM的状态、分析性能问题和排查错误。 七、JVM内存模型 Java内存模型...
### JVM学习笔记(一) #### 一、JVM概述与工具使用 JVM(Java Virtual Machine)是Java语言的核心组成部分之一,它为Java程序提供了一个跨平台的运行环境。本篇学习笔记主要介绍如何利用一系列工具来查看和监控JVM...
2. **jps**: 显示当前Java进程中JVM的PID。 3. **jmap -heap PID**: 查看指定PID的JVM堆内存详细信息。 4. **jstat -gcutil PID**: 每隔500毫秒打印一次指定PID的JVM的GC利用率信息。 - **Eden**: 新生代中的...
在现代的软件开发与运行环境中,Java虚拟机(JVM)的性能调优是非常重要的一环,特别是在处理大型应用程序或者服务时,合适的JVM调优能够显著提升系统性能和稳定性。本篇文档详细介绍了JVM调优工具的命令使用及其...
### JVM与Hadoop介绍 #### 一、Java虚拟机(JVM)概述 Java虚拟机(JVM)是执行Java字节码的虚拟机环境。它提供了一个独立于硬件平台的运行时环境,使得Java应用程序能够在任何支持JVM的操作系统上运行。 #### 二、...
jvm性能调优工具命令大全.zip jps jstat jmap jhat jstack jinfo jps JVM Process Status Tool GChisto jvisualvm ...