Produce a process tree from an strace log
Project description
Reads strace -f output and produces a process tree. Example
$ strace -f -e trace=process -s 1024 -o /tmp/trace.out make binary-package ... $ strace-process-tree /tmp/trace.out 25510 make binary-package ├─25511 /bin/sh -c 'dpkg-parsechangelog | awk '\''$1 == "Source:" { print $2 }'\''' │ ├─25512 dpkg-parsechangelog │ │ └─25514 tail -n 40 debian/changelog │ └─25513 awk '$1 == "Source:" { print $2 }' ├─25515 /bin/sh -c 'dpkg-parsechangelog | awk '\''$1 == "Version:" { print $2 }'\''' │ ├─25516 dpkg-parsechangelog │ │ └─25518 tail -n 40 debian/changelog │ └─25517 awk '$1 == "Version:" { print $2 }' ├─25519 /bin/sh -c 'dpkg-parsechangelog | grep ^Date: | cut -d: -f 2- | date --date="$(cat)" +%Y-%m-%d' │ ├─25520 dpkg-parsechangelog │ │ └─25525 tail -n 40 debian/changelog │ ├─25521 grep ^Date: │ ├─25522 cut -d: -f 2- │ └─25523 date --date=" Thu, 18 Jan 2018 23:39:51 +0200" +%Y-%m-%d │ └─25524 cat └─25526 /bin/sh -c 'dpkg-parsechangelog | awk '\''$1 == "Distribution:" { print $2 }'\''' ├─25527 dpkg-parsechangelog │ └─25529 tail -n 40 debian/changelog └─25528 awk '$1 == "Distribution:" { print $2 }'
Installation
Use your favourite pip wrapper to install strace-process-tree, e.g.
pipx install strace-process-tree
Synopsis
Usage: strace_process_tree.py [-h] [–version] [-v] filename
Read strace -f output and produce a process tree. Recommended strace options for best results:
strace -f -e trace=process -s 1024 -o FILENAME COMMAND
- positional arguments:
filename strace log to parse (use - to read stdin)
- optional arguments:
- -h, --help
show this help message and exit
- --version
show program’s version number and exit
- -v, --verbose
more verbose output
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
strace-process-tree-1.1.0.tar.gz
(19.9 kB
view hashes)
Built Distribution
Close
Hashes for strace-process-tree-1.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75d5e458620f1280a913b361c7bfca88e47dd85ff1b18720eaa93a8d3d9940e9 |
|
MD5 | 69fd5ecd532364dc8c99134616cdc672 |
|
BLAKE2b-256 | 79d8bfba822aee0ca73deadca59674065a9071c0829dc9a05df37578e8db6d16 |
Close
Hashes for strace_process_tree-1.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c68f498125e3515a6535c70644d5b3c2275cc8af1ab9dbeb7331685fcaf576c7 |
|
MD5 | 1daa8e55420e224b0c61fe9abc0cd381 |
|
BLAKE2b-256 | c4aaf1f1da3ca80c12837f77ac4a4c87378c087b79af26809bd6e8755ae288d1 |