pretrace 0.4 review

Download
by rbytes.net on

pretrace is a preload library that allows specified (dynamically linked) applications to always be executed under a debugging environ

License: GPL (GNU General Public License)
File size: 7K
Developer: Rob Holland and Tavis Ormandy
0 stars award from rbytes.net

pretrace is a preload library that allows specified (dynamically linked) applications to always be executed under a debugging environment.

pretrace library allows you to specify the percentage of invocations which will be traced, to help you "keep an eye" on applications without bringing the machine to its knees.

To start using pretrace, add libpretrace.so to your /etc/ld.so.preload.

root# echo /lib/libpretrace.so >> /etc/ld.so.preload

You can now specify applications to trace in /etc/pretrace.conf, the format is one application per line, if you would like to specify a debugger append a colon, then the full path to the debugger and any arguments you would like to pass. If you do not specify a debugger, you get the default, strace, which saves the output to .logfile in the current working directory.

An optional number can be appended in the format %N, eg %50, to specify what percentage of invocations should be traced.

# this is a comment
/full/path/to/application[%percent][:/full/path/to/debugger [arg1 arg2 ...]]

An example pretrace.conf is provided with this distribution.

After modifying pretrace.conf, you should execute ptgenmap to generate a new map file, this is used to quickly parse the configuration file with minimal impact on initialisation time.

libpretrace is designed as a debugging utility for developers and auditors, and should not be used in a production environment.

pretrace 0.4 search tags