Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Install

(For Java11at least version 1.5 is needed) Download Async Profiler from: https://github.com/jvm-profiling-tools/async-profiler

...

Code Block
echo 1 > /proc/sys/kernel/perf_event_paranoid
echo 0 > /proc/sys/kernel/kptr_restrict 



Usage


Find the HiveMQ process id (must be user root or user hivemq)

...

Code Block
/opt/async-profiler/profiler.sh -d 600 -f /opt/hivemq/flamegraph.svg `ps -u hivemq -o pid=`


Kubernetes / Docker

As usual, container platforms have some paranoid settings that are read-only. On the up side, we can leverage the fact that HiveMQ is always PID 1 in containers (unless shared namespaces are used in K8s):

...

Then use kubectl cp or docker cp to copy the graph from the container.

systemd

Alternative: When using systemd, you can simply use 

...