Help correlating linux system PIDs with java threads

  • Platform information:
    • Hardware: RPi 3B
    • OS: up-to-date openHABian
    • JVM: OpenJDK Client VM version 25.152-b76
    • Version: 1.8.0_152
    • Vendor: Azul Systems, Inc.
  • Memory:
    • Current heap size: 146,025 kbytes
    • Maximum heap size: 243,520 kbytes
    • Committed heap size: 243,520 kbytes
  • openHAB version: 2.5.0 SNAPSHOT #1480

I am trying to track down the specific java thread(s) responsible for intermittent high CPU utilization on my system. I can easily get the linux system PID for that thread, but I am unable to correlate that PID with a java thread. I have tried using: jstack <PID>, but I get the following error when doing so:

[09:21:33] root@rpi3:~# jstack 26068
26068: Unable to open socket file: target process not responding or HotSpot VM not loaded

Is there another way to correlate the linux system PID with a JVM thread?