扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:中国IT实验室 来源:中国IT实验室 2007年8月24日
关键字:
用法
JRockit首先会在当前工作目录查找该文件。如果未找到,JRockit将在JVM目录中查找。如果仍然没有的话,JRockit将回退以生成一个常规的线程堆栈转储。JRockit将在每次按下ctrl-break时读取act文件,因此用户可以在方便时重新配置该文件,而同时JRockit仍在运行。
这里给出一个示例act文件,它首先打印时间戳,然后是用于启动JRockit的命令行,最后是一个线程堆栈转储。它还包括可以用于act文件的有用命令的列表:
# Example ctrlhandler.act file timestamp command_line print_threads stop # set_filename filename=<file> [append=true] # Sets the file that all handlers following this command will # use for printing. You can have several set_filename commands # in a file. It takes two arguments: filename and an optional # append to specify if you want to append to the file # or overwrite it. Default is to overwrite the file. # timestamp # Prints a timestamp. # print_threads # The normal thread dump. # verbosity [args=<components>] [filename=<file>] # Changes the verbosity level normally specified with -Xverbose. # version # Prints JRockit version information. # command_line # Prints the command line used to start JRockit. # print_object_summary # Prints heap usage statistics (how much heap is used per class), # together with a delta on how much this has changed since # the last invocation of this ctrl-break handler. # print_memusage # Prints a memory usage report of how JRockit is using # the memory. # heap_diagnostics # Prints a detailed report of the heap, including ascii graphics # over the heap layout. # print_class_summary # Prints all loaded classes. # print_utf8pool # Print all UTF8 strings. # jrarecording [filename=<file>] [time=<time>] [nativesamples=true] # Starts a JRA recording. # run_optfile [filename=<file>] # See OptFile. # start_management_server # Starts the new JMX-based management agent. # kill_management_server # Stops the management agent. # start_rmp_server # Starts the old management server (actually the listening # socket that in turn starts servers whenever a connection # is established). # kill_rmp_server # Stops the old management server (actually shuts down the # listening socket). The only reason it isn't named # kill_rmp_server is that stop is a reserved keyword # that stops the parsing of the act file. ;) # help [ctrl-break handler] # Prints all available ctrl-break handlers if no argument # is specified, or help for the specified ctrl-break handler. # memleakserver [port=<port>] # Toggles the memleakserver. If it hasn't been started # it will be started. If it has already started, it will be # shut down. The default port is 7095. # verbose_referents action=[heap|full|nursery|start|stop] # Print verbose reference information. # Parameters: # action=[heap|full|nursery|start|stop] # heap - trigger a heap collection and output reference # information # full - trigger a full heap collection (clears softly # reached soft referents) # nursery - trigger a nursery collection (heap collection # if running without nursery) # start - start writing reference information to default # verbose stream # stop - stop writing reference information # print_exceptions # exceptions=[true|all|false] stacktraces=[true|all|false] # Enable printing of Java exceptions thrown in the VM. # Parameters: # exceptions - print exceptions # stacktraces - print exceptions with stacktraces # At least one of the parameters is required. # Values for the parameters can be "true|all|false" # true - print all exceptions # except java/util/EmptyStackException, # java/lang/ClassNotFoundException and # java/security/PrivilegedActionException # all - print all exceptions # false - don't print exceptions # To turn exception printing off completely you need to set # exceptions = false even if it was turned # on by stacktraces = true. JRCMD 使用JRCMD实用工具是一种新的调用Ctrl-Break Handler的便捷方式,可在JRockit发行版的bin目录中找到它。 用法 jrcmd <PID> <command> <parameters>
JRCMD
使用JRCMD实用工具是一种新的调用Ctrl-Break Handler的便捷方式,可在JRockit发行版的bin目录中找到它。
用法 jrcmd <PID> <command> <parameters>
如果不指定选项(或者只指定-P),那么将显示运行在本地机器上的所有JRockit的进程ID。如果PID设为0,那么命令将发送给在本地机器上运行的所有JRockit JVM。
要列出特定的JRockit中有哪些Ctrl-Break Handler可用,可以使用help命令:
jrcmd <PID> help
要想获得某个具体的Ctrl-Break Handler的帮助信息,需要在help后添加Ctrl-Break Handler的名称,比如:
jrcmd 0 help kill_management_server
也可以使用JRCMD列出指定进程的性能计数:
jrcmd <PID> -l
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者