Database Reference
In-Depth Information
Figure9-7.Invoking the dumpHeap operation on our Cassandra node
Open a new terminal and start up jconsole . You should see a pop-up box indicating that the
method was successfully invoked.
You can also get a heap dump file on a running process without the graphical interface using the
jmap tool that ships with the JDK. First, get your Cassandra instance's process ID. To get the
process IDs on a Linux system for programs, use the ps command and look for 'java'. Or, if you
have many Java processes running, you can find Cassandra more specifically by grepping for the
Cassandra daemon.
NOTE
You can find Cassandra's process ID on a Linux system by opening a terminal and using the ps com-
mand as follows:
$ ps -ef | grep 'CassandraDaemon'
Once you have the Cassandra process ID, we can use it to specify the heap we want to get a
snapshot of with the jmap tool. This is useful for finding out what's going on in a hung process,
locating the source of a memory leak, and so on.
Search WWH ::




Custom Search