Skip to main content

pystrace

Python library and command line tool for collecting strace events

Purpose

This library works as wrapper for strace generating syscall events, this events can be used by applications for system calls activity analisys.

In order to handle long executions without generating massive aummounts of logs, the library creates a named FIFO and an extra process where the strace is executed outputing to the FIFO. The main process consumes all the data and generates the corresponding events.

Install

pip3 install --user pystrace

How to use (Lib)

from pystrace import Tracer

def on_event(event):
    print(event)

my_tracer = Tracer(["id"], on_event, filter_syscalls="file", filter_return="successful")
my_tracer.run()

How to use (command ine tool)

pystrace -- command

Example:

# Trace only file related syscalls with successful result
pystrace -s file -r successful -- who

Metadata

Release files for pystrace 0.1.0

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

Source distribution (sdist)

Source distribution for pystrace 0.1.0
File Size Uploaded
pystrace-0.1.0.tar.gz 11.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pystrace 0.1.0
File Interpreter ABI Platform
pystrace-0.1.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 24.0 kB

Release files / pystrace-0.1.0.tar.gz

Download URL pystrace-0.1.0.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
100d90ed4b78142a3149e1f5a9f08da846b1563a8de08e88466da7fefa89a6f7
BLAKE2b-256 checksum
How to use checksums
2096e8ad4f1954dd60f3c2286632bc1492c77e469d17a7dc24c104f93a5cb1b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / pystrace-0.1.0-py2.py3-none-any.whl

Download URL pystrace-0.1.0-py2.py3-none-any.whl
Size 12.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
4dfcb31609101fbf1c75cf53d312d00f62a3111f463bfe2c5af5859db6424788
BLAKE2b-256 checksum
How to use checksums
af303fea2709e07a05e9531eb7cba00d8e12ebad843d6dfafc3dfa3a14b01bc7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

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