Using the LiveRecorder tool¶
Depending on your license, LiveRecorder can be provided as a command-line tool
called live-record that allows you to record the execution of a
process on your Linux command line. This tool can be used a bit like the
strace tool on Linux, except that it makes LiveRecorder recordings instead
of printing system calls and signals.
The tool will be installed to your preferred location when you run
install, and usage notes are printed if you run live-record with
The LiveRecorder tool can be used both to launch a new process and to attach to an existing one.
You can launch a program with the path
path/to/program with program arguments
arg3, with the following command:
$> live-record path/to/program arg1 arg2 arg3
When your application terminates, live-record will write a recording
to a file whose name is printed to your terminal. If you wish to specify a
recording filename, use the
--recording-file option as follows:
$> live-record --recording-file my_recording.undo path/to/program arg1 arg2 arg3
Ordinarily recordings are always written when your application terminates. You
can use the
--save-on option to fine-tune the circumstances under
which the tool saves a recording. For example, if you want a recording to be
saved only if the application terminates abnormally in some way, either due to
being terminated by a signal or returning a non-zero exit status, use the
error value for the
$> live-record --save-on error --recording-file my_recording.undo path/to/program arg1 arg2 arg3
Alternatively, if you only want a recording file if your application terminates
due to a signal, use the
signal value for the
You can attach to an already running process by using the
option. For example, to attach to process 1234:
$> live-record --pid 1234
All options apply to both the launch and attach cases.
- -h, --help¶
Show help summary.
- -v, --version¶
Print version information and then exit.
- -p PID, --pid PID¶
Attach to the process
PIDand start recording it.
- -o FILENAME, --recording-file FILENAME¶
Save the LiveRecorder recording to
- --recording-dir DIRNAME¶
Save the LiveRecorder recording in the directory
DIRNAME. This is ignored if the
--recording-fileoption is given.
- --save-on CIRCUMSTANCE[,CIRCUMSTANCE,...]¶
Save only in the given circumstances, which must be one or more of:
Always save a recording. This is the default behaviour if the
--save-onoption is not given.
Save when live-record detaches from the program due to receiving
Save when the program exits with a non-zero status.
Save when the program exits due to an unhandled signal.
Save when the program exits with a zero status.
Save when the program does something that is not supported by live-record.
- --max-event-log-size SIZE[K|M|G]¶
Set the maximum event log size.
Enable Thread Fuzzing, which varies the scheduling of threads to attempt to provoke race conditions.
- --tmpdir-root DIRNAME¶
Set the directory used by live-record for its temporary files.
live-record has special handling for the following signals:
In the attach case, this signal causes live-record to detach from the target process, saving a recording if the
detach. In the launch case, this signal is delivered to the target process, and if it causes the target process to exit then live-record saves a recording if the
live-record detaches from the target process, saving a recording if the
This signal is delivered to the target process, and if it causes the target process to exit then live-record saves a recording if the
live-record exits cleanly without saving a recording, in both the attach and launch cases. The
--save-onoption is ignored.
As with tools like
strace(but unlike GDB), the path to the executable you wish to record must either be on your
PATH, or must be fully qualified.
In the launch case, live-record forks a daemon process to do the recording, and execs the target process. This means that the target process is a direct child of the shell which ran live-record.
The exit code of live-record is the exit code of the recorded program, unless live-record detaches on a signal as described above.
Your customer UID will be embedded in each recording created by live-record, and these recordings will only be loadable by a correspondingly licensed udb.
live-record does not always report errors very well. If live-record fails and does not appear to produce any useful output, please contact us at firstname.lastname@example.org.