Trace Library Calls With ltrace
Log dynamic library calls and summarize where time goes.
Run ltrace -c ./program to print a summary of library calls and their times.
01Command
Command
$ ltrace -c ./my-program02What it does
ltrace intercepts calls into shared libraries such as malloc, strlen and printf, complementing strace's syscall view. It answers questions about allocation and string handling that source inspection cannot, and is a terminal-native diagnostic.
03Risk
!Warning: Only works for dynamically linked binaries, and output can be very large on busy programs.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- ltrace.1.en.html manual page (Debian bookworm)Evidence: Documents ltrace and the -c summary option.
Last verified: 2026-10-13 · Category: Developer
06Related solutions
Inspect HTTP response headers with curl
Send a HEAD request to any URL and print the status line, server, content type, caching, and redirect headers.
Search text recursively in a directory with grep
Find every occurrence of a pattern across all files in a tree, printed as file:line:number matches.
Create an SSH key pair with ssh-keygen (Ed25519)
Generate a modern Ed25519 public/private key pair in ~/.ssh for authenticating to servers and Git platforms without passwords.