- 浏览: 748376 次
- 性别:
- 来自: 苏州
文章分类
最新评论
-
hsl313:
源码还有得下载吗?
利用AMF数据封装与Flash 进行Socket通讯 -
zhang5476499:
已看,谢谢讲解。
Mock单元测试 -
Buydeful:
...
关于JSP或HTML的命名规范 -
lliiqiang:
单一登陆最好采用踢掉方法,如果忘记退出,可以从别的地方控制方式 ...
Jquery选择器大全 -
lliiqiang:
web代码由后台动态生成,这种动态方式多种多样,多提供几种标准 ...
Jquery选择器大全
PARAMETERS
options
Command-line options.
hostid
The host identifier of the host for which the process report should be generated. The hostid may include optional components that indicate the communications protocol, port number, and other implementation specific data.
DESCRIPTION
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.
OPTIONS
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.
-q
Suppress the output of the class name, JAR file name, and arguments passed to the main method, producing only a list of local VM identifiers.
-m
Output the arguments passed to the main method. The output may be null for embedded JVMs.
-l
Output the full package name for the application's main class or the full path name to the application's JAR file.
-v
Output the arguments passed to the JVM.
-V
Output the arguments passed to the JVM through the flags file (the .hotspotrc file or the file specified by the -XX:Flags=<filename> argument).
-Joption
Pass option to the java launcher called by jps. For example, -J-Xms48m sets the startup memory to 48 megabytes. It is a common convention for -J to pass options to the underlying VM executing applications written in Java.
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
The communications protocol. If the protocol is omitted and a hostname is not specified, the default protocol is a platform specific, optimized, local protocol. If the protocol is omitted and a hostname is specified, then the default protocol is rmi.
hostname
A hostname or IP address indicating the target host. If hostname is omitted, then the target host is the local host.
port
The default port for communicating with the remote server. If the hostname is omitted or the protocol specifies an optimized, local protocol, then port is ignored. Otherwise, treatment of the port parameter is implementation specific. For the default rmi protocol the port indicates the port number for the rmiregistry on the remote host. If port is omitted, and protocol indicates rmi, then the default rmiregistry port (1099) is used.
servername
The treatment of this parameter depends on the implementation. For the optimized, local protocol, this field is ignored. For the rmi protocol, this parameter is a string representing the name of the RMI remote object on the remote host. See the -n option for the jstatd command.
OUTPUT FORMAT
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.
EXAMPLES
This section provides examples of the jps command.
Listing the instrumented JVMs on the local host:
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.
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.
options
Command-line options.
hostid
The host identifier of the host for which the process report should be generated. The hostid may include optional components that indicate the communications protocol, port number, and other implementation specific data.
DESCRIPTION
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.
OPTIONS
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.
-q
Suppress the output of the class name, JAR file name, and arguments passed to the main method, producing only a list of local VM identifiers.
-m
Output the arguments passed to the main method. The output may be null for embedded JVMs.
-l
Output the full package name for the application's main class or the full path name to the application's JAR file.
-v
Output the arguments passed to the JVM.
-V
Output the arguments passed to the JVM through the flags file (the .hotspotrc file or the file specified by the -XX:Flags=<filename> argument).
-Joption
Pass option to the java launcher called by jps. For example, -J-Xms48m sets the startup memory to 48 megabytes. It is a common convention for -J to pass options to the underlying VM executing applications written in Java.
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
The communications protocol. If the protocol is omitted and a hostname is not specified, the default protocol is a platform specific, optimized, local protocol. If the protocol is omitted and a hostname is specified, then the default protocol is rmi.
hostname
A hostname or IP address indicating the target host. If hostname is omitted, then the target host is the local host.
port
The default port for communicating with the remote server. If the hostname is omitted or the protocol specifies an optimized, local protocol, then port is ignored. Otherwise, treatment of the port parameter is implementation specific. For the default rmi protocol the port indicates the port number for the rmiregistry on the remote host. If port is omitted, and protocol indicates rmi, then the default rmiregistry port (1099) is used.
servername
The treatment of this parameter depends on the implementation. For the optimized, local protocol, this field is ignored. For the rmi protocol, this parameter is a string representing the name of the RMI remote object on the remote host. See the -n option for the jstatd command.
OUTPUT FORMAT
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.
EXAMPLES
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/jdk1.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/jdk1.5.0/demo/jfc/Java2D/Java2Demo.JAR 3102 sun.tools.jstatd.jstatd -p 2002
发表评论
-
转:Node.js 究竟是什么?
2011-09-05 09:19 1003简介 如果您听说过 ... -
Cache Insight
2011-05-25 17:31 1223http://www.iteye.com/topic/2172 ... -
Asynchronous innerHTML
2009-06-02 10:39 1089A recent question on Stack Over ... -
Fastest way to build an HTML string
2009-06-02 10:28 1153You have a massive array of ite ... -
JS字符串加不同浏览器比较
2009-05-06 09:03 1857function StringBuffer() { ... -
kestrel项目
2009-05-02 01:58 1563kestrel项目,用于MQ,twitter实现 scala语 ... -
Tomcat6安装版本参数修改
2009-04-14 13:41 1518tomcat6w.exe //ES//Tomcat6 -Xr ... -
jvm之JSTAT
2008-12-23 16:02 2986http://java.sun.com/javase/6/do ... -
jvm之JSTATD
2008-12-23 10:26 2613PARAMETERS options ... -
JVM监控工具介绍
2008-12-15 10:43 2994http://hqman.iteye.com/blog/167 ... -
java6性能
2008-12-10 10:55 1697J2SE 6(代号:Mustang野马 ... -
ApacheBench测试工具使用指南
2008-12-01 15:46 2269服务器负载太大而影响程序效率也是很常见的,Apache服务器自 ... -
关于fastcgi的一些摘录
2008-12-01 14:17 1495原讨论帖:http://www.iteye.com/topic ... -
基于等待的性能调优
2008-11-20 12:40 1092性能调优曾经是“艺术性”多于“科学性”,但是通过结合抽象分析和 ... -
Web 图片服务器
2008-08-25 14:11 2969http://www.yatan.com/group/topi ... -
图片加速
2008-08-18 11:43 1907不要GZIP图片,设置Cache 图片已经是压缩保存了的,GZ ... -
Ajax performance analysis
2008-07-22 11:28 1237http://www.ibm.com/developerwor ... -
HashMap和List的线程安全
2008-03-24 08:54 4620Map m =Collections.synchronized ... -
HTTP协议:304
2008-01-24 17:59 5932var r = new XMLHttpRequest(); ... -
【摘录】缓存
2008-01-21 10:37 1446robbin: 1、对象缓存 Java ...
相关推荐
JVM性能调优监控工具jps、jstack、jmap、jhat、jstat使用详解 本文将对一些常用的 JVM 性能调优监控工具进行介绍,包括 jps、jstack、jmap、jhat、jstat 等工具的使用详解。这些工具对于 Java 程序员来说是必备的,...
Tomcat 解决 JPS 不可用的问题 在编译安装 JDK 以后,如果原来的 OpenJDK 没有卸载完毕,就会存在两个 JVM 虚拟机,需要定义以下默认的 JVM。 在使用 Tomcat 服务器时,经常会遇到 JPS 命令不可用的问题。JPS...
在Java开发中,JVM(Java Virtual Machine)是运行所有Java程序的核心,它负责解析字节码并执行。为了确保应用程序高效稳定地运行,开发者需要对JVM进行监控,了解其内部状态,如内存使用、线程活动等。本文将探讨...
Java长期运行后,jps等工具无法连接jvm的原因和解决方法 Java长期运行后,jps等工具无法连接jvm是一个常见的问题,很多开发者都曾经遇到过这种情况。这种情况的出现使得故障诊断变得非常困难。那么,究竟是什么原因...
本文将深入探讨 VisualVM 及其集成的一系列命令行工具,包括 jps、jstat、jmap、jinfo、jstack 和 JConsole,帮助读者掌握 JVM 内存监控的核心技巧。 #### VisualVM:JVM 监控的全能工具 VisualVM 是一款功能强大...
10. **JVM诊断工具**:JDK提供了丰富的命令行工具,如jps(Java进程查看)、jstat(统计JVM各种数据)、jmap(内存映射工具)、jhat(堆转储分析)、jconsole(GUI监控工具)等,用于监控和诊断JVM的运行状态。...
利用JPS获取进程ID后,便可以通过JVM自带的jmap命令来进一步分析进程内存使用情况。jmap命令能够帮助开发者查看内存信息、实例个数以及占用内存的大小。具体使用方法如下: 1. jmap -histo <pid>:此命令可以查看...
JDK提供了一系列的工具,如jps(Java进程查看)、jstat(统计信息)、jmap(内存映射)、jhat(堆分析)、jstack(线程堆栈快照)等,用于监控JVM的状态、分析性能问题和排查错误。 七、JVM内存模型 Java内存模型...
jps - JVM Process Status Tool **用途**:列出当前系统中正在运行的所有HotSpot虚拟机进程,并显示每个进程的PID及主类名。 **命令格式**: ``` jps [options] [hostid] ``` **执行示例**: ``` jps -l ``` **...
JVM(Java Virtual Machine)是Java语言的核心组成部分之一,它为Java程序提供了一个跨平台的运行环境。本篇学习笔记主要介绍如何利用一系列工具来查看和监控JVM的各种运行时信息,包括但不限于JVM进程与参数查看、...
### JVM与Hadoop介绍 #### 一、Java虚拟机(JVM)概述 Java虚拟机(JVM)是执行Java字节码...同时,Hadoop作为一种分布式计算框架,与JVM紧密相连,利用JVM的强大功能处理大规模数据集,是大数据处理领域的关键技术之一。
- **加载**:将.class文件读入内存,并为之创建一个Class对象。 - **验证**:确保加载的类信息符合Java规范,避免安全问题。 - **准备**:为类的静态变量分配内存并初始化为默认值。 - **解析**:将符号引用转换...
3:JVM内存调优:JVM参数【标准参数、-X参数、-XX参数等】+常用命令【jps、jinfo、jstat、jstack、jmap】+常用工具【jconsole、jvisualvm、Arthas、MAT】+性能优化及总结+高并发场景分析+JVM性能优化指南。
2. **jps**: 显示当前Java进程中JVM的PID。 3. **jmap -heap PID**: 查看指定PID的JVM堆内存详细信息。 4. **jstat -gcutil PID**: 每隔500毫秒打印一次指定PID的JVM的GC利用率信息。 - **Eden**: 新生代中的...
JDK提供了一些JVM诊断工具,如jps(Java进程查看器)、jstat(统计监控工具)、jinfo(配置信息查询工具)、jmap(内存映射工具)和jhat(堆转储分析工具),帮助开发者定位和解决问题。 通过深入理解JVM的工作原理...
5. **性能调优**:JVM提供了丰富的命令行工具,如jps、jstat、jmap、jhat、jconsole等,用于监控和分析JVM状态。通过调整JVM参数(如-Xms, -Xmx, -XX:NewRatio等),可以优化内存分配、GC行为和线程设置,达到性能...
禁用这一特性可以避免此类问题,但同时也意味着不能使用jps或jstat等工具,而是需要依赖JMX来进行监控。 7. **-XX:-UseCounterDecay** - 默认情况下,每次GC后JIT编译器都会将调用计数器砍半,这可能导致一些方法...
本文介绍了两种常见的JVM性能调优监控工具——`jps`和`jstack`的基本使用方法及实际应用场景。这些工具可以帮助开发者快速定位问题所在,提高系统的稳定性和响应速度。此外,对于更复杂的性能问题,还可以结合其他...
jps(Java Process Status)简单易用,用于列出系统中所有运行的JVM进程及其ID、启动路径等信息,是检查Java应用程序是否正常运行的快速方法。 8. **jstatd**: jstatd是JVM监控服务,它基于RMI(Remote Method ...
而JPS,全称Java Process Status,是Java应用程序的一种监控工具,主要用来查看运行在Java虚拟机(JVM)上的所有进程的状态。在电子地图服务中,JPS可能用于监控后台服务的运行状况,确保地图数据的实时更新、定位...