Skip to main content
https://github.com/mgedmin/strace-process-tree/actions/workflows/build.yml/badge.svg?branch=master

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 [-h] [–version] [-c] [-C] [-U] [-A] [-v] filename

Read strace -f output and produce a process tree. Recommended strace options for best results:

strace -f -ttt -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

-c, --color

force color output

-C, --no-color

disable color output

-U, --unicode

force Unicode output

-A, --ascii

force ASCII output

-v, --verbose

more verbose output

Metadata

Release files for strace-process-tree 1.5.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for strace-process-tree 1.5.3
File Size Uploaded
strace_process_tree-1.5.3.tar.gz 24.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for strace-process-tree 1.5.3
File Interpreter ABI Platform
strace_process_tree-1.5.3-py3-none-any.whl Python 3 none any Details

Total release size: 38.7 kB

Release files / strace_process_tree-1.5.3.tar.gz

Download URL strace_process_tree-1.5.3.tar.gz
Size 24.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e5a23ef9773b97b99383a7f0a30f085392848e23ba6431d9f8cc5f28238682d0
BLAKE2b-256 checksum
How to use checksums
1d37d7873ac68e9686166f29e19793d2569c1e120fa5c658402104a3377e38b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / strace_process_tree-1.5.3-py3-none-any.whl

Download URL strace_process_tree-1.5.3-py3-none-any.whl
Size 14.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d37a22dd87a89eecdbe054792791457746b432eac8942c49c7baf909efcc021
BLAKE2b-256 checksum
How to use checksums
708927810375a62269643802f4f0290fc6cbaaa6574f779ef9d355b0d22bdc09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

1.5.3 This release

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page