rr(1)
β¨ NAME β¨
rr β record and replay application execution π
π SYNOPSIS π
rr dump [<options>] [<trace-dir>] [<event-specs>]
rr gdbinit
rr help [<command>]
rr ps [<trace-dir>]
rr record [<options>] <executable> [<exe-args>]
rr replay [<options>] [<trace-dir>]
π¦ DESCRIPTION π¦
okay so bestie, rr records an application's execution and then lets you replay it. literally time travel but for processes. no cap. π°οΈβ¨
Below are the options, grouped by vibe. The common ones work everywhere, and then each subcommand has its own little stash of flags. π
π Common options π
-A <name>,--microarch=<name>β forcesrrto pretend it's running on a CPU whose microarch is name, even when runtime detection is out here saying otherwise. name should be a string likeIvy Bridge. it's giving "trust me bro, I know my CPU" π§-C {on-syscalls,on-all-events,<from-time>},--checksum={on-syscalls,on-all-events,<from-time>}β compute and store checksums (while recording) or read and verify them (while replaying) for every one of a tracee's memory mappings. when do they get checked? your choice: at the end of all syscalls (on-syscalls), at all events (on-all-events), or starting from a global timepoint from-time. pick your fighter βοΈ-D {<syscall-num,-<signal-num>},--dump-on={<syscall-num,-<signal-num>}β dumps memory at a syscall or signal into the filetid.time_{rec,rep}inside trace-dir._recis for dumps during recording,_repis for dumps during replay. two eras, two suffixes π«Ά-F,--force-thingsβ forcesrrto do things that don't seem like good ideas, such as launching an interactive emergency debugger when stderr isn't a tty. chaos mode activated, proceed with caution π-K,--check-cached-mmapsβ verifies that cached task mmaps actually match/proc/maps. vibe check on your memory map π§-E,--fatal-errorsβ any warning or error that gets printed is treated as fatal. zero tolerance policy, periodt π«-M,--mark-stdioβ marks stdio writes with[rr <pid> <ev>], where ev is the global trace time at which the write happens and pid is the pid of the process it happens in. little receipts for every write π-N,--versionβ prints the version number and dips. bye bestie π-S,--suppress-environment-warningsβ suppresses warnings about issues in the environment thatrrhas no control over. not her fault, not her problem π-T <time>,--dump-at=<time>β dumps memory at global timepoint time πΈ-V,--verboseβ logs messages that may not be urgently critical to the user. the yapping setting, we love her π£οΈ-W <num-secs>,--wait-secs=<num-secs>β waits num-secs seconds right after startup, before kicking off recording or replaying. lil pause for dramatic effect βΈοΈ
π Syntax for record π
rr record [<options>] <executable> [<exe-args>]
-b,--force-syscall-bufferβ forces the systall buffer preload library to be used, even though that's probably a bad idea. bestie why π-c <num>,--num-cpu-ticks=<num>β the maximum number ofCPU ticks(currently retired conditional branches) a task gets to run before it gets interrupted. tick tock β°-e <num>,--num-events=<num>β the maximum number of events (syscall enter/exit, signal, CPU interrupt, ...) a task gets before it gets descheduled. event budget, spend it wisely ποΈ-i <signal>,--ignore-signal=<signal>β blocks signal from being delivered to tracees; probably only useful for unit tests. niche but iconic π§ͺ-n,--no-syscall-bufferβ disables the syscall buffer preload library even if it would otherwise be used. hard pass on the buffer π«-u,--cpu-unboundβ lets tracees run on any virtual CPU (the default is to bind to CPU 0). heads up though: this option can cause replay divergence, so use with caution β οΈβ¨-v <name>=<value>,--env=<name>=<value>β a value to add to the environment of the tracee; you can have any number of these. stack 'em up π₯
πΈ Syntax for replay πΈ
rr replay [<options>] [<trace-dir>]
-a,--autopilotβ replays without a debug server. she's got this, no copilot needed βοΈ-d <command>,--debugger=<command>β uses command as thegdb(1)command. bring your own debugger π-f <pid>,--onfork=<pid>β starts a debug server when pid has been forked and the target event has been reached. new process just dropped πΆ-g <event-num>,--goto=<event-num>β starts a debug server on reaching event-num in the trace; peep-Min the general options for the deets. fast travel to an event π-p {<pid>,<command>},--onprocess={<pid>,<command>}β starts a debug server when pid or command has been exec'd and the target event has been reached. exec'd means it's main character time π¬-q,--no-redirect-outputβ doesn't replay writes to stdout/stderr. silence, but make it intentional π€«-s <port>,--dbgport=<port>β only starts a debug server on port; it won't automatically launch the debugger client too. DIY debugger client, you got this π οΈ-t <event>,--trace=<event>β singlesteps instructions and dumps register states when replaying towards event or later. step by step, register by register π£-x <file>,--gdb-x=<file>β executesgdb(1)commands from file. scripted slay π
β Syntax for dump β
rr dump [<options>] [<trace-dir>] [<event-specs>]
Event specs can be either an event number like 127, or a range like 1000-5000. By default, all events are dumped. everything, everywhere, all at once π«Ά
-b,--syscallbufβ dumps syscallbuf contents. peek inside the buffer π§Ί-m,--recorded-metadataβ dumps recorded metadata. the lore, archived π-p,--mmapsβ dumps mmap data. memory map reveal π-r,--rawβ dumps trace frames in a more easily machine-parseable format instead of the default human-readable format. for the robots π€-s,--statisticsβ dumps statistics about the trace. numbers!! we love numbers π
π AUTHORS π
rr was written by Robert O'Callahan, Chris Jones, Nathan Froyd and others. legends, all of them π
This manual page was adapted from the help output by Stephen Kitt <skitt@debian.org>, for the Debian GNU/Linux system (but may be used by others). It was last modified for rr version 4.0.1. π«Ά
and that's the whole page bestie β <rainbow>rr - record and replay application execution</rainbow>, from November 2015, version 4.0.1, manual section rr(1). go forth and replay πππ¦
π¦ where this page comes from
- debian bookworm: rr 5.6.0-3+b1 Β· X11 AND BSD-2
- debian trixie: rr 5.9.0-3 Β· X11 AND BSD-2
- ubuntu jammy: rr 5.5.0-1build1 Β· X11 AND BSD-2
- ubuntu jammy: rr 5.5.0-1ubuntu0.1 Β· X11 AND BSD-2
- ubuntu noble: rr 5.7.0-2build1 Β· X11 AND BSD-2
- ubuntu noble: rr 5.7.0-2ubuntu0.24.04.1 Β· X11 AND BSD-2
- ubuntu questing: rr 5.9.0-3
- ubuntu resolute: rr 5.9.0-5 Β· X11 AND BSD-2
- ubuntu stonking: rr 5.9.0-9 Β· X11 AND BSD-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms