More jrcmd tricks (repost from old BEA blog)

I wrote earlier about the jrcmd tool that ships with JRockit. Here are some more tricks you can do with the tool.

Several commands at a time

You can stack a list of commands into a file and then run

jrcmd [pid] -f file.txt
to have all the commands executed at once. For example you can have the following commands in a file:
timestamp
print_object_summary
and JRockit will answer with both a timestamp and a histogram of the objects on the heap. You can then write a script to do this every minute or so and collect memory usage data over time to pin down a memory leak.

Commands to several processes at a time

Setting the process id to 0 (zero) will invoke the specified command on all running processes. This can be useful if, for example, you are running both a client and a server and you want to find out what both of them are doing this very second. Well, jrcmd 0 print_threads will tell you.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

A blog about the JRockit JVM and related topics

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today