Skip to content

Operation tracking

Will Korteland edited this page Dec 12, 2023 · 2 revisions

This operation tracking tutorial provides a general overview of operation tracking.

Enable operation tracking.

To enable operation tracking, you need to add the following option to your connection configuration string.

operation_tracking=(enabled=true,path=.)

For example, if you are running wtperf, you would add it to the conn_config string:

./wtperf –C "operation_tracking=(enabled=true,path=.)"

The "path" argument determines where the log files, produced by operation tracking, will be stored. Now you can run your workload.

Run your workload.

Now run your workload. You should see a bunch of files with names that look like:

optrack.00000<pid>.000000000<sid>

and the file

optrack-map.00000<pid>

where pid is the process ID, sid is the session ID.

These are binary log files.

Convert the binary files to text.

Use the script wt_optrack_decode.py in the WiredTiger tree. We will refer to the path to your WiredTiger tree as WT. Suppose that the process ID that generated the operation tracking files is 25660. Then you’d run the decode script like so:

% WT/tools/optrack/wt_optrack_decode.py -m optrack-map.0000025660 optrack.0000025660.00000000*

The output will be eponymous files with the .txt extension.