[lhdop@blog ~]$ jps 20756 storeback-0.0.1-SNAPSHOT.jar 24235 Jps2,查看帮助
[lhdop@blog ~]$ jps --help usage: jps [--help] jps [-q] [-mlvV] [<hostid>] Definitions: <hostid>: <hostname>[:<port>] -? -h --help -help: Print this help message and exit.
说明:刘宏缔的架构森林是一个专注架构的博客,地址:https://www.cnblogs.com/architectforest
对应的源码可以访问这里获取: https://github.com/liuhongdi/
或: https://gitee.com/liuhongdi
说明:作者:刘宏缔 邮箱: 371125307@qq.com
[lhdop@blog ~]$ jps -m 20756 storeback-0.0.1-SNAPSHOT.jar --spring.config.location=/store/back/conf/application.yml 24141 Jps -m2,显示main函数的完整路径
[lhdop@blog ~]$ jps -l 24160 jdk.jcmd/sun.tools.jps.Jps 20756 /store/back/jar/storeback-0.0.1-SNAPSHOT.jar3,显示传递给虚拟机函数的参数
[lhdop@blog ~]$ jps -v 24179 Jps -Denv.class.path=.:/usr/local/soft/jdk-15/lib -Dapplication.home=/usr/local/soft/jdk-15 -Xms8m -Djdk.module.main=jdk.jcmd 20756 storeback-0.0.1-SNAPSHOT.jar -Xlog:gc*:/store/back/logs/gc_%t.log:time:filecount=10:filesize=10m4,三个参数可以合在一起用:
[lhdop@blog ~]$ jps -mlv 20756 /store/back/jar/storeback-0.0.1-SNAPSHOT.jar --spring.config.location=/store/back/conf/application.yml -Xlog:gc*:/store/back/logs/gc_%t.log:time:filecount=10:filesize=10m 24254 jdk.jcmd/sun.tools.jps.Jps -mlv -Denv.class.path=.:/usr/local/soft/jdk-15/lib -Dapplication.home=/usr/local/soft/jdk-15 -Xms8m -Djdk.module.main=jdk.jcmd
[lhdop@blog tools]$ java --version java 15 2020-09-15 Java(TM) SE Runtime Environment (build 15+36-1562) Java HotSpot(TM) 64-Bit Server VM (build 15+36-1562, mixed mode, sharing)