Capturing a Thread Dump and Collecting Support Files

To capture a thread dump to analyze a process, understand its flow, and determine if any threads were terminated and it's reasons, and collect necessary files, follow these steps:

  • Log in to the jumpbox where Privacera Manager (PM) is installed:
  • Run the following command to list all running pods in the specified namespace:
    Bash
     kubectl get pods -n <NAMESPACE>
    
  • Run the following command to open an interactive shell session inside the desired connector pod:
    Bash
    kubectl exec -it <POD_NAME> -n <NAMESPACE> -- /bin/bash
    
  • Once inside the pod, execute this command to list Java processes and their corresponding IDs:
    Bash
    ps -ef | grep java
    
  • Use the process ID obtained from the previous step to generate a thread dump:
    Bash
    jstack <processId> > /tmp/connector-thread-dump.txt
    
  • Create a directory to consolidate all the required files and copy the thread dump into it:
    Bash
    mkdir -p /tmp/connector-support-files
    cp /tmp/connector-thread-dump.txt /tmp/connector-support-files/
    
  • Copy the policysync.properties, connector.properties.If Smart Sync is enabled, also copy the connector-dynamic.properties file.
Bash
1
2
3
cp /workdir/connector/<CONNECTOR>/cust_conf/policysync.properties /tmp/connector-support-files/
cp ../connector/<CONNECTOR>/cust_conf/<DEPLOYMENT_NAME>/connector.properties /tmp/connector-support-files/
cp ../connector/<CONNECTOR>/cust_conf/<DEPLOYMENT_NAME>/connector-dynamic.properties /tmp/connector-support-files/

Note

Ensure to mask any sensitive information in these files.

  • Copy the logs of connector:
    Bash
    cp -r /workdir/policysync/logs /tmp/connector-support-files/
    
  • Navigate to the /tmp directory and create a zip file containing all the collected support files:

    Bash
    cd /tmp
    zip -r connector-support.zip connector-support-files
    
    Transferring and Submitting Files Once you have collected all the files, follow these steps to transfer them and create a support ticket:

  • Transfer the created zip file from the connector pod to your jump server:

    Bash
    kubectl cp <NAMESPACE>/<POD_NAME>:/tmp/connector-support.zip <SERVER_PATH>/connector-support.zip
    

  • Copy the zip file from the jump server to your local machine:
    Bash
    scp your_username@<JUMP_SERVER_IP>:<SERVER_PATH>/connector-support.zip <LOCAL_PATH>
    

Comments