| Crates.io | rstrace-cuda-sniff |
| lib.rs | rstrace-cuda-sniff |
| version | 0.10.0 |
| created_at | 2025-03-02 18:12:05.116072+00 |
| updated_at | 2025-09-01 15:33:40.103658+00 |
| description | A utility crate for rstrace to sniff CUDA API calls. |
| homepage | https://github.com/thundergolfer/strace-rs |
| repository | https://github.com/thundergolfer/strace-rs |
| max_upload_size | |
| id | 1574778 |
| size | 27,007 |
rstrace is a Rust implementation of strace for x86 Linux. It allows the user to trace system calls of a process or command.
Unlike strace it can introspect NVIDIA CUDA system calls.
[!NOTE] Currently only x86 Linux is supported. aarch64 support is planned, but MacOS support is out-of-scope.
curl -LsSf https://rstrace.xyz/install.sh | sh
cargo install rstrace
rstrace ls /tmp/
To get a quick overview, use rstrace --help
Usage: rstrace [OPTIONS] [ARGS]...
Arguments:
[ARGS]... Arguments for the program to trace. e.g. 'ls /tmp/'
Options:
-o, --output <OUTPUT> send trace output to FILE instead of stderr
-t, --timestamp... Print absolute timestamp. -tt includes microseconds, -ttt uses UNIX timestamps
-c, --summary-only Count time, calls, and errors for each syscall and report summary
-C, --summary like -c, but also print the regular output
-j, --summary-json Count time, calls, and errors for each syscall and report summary in JSON format
--tef Emit Trace Event Format (TEF) trace data as output
--verbose Output human readable information about CUDA ioctls.
--cuda Enable CUDA ioctl sniffing. [Requires 'cuda_sniff' feature]
--cuda-only Enable CUDA ioctl sniffing and disable all other output. [Requires 'cuda_sniff' feature]
-p, --attach <PID> Attach to the process with the process ID pid and begin tracing.
-f, --follow-forks Trace child processes as they are created by currently traced processes as a result of the fork(2), vfork(2) and clone(2) system calls.
--color Enable colored output (default)
-h, --help Print help
-V, --version Print version
cuda_sniff is an extension to strace-rs that allows the user to trace CUDA API calls. It is based on
https://github.com/geohot/cuda_ioctl_sniffer by George Hotz.
gvisor has an alternative implementation called ioct_sniffer which uses LD_PRELOAD to intercept calls,
unlike strace-rs which uses ptrace.
https://github.com/bpftrace/bpftrace
bpftrace which is a more powerful tracing tool with much lower overhead.