ttrace - strace as a tree
Uses strace to trace a program call and displays what's going on in a human
friendly manner.
Installation and Usage
Install ttrace via pip:
[<python executable> -m] pip install [-U] ttrace
A new executable is then provided which can be used instead of strace:
ttrace [<ARGS>] <CMD>
Note that you would'nt provide strace arguments since ttrace provides them
automatically.
Alternatively you can clone and use the current development tree, see below.
Intended interface
The following commands and outputs reflect the current development plan:
ttrace <CMD|LOGFILE>
Prints annotated, pre-formatted and filtered output next to the process' original
stdout and stderr.
ttrace --attach <PID|NAME>
Attaches to the given process and displays all but stdout and stderr of the
process of course.
<CMD> | ttrace [<OTHER-ARGS>]
Same as with attach but using pipe semantics (limited due to the mixing of
stderr and strace output.
ttrace --grep <PATTERN> <CMD>
Applies pattern to the original strace output and only outputs the matching
content.
ttrace --tree <CMD>
Populates and displays a tree while the program is running.
ttrace --hybrid <CMD>
Not sure yet - plan is to have ncurses based split views for optionally any
of the following elements:
- tree output
- combined
stdoutandstderr - alternatively split
stdoutandstderr - strace console
- console with only warning character (whatever that means)
ttrace --timing <CMD>
ToDo for v1.0
- trace process termination
- output growing process tree
- report / visualize abnormal process termination
- report / visualize file access
- optionally turn PIDs into PID counters for comparability
- optionally print timestamp, pid, line number
- no color
- logging
Other ideas
- trace changes environment
- trace docker image usage
- highlight failed processes
Development & Contribution
pip3 install -U poetry pre-commit
git clone --recurse-submodules https://projects.om-office.de/frans/ttrace.git
cd ttrace
pre-commit install
# if you need a specific version of Python inside your dev environment
poetry env use ~/.pyenv/versions/3.10.4/bin/python3
poetry install
License
See License.md
Read
Metadata
Release files for ttrace 0.1.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ttrace-0.1.13.tar.gz | 13.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ttrace-0.1.13-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.5 kB
Release files / ttrace-0.1.13.tar.gz
| Download URL | ttrace-0.1.13.tar.gz |
|---|---|
| Size | 13.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
25e3c9a13ffd8a1fb21af16795a4bc39a2fd1dc83b38fc8e2120df5608d0a625
|
|
BLAKE2b-256 checksum How to use checksums |
bce979042f3212ba4c40d89c71e0bf39e6c689faf2b896e1229af5536f8a58ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.11.4 Linux/6.6.8-200.fc39.x86_64
|
Release files / ttrace-0.1.13-py3-none-any.whl
| Download URL | ttrace-0.1.13-py3-none-any.whl |
|---|---|
| Size | 13.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0eaf5e7824bc4ab1afc2153c1c7f597d0b03274d5a750735247e1f3815f3c7d8
|
|
BLAKE2b-256 checksum How to use checksums |
6c4504c176bbf95aacf8dd98a24eb22096f6a25dbac792bad85d673b96e44b7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.11.4 Linux/6.6.8-200.fc39.x86_64
|
Security for ttrace 0.1.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.