---
name: "pstack"
section: "1"
platform: "linux"
package: "pstack"
version: "1.3.1-1+b1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/pstack"
---

# pstack(1)

print a stack trace of running processes

## NAME

pstack - print a stack trace of running processes

## SYNOPSIS

**pstack** pid \[...\]

## DESCRIPTION

**pstack** attaches to the active processes named by the **pid**s on the command line, and prints out an execution stack trace, including a hint at what the function arguments are.  If symbols exist in the binary (usually the case unless you have run [strip(1)](/strip/1.md)), then symbolic addresses are printed as well.

If the process is part of a thread group, then **pstack** will print out a stack trace for each of the threads in the group.

## RESTRICTIONS

**pstack** currently works only on Linux, only on an x86 machine running 32 bit ELF binaries (64 bit not supported).  Also, for symbolic information, you need to use a GNU compiler to generate your program, and you can't strip symbols from the binaries.  For thread information to be dumped, you have to use the debug-aware version of the LinuxThreads libpthread.so library. (To check, run [nm(1)](/nm/1.md) on your pthreads library, and make sure that the symbol "\_\_pthread\_threads\_debug" is defined.) Threads are not supported with the newer NPTL libpthread.so library.

## SEE ALSO

[nm(1)](/nm/1.md), [ptrace(2)](/ptrace/2.md)

## AUTHORS

Ross Thompson \<ross@whatsis.com\>

Red Hat, Inc. \<http://bugzilla.redhat.com/bugzilla\>
