Table of Contents

Use a Profiler for troubleshooting a PhenixID application

How to Troubleshoot PhenixID Java Applications Using VisualVM, used for diagnosing performance-related issues when DEBUG or TRACE logs are not sufficient.

System requirements

  • PhenixID application installed. This works on all java based PhenixID products, PAS, PIM, PIP and SWF

  • All actions below must be carried out on the server

  • How to take a Snapshot Using VisualVM

    1. Download VisualVM
      Download the latest VisualVM (ZIP file) from:
      VisualVM: Download

    2. Download a JDK (if not already installed)
      VisualVM requires a JDK to run.
      We recommend downloading the latest JDK from Azul:
      Java 8, 11, 17, 21, 25 Download for Linux, Windows and macOS
      Download the ZIP version, extract it to e.g.:
      C:\temp\jdk for windows or /tmp/jdk in Linux

    3. Extract VisualVM
      Unzip the VisualVM package to a directory of your choice, for example:
      C:\temp\visualvm_<version> or /temp/visualvm_<version>

    4. Open Command Prompt

      As an administrator (Windows) or a terminal (Linux). In linux you need to be the user root or the user running the process. (sudo su - )

    5. Start VisualVM using the JDK
      Launch VisualVM and explicitly point to the JDK you downloaded:

      C:\temp\visualvm_<version>\bin>visualvm --jdkhome C:\temp\jdk or /temp/visualvm_<version>/bin>visualvm --jdkhome /temp/jdk

      On remote Linux, make sure that your X server is running and $DISPLAY variable is set correctly

    6. Locate Running Java Processes
      On the left-hand side, VisualVM will list all Java processes it can attach to. NA

    7. Open the Correct Process
      Double-click the process you want to troubleshoot.
      If you're unsure which one is correct, compare the Process ID (PID) with Task Manager (Windows) or ps -ef | grep java (Linux)

    8. Go to the “Sampler” Tab NA

    9. Open the Settings
      Check the settings checkbox to show the CPU sampling settings. NA

    10. Clear CPU Settings
      Remove everything in the CPU settings text field so that no filters are applied. NA

    11. Start CPU Sampling
      When you observe the problem in the application, fex unexplained high CPU load, click the CPU button to start sampling. NA

    12. Let It Run Briefly
      Let the sampler run for a few seconds during the period of high CPU usage.

    13. Stop the Profiler
      Click the Stop button to end profiling. NA

    14. Create a Snapshot
      Click the Snapshot button to generate a snapshot of the captured data NA

    15. Save and Export the Snapshot
      Save the snapshot using the save icon, then select Export Snapshot Data from the menu. NA

    16. Send Us the .nps File
      Provide the exported .nps file to PhenixID through any suitable method.