usage: /usr/bin/pstack <[ exe ] <PID | core> >+
print a stack trace of PID or core. If specified, assume image was created from
execing `exe`, otherwise, the executable is inferred from the process or core
available options:
[-g|--debug-dir <directory>]
extra location to find debug files for binaries and shared libraries
[--exe-dir <directory>]
extra location to find executables and shared libraries
[--build-id-exepath <directory>]
extra location to find executable files from their build-ids
[--build-id-debugpath <directory>]
extra location to find debug files from their build-ids
[--no-buildid]
don't look up files by build id
[-b|--constant <delay>]
repeat pstack, with `delay` seconds between each iteration (can be non-integer)
[-d|--elf-dump <ELF file>]
dump details of an ELF image in JSON and exit
[-D|--dwarf-dump <ELF file>]
dump details of DWARF information in an ELF image in JSON and exit
[-r|--depth <depth>]
max depth when printing python structures
[-M|--max-frames <max frames>]
maximum number of stack frames to print for a thread
[--max-string <max string length>]
maximum length of strings printed from remote
[-h|--help]
generate this help message
[-a|--args]
attempt to show the value of arguments to functions
[-j|--json]
use JSON output rather than plaintext
[-s|--no-src]
don't include source info
[-v|--verbose]
more debugging data. Can be repeated
[-t|--no-threaddb]
don't use the thread_db functions to enumerate pthreads (just uses LWPs)
[-A|--all]
show both python and DWARF (C/C++/go/rust) stack traces
[-n|--no-ext-debug]
don't load external debugging information when processing
[-V|--version]
dump version and exit
[-m|--python-modules]
print contents of all python modules when tracing
[-p|--python]
print python stack traces
[-l|--locals]
print local variables (just python for now)
[-e|--executable <executable>]
executable to use by default
[-x|--command <command line>]
execute command line as subprocess, trace when it receives a signal
[-Y|--no-die-names]
do not use DIE names for functions
[--freeres]
free all memory at exit (useful for valgrind/heapcheck)
[--maxthreads <max-threads>]
maximum threads to display
[--clear-search-paths]
remove all default search paths for shared libraries and debug info
[-o|--output <output file>]
write output to <output file> instead of stdout
[-R|--debuginfod]
use debuginfod client
[--no-local-files]
don't assume local files match the process's view, and don't open them
Options (30)
| Option | Description | Source |
|---|---|---|
-a, --args | Attempt to show function argument values. | man |
-A, --all | Show both CPython and native DWARF stack traces. | man |
-b, --constant delay | Repeat the trace until interrupted, waiting delay seconds between iterations. | man |
-D, --dwarf-dump elf-file | Print DWARF information from elf-file as JSON and exit. | man |
-d, --elf-dump elf-file | Print ELF information from elf-file as JSON and exit. | man |
-e, --executable executable | Use executable as the executable image for subsequent PID or core operands. | man |
-g, --debug-dir directory | Add directory to the search path for debug files for executables and shared libraries. | man |
-h, --help | Print a usage summary and exit. | man |
-j, --json | Write stack traces as JSON rather than text. | man |
-l, --locals | Print local variables in Python stack frames. | man |
-M, --max-frames frames | Print at most frames stack frames for each thread. | man |
-m, --python-modules | Request the contents of Python modules while tracing. | man |
-n, --no-ext-debug | Do not load external debug information. | man |
--no-buildid | Do not search for executable or debug files by GNU build ID. | man |
--no-local-files | Do not assume files visible to the tracer match the target's view, and do not open local files. | man |
-o, --output file | Write normal output to file instead of standard output. | man |
-p, --python | Print stack traces from compatible CPython interpreters found in the target. | man |
-r, --depth depth | Set the maximum nesting depth when rendering Python values. | man |
-R, --debuginfod | Use the debuginfod client to fetch missing executable and debug files by build ID. | man |
-s, --no-src | Do not include source file and line information in stack frames. | man |
-t, --no-threaddb | Do not use thread_db to enumerate pthreads; | man |
-v, --verbose | Produce additional diagnostic output. | man |
-V, --version | Print the build version and exit. | man |
-x, --command command | Run command as a subprocess and trace it when it receives a signal. | man |
-Y, --no-die-names | Do not use DWARF DIE names for functions. | man |
--build-id-debugpath directory | Add directory to the build-ID search path for debug files. | man |
--build-id-exepath directory | Add directory to the build-ID search path for executable files. | man |
--clear-search-paths | Remove the built-in executable and debug-file search paths. | man |
--exe-dir directory | Add directory to the search path for executables and shared libraries. | man |
--freeres | Free all allocated memory before exit. | man |
Exit status (1) from the manual page
0 | success |