git命令需要使用命令行开发者工具_java-性能调优命令行工具使用(jps....)

52085e315efe7dc8479e7723c138bc07.png

这篇仅仅记录参数使用,大多数还是需要自己琢磨

同时还需要坚持

:)

jps

C:Users98du>jps -help
usage: jps [-help]
       jps [-q] [-mlvV] [<hostid>]

Definitions:
    <hostid>:      <hostname>[:<port>]

C:Users98du>

参数说明

-q      : 进程id

-m      : 启动该进程所 输入执行的java 命令(不包含jvm参数)

-l      : 启动的jar文件名或者包类名

-v      : java进程启动参数(进jvm参数 不包含-m的输出)

-V      : 进程工具简写(默认该参数)

hostid这个参数需要为hostname, 而不是ip

jmap

C:Users98du>jmap -h
Usage:
    jmap [option] <pid>
        (to connect to running process)
    jmap [option] <executable <core>
        (to connect to a core file)
    jmap [option] [server_id@]<remote server IP or hostname>
        (to connect to remote debug server)

where <option> is one of:
    <none>               to print same info as Solaris pmap
    -heap                to print java heap summary
    -histo[:live]        to print histogram of java object heap; if the "live"
                         suboption is specified, only count live objects
    -clstats             to print class loader statistics
    -finalizerinfo       to print information on objects awaiting finalization
    -dump:<dump-options> to dump java heap in hprof binary format
                         dump-options:
                           live         dump only live objects; if not specified,
                                        all objects in the heap are dumped.
                           format=b     binary format
                           file=<file>  dump heap to <file>
                         Example: jmap -dump:live,format=b,file=heap.bin <pid>
    -F                   force. Use with -dump:<dump-options> <pid> or -histo
                         to force a heap dump or histogram when <pid> does not
                         respond. The "live" suboption is not supported
                         in this mode.
    -h | -help           to print this help message
    -J<flag>             to pass <flag> directly to the runtime system

C:Users98du>

参数说明

-heap       : 打印各进程的jvm参数配置, 同时会打印推荐配置

-histo      : 打印各个类的对象数及占用大小
-histo:live : 只计算活动的对象

-clstats    : 打印class加载的类..?

-finalizerinfo  : 打印正在gc的类.?

-dump
示例
C:Users98du>jmap -dump:format=b,file="D:testtest-jmapt.hprof" 18704
Dumping heap to D:testtest-jmapt.hprof ...
Heap dump file created

C:Users98du>

jstack

C:Users98du>jstack -h
Usage:
    jstack [-l] <pid>
        (to connect to running process)
    jstack -F [-m] [-l] <pid>
        (to connect to a hung process)
    jstack [-m] [-l] <executable> <core>
        (to connect to a core file)
    jstack [-m] [-l] [server_id@]<remote server IP or hostname>
        (to connect to a remote debug server)

Options:
    -F  to force a thread dump. Use when jstack <pid> does not respond (process is hung)
    -m  to print both java and native frames (mixed mode)
    -l  long listing. Prints additional information about locks
    -h or -help to print this help message

C:Users98du>

jconsole(图形化操作)

命令行或者win+r输入jconsole即可

5c8e2542965f61204f1237fc75ae0547.png

多看看吧, 兄die

感谢您的查阅, 文章来自自己公众号中的笔记,

首发链接​mp.weixin.qq.com

谢谢

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值