pldd
List shared libraries linked to a process
SYNOPSIS
pldd <pid>
PARAMETERS
<pid>
The process ID of the target process whose loaded dynamic libraries are to be listed. This is a mandatory argument.
--help
Displays a brief usage message and exits.
--version
Shows the version information of the pldd utility and exits.
DESCRIPTION
pldd (Print Loaded Dynamic Libraries) is a utility that displays the shared libraries currently loaded by a specified running process. It takes a process ID (PID) as an argument and outputs a list of the dynamic libraries, along with their memory addresses, that the process is actively using.
This command is particularly useful for debugging, understanding application dependencies, and analyzing which libraries a running application is linked against without the need to stop or restart the application. It provides a quick snapshot of a process's live library landscape, making it invaluable for diagnosing linking issues or resource consumption.
CAVEATS
- Permissions: To use pldd, you must have sufficient permissions to read the
/proc/<pid>/maps
file for the target process. This typically means you must be the owner of the process or have root privileges. - No Dependency Tree: Unlike ldd, pldd does not show the dependency tree of libraries (i.e., which libraries are loaded by other libraries). It only lists the libraries directly mapped by the process.
HOW IT WORKS
pldd functions by parsing the /proc/<pid>/maps
pseudo-file for the specified process ID. This file contains a comprehensive list of memory regions mapped by the process, including executable code, data, stack, heap, and shared libraries. pldd specifically extracts entries that correspond to shared object files (typically ending in .so
) and, in some cases, the executable itself, presenting them in a user-friendly format, showing the library's path and its loaded memory address within the process's virtual address space.
HISTORY
pldd is typically distributed as part of the procps-ng suite of utilities, which provides a wide range of tools for monitoring and interacting with processes on Linux systems. Its development parallels the evolution of the /proc
filesystem as a rich source of process information. While not as historically prominent as commands like ps or top, pldd emerged as a specialized and convenient way to inspect live process library usage without resorting to manual parsing of /proc
files or using more general-purpose tools like lsof.