System Recorder

An aircraft has a flight recorder and a car has a drive recorder. If a computer system has a similar mechanism to continuously record behavior of the system or its application program during a period of time (for example, file minutes), it is useful to find causes of system troubles. This mechanism is called "System Recorder" in the DEOS Project.

Some existing VMs (Virtual Machines) have the Record/Replay functionality. It is very effective as a system recorder, because it can replay the system execution, as well as recording the execution results of the system.

Even though replay cannot be done, ltrace/strace command on Linux may be used as a simple system recorder to record behavior of application programs. These commands record library calls or system calls of an application program and the record results are useful to analyze the application behavior. But, these commands are not supposed to run for a long time. Their output file may become very large when they are running for a long period. Also, a single process of the command may become a bottleneck of execution of a multi-process application program. We implemented a workaround for the problems in order to use the ltrace command as a System Recorder. The workaround (patch file) is published below.

Patch file for ltrace

In order to continuously use the ltrace command as a simple system recorder, a patch file for the ltrace source code is published here. Two functionalities are added: limitation of output file size and support of multi-process program.

Following two command options become available, when the patch file is applied to the source code of ltrace-0.5.3.

-m size
Limit maximum output file size in KByte. This is valid only when output file name is specified with the "-o" option.

The ltrace process forks and creates a child ltrace process, when a traced process forks. The "-f" option (trace child processes) is assumed to be specified. When the "-o FileName" option is specified together, output file names for child processes are "FileName.PID".


patch file for ltrace-0.5.3


Please follow the license of the ltrace.


Back to top