Analyzer get-dlopen-libs

Name

get-dlopen-libs - Get libraries loaded by dlopen

This analyzer monitors and captures dynamic library loading operations performed via the dlopen system call across all application stacks. It identifies shared libraries that are dynamically loaded at runtime, which are not visible through standard ldd analysis. In exe mode, XRay flame graph analyzers by default only use ldd to obtain statically linked libraries. This analyzer is essential for discovering dlopen-loaded libraries to ensure complete stack trace resolution. The results are cached in /var/lib/orxray-agent/cache/ as $SHA256.libs files and automatically used by subsequent flame graph analyzers. For example, in exe mode, running this analyzer before executing c-on-cpu ensures complete call stack capture. The analyzer outputs one shared library path per line, helping diagnose missing symbols and incomplete call stacks in performance profiling.

Resource Category

Miscellaneous.

Application Type & Technical Stack

  • All

Command Line Syntax

The analyzer can be invoked directly on the command-line via the orxray utility from the openresty-xray-cli software package.

Alternatively, the analyzer can also be invoked manually or automatically on the web console UI of OpenResty XRay (like on the Advanced web page).

# PID is the target process PID.
orxray analyzer run get-dlopen-libs -p PID

# trace a shell command directly
orxray analyzer run get-dlopen-libs -c SHELL_CMD

# PGID is the process group ID or any process's PID within the target process
# group.
orxray analyzer run get-dlopen-libs -p -PGID

# trace any processes started from the specified executable path.
orxray analyzer run get-dlopen-libs --exe /path/to/exe/file

Tracing Multiple Processes

Supported.

Output Formats

  • Tables
  • Plain Texts

Author

The OpenResty Inc. Team.

Copyright (C) by OpenResty Inc. All rights reserved.