Skip to content

Commit

Permalink
Update readme a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
dwoz committed Oct 26, 2023
1 parent 4661ffa commit 1f3e0b2
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@ packages.
On RPM based distributions you must install the salt-debuginfo and gdb system
packages.

Once you have the pre-requisists find the top level Salt process and pass it's
PID to the dbg.py script using Salt's python interpreter.
relenv-dbg will gather some general debugging information as well as the stack traces from each thread.

/opts/saltstack/salt/bin/python3 ./dbg.py <PID>
/opts/saltstack/extras-3.10/bin/relenv-dbg <pid>

The dbg.py script will use gdb to run gdb-command.txt the PID and all of it's
child processes. The output is saved to gdb-output.txt.
relenv-inject can be used to inject some python code into the running process.

If you have manhole installed you can write a script like this:

```manhole.py
import manhole
manhole.install()
```

/opts/saltstack/extras-3.10/bin/relenv-dbg <pid> manhole.py

0 comments on commit 1f3e0b2

Please sign in to comment.