Obtain JVM thread dump

A thread dump contains information about active threads in the Replication Agent JVM and can therefore be useful in troubleshooting a Replication Agent deadlock or performance issue.

StepsObtaining a thread dump on a Windows machine:

  1. In the command window in which you started Replication Agent, press Ctrl-Break.

StepsObtaining a thread dump on a UNIX or Linux machine:

  1. Find the process ID of the JVM in which Replication Agent is running using ps and grep:

    %>ps -ef | grep RAX-15_5
    

    The e and f options show full output for every running process. The grep command will filter results on the string “RAX-15_5”. The result returned looks something like the following:

    sybase 12345 67890 0 14:21 pts/1 00:00:22 
       /software/sybase//RAX-15_5/JRE6/bin/java -server
    

    Here, 12345 is the process ID (PID) of the Replication Agent Java process.

  2. Terminate the process with the kill command and QUIT option:

    %>kill -QUIT pid
    

    where pid is the PID you obtained from the last step.

    NoteOn UNIX or Linux, it is customary to start the Replication Agent process in the background, therefore the console in which the Replication Agent process was started may no longer be available when you decide to obtain a thread dump. The JVM always prints a thread dump to the console in which the Replication Agent process was started, so you should always redirect process output to a file when you start Replication Agent. For example:

    %>RUN_inst_name >! output.txt
    

    where inst_name is the server name of the Replication Agent instance.