📂 lsoph
TUI that lists open files for a given process — a live, colour-coded view of every file a program (and its children) touches, updated as it happens.
Usage:
uvx lsoph -p <pid> # attach to a running process (and its descendants)
uvx lsoph -c <command ...> # launch a command and monitor it
uvx lsoph -b <backend> ... # force a specific backend
Backends
lsoph auto-detects which backends are usable on your machine (the required tool must be installed, or a C compiler present) and picks the best available. There are two kinds:
- Tracers stream real file events — open, read, write, close, stat, rename, unlink — from an external tracing tool. Accurate and complete, but usually need privilege.
- Pollers snapshot each process's open files on an interval. Portable and low-privilege, but they miss short-lived files and can't see actual I/O.
| Backend | OS | Kind | Needs | Notes |
|---|---|---|---|---|
strace |
🐧 | tracer | ptrace (root to attach*) | default & best supported |
preload |
🐧😈 | preload | a C compiler (no root) | run mode only; LD_PRELOAD shim |
truss |
😈☀️ | tracer | privilege | FreeBSD / Solaris |
dtruss |
🍏😈 | tracer | root (+ SIP off on macOS) | DTrace-based |
ktrace |
😈 | tracer | privilege | OpenBSD / NetBSD / FreeBSD |
fs_usage |
🍏 | tracer | root | macOS |
etw |
🪟 | tracer | admin | ETW Kernel-File events |
psutil |
🐧🍏😈🪟 | poller | — | open files only |
lsof |
🐧🍏😈 | poller | — | open files only |
🐧 Linux · 🍏 macOS · 😈 BSD · ☀️ Solaris · 🪟 Windows
* Under the default kernel.yama.ptrace_scope=1, strace can only attach to
your own descendants. To attach to an arbitrary PID, run with sudo, lower the
scope, or setcap cap_sys_ptrace+ep $(command -v strace). Run mode (-c)
works without any of that.
The
strace,preload,psutilandlsofbackends are exercised on Linux. The BSD/macOS tracers (truss,dtruss,ktrace,fs_usage) are built and tested against their documented output formats but still want a smoke-test on real hardware — reports welcome.etwis built against the documented Kernel-File event layouts and smoke-tested under Wine (where the session APIs work but events don't flow); it wants validation on real Windows.
Future?
- Native Linux backends —
fanotify, or eBPF (bpftrace/ BCC) osquery— one polling backend, three OSesgdb/lldbdebugger-scripting backends (cross-platform, slow)DYLD_INSERT_LIBRARIESshim for macOS (the preload sibling)
Note: inotify is intentionally absent — it watches paths, not processes, and
doesn't report which PID caused an event. fanotify is the right Linux API.
Metadata
Release files for lsoph 0.2.1
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 | |
|---|---|---|---|---|
| lsoph-0.2.1.tar.gz | 92.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lsoph-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 207.5 kB
Release files / lsoph-0.2.1.tar.gz
| Download URL | lsoph-0.2.1.tar.gz |
|---|---|
| Size | 92.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7ebbd359619ee00247b9d22c61862e409c2d4f0e9f8d1658f3ecf2f486806994
|
|
BLAKE2b-256 checksum How to use checksums |
35ec9d0664f42415d2f862c3ebb5ecd4dc6b17f59b8dab4bdc8cae93748f11b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.22
|
Release files / lsoph-0.2.1-py3-none-any.whl
| Download URL | lsoph-0.2.1-py3-none-any.whl |
|---|---|
| Size | 114.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
458a53f4fb6c9a1d36ede185d6f382bb5ff565085e58be23bfdcc7beaddf2148
|
|
BLAKE2b-256 checksum How to use checksums |
b03edf6fa77d0e169caa7edad8da7c41c99250265a0f6eda6401fb0dcd881901
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.22
|
Security for lsoph 0.2.1
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.