常用命令

JPS 查询Java进程

命令格式:jps [options] [hostid]
[hostid]格式:
[protocol:][[//]hostname][:port][/servername]
[options]选项:

选项 说明
-q 只输出LVMID(进程号),省略主类的名称
-m 输出传递给 main 方法的参数。对于嵌入式 JVM,输出可能为 null
-l 输出主类的全名,如果进程执行的是jar包,这输出jar路径
-v 输出虚拟机进程启动时 JVM 的参数
-V Output the arguments passed to the JVM through the flags file (the .hotspotrc file or the file specified by the -XX:Flags= 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
实例:
1、命令行输入:jps
image
2、命令行输入:jps -l
image
2、命令行输入:jps -m
image
posted @ 2021-07-04 17:15  liuqIT  阅读(27)  评论(0)    收藏  举报