使用jrcmd来开始JRockit JVM的飞行记录

首先使用jps -mlv来查询正在运行的java 进程, jps命令在%java_home%/bin下可以找到。

使用jrcmd来启动飞行记录,示例如下,可以指定文件名,recording的名字以及持续时间
jrcmd 8756 start_flightrecording filename=c:\temp\xujin.jfr name=temp duration=5m 

详细参数说明如下:


Argument Description

compress: true

Directs the Flight Recorder to gzip the .jfr file on the disk.The default value is false.

defaultrecording: true

Enables a default recording. The default value is false.

delay

Sets the amount of time to elapse during run time before starting the recording.

duration

Sets the amount of time for the recording to run.

filename

Sets the name of the flight recording log file. This file will have the extension .jfr.

maxage

For time-bound recordings, sets the maximum amount of time a recording can last before that recording is flushed from the thread buffer to the global buffer.

maxsize

For size-bound recordings, sets the maximum size of a recording before that recording is flushed from the thread buffer to the global buffer.

name

Sets a recording identifier.

settings

Identifies the event settings file to use for the recording.



在记录过程中也可以使用check_flightrecording来查看状态,如下:

C:\Oracle\JDK\JRockit64\bin>jrcmd 8756 check_flightrecording
8756:
Recording : id=4 name="temp" duration=300s dest="c:\temp\xujin.jfr" compress=false (running)


也可以使用stop_flightrecording来停止一个飞行记录,如下:
jrcmd 8756 stop_flightrecording id=3
jrcmd 8756 stop_flightrecording name=temp






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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值