DFTracer Utility scripts¶
This section describes the utilities provided by DFTracer to assist users with logs.
All scripts are installed with DFTracer in the installation’s directories bin folder.
Merge Trace script¶
This script allows users to combine all pfw format into one. This has the following signature.
<install-dir>/bin/dftracer_merge [-fcv] [-d input_directory] [-o output_file]
Arguments for this script are
-d input_directory folder containing all trace files. Default PWD.
-o output_file file for storing merged file. Default combined.pfw.
-f override output file.
-c compress output file.
-v enable verbose mode.
-h display help
Compaction script¶
The script compacts all trace file and then divides the trace into equal file pieces.
<install-dir>/bin/dftracer_compact [-fcv] [-d input_directory] [-o output_directory] [-l num_lines] [-p prefix]
Arguments for this script are
-d input_directory specify input directories. Should contain .pfw or .pfw.gz files. Default PWD.
-o output_file specify output directory. Default combined.pfw.
-l num_lines lines per trace.
-p prefix prefix to be used for compact files.
-f override output directory.
-c compress output file.
-v enable verbose mode.
-h display help
Alternatively, the dftracer_compact_by_pid script can be used to compact trace files by process ID using the same set of parameters.
Sanitize script¶
The script sanitizes all trace file to mask non-utf characters.
<install-dir>/bin/usage: dftracer_sanitize [-fcv] [-d input_directory] [-o output_directory]
Arguments for this script are:
-f override output directory.
-c compress output file
-v enable verbose mode
-h display help
-d input_directory specify input directories. should contain .pfw or .pfw.gz files.
-o output_directory specify output directory.
Anonymize script¶
The removes system and file information from the trace and only maintain consistent hashes.
<install-dir>/bin/usage: dftracer_anonymize [-fcv] [-d input_directory] [-o output_directory]
Arguments for this script are:
-f override output directory.
-c compress output file
-v enable verbose mode
-h display help
-d input_directory specify input directories. should contain .pfw or .pfw.gz files.
-o output_directory specify output directory.
Create Index script¶
The script compresses and creates index for all dftracer traces
<install-dir>/bin/usage: dftracer_create_index [-fcv] [-d input_directory]
Arguments for this script are:
-f override indices.
-c compress input file
-v enable verbose mode
-h display help
-d input_directory specify input directories. should contain .pfw or .pfw.gz files.
Splitting DFTracer traces¶
The script splits the traces into equal sized chunk optimized for analysis
<install-dir>/bin/dftracer_split [-fv] [-n app_name] [-d input_directory] [-o output_directory] [-s chunk_size]
Arguments for this script are:
-n app_name specify app name.
-f override indices.
-s size chunk size (in MB)
-v enable verbose mode
-h display help
-d input_directory specify input directories. should contain .pfw or .pfw.gz files.
-o output_directory specify output directory.
Counting DFTracer traces’ events¶
The script will count number of valid events of traces
<install-dir>/bin/dftracer_event_count [-f] [-d input_directory]
Arguments for this script are:
-d input_directory specify input directories. should contain .pfw or .pfw.gz files.
-f force index creation
-h display help
Validating DFTracer traces¶
The script validates dftracer traces
<install-dir>/bin/dftracer_validate [-v] [-d input_directory]
Arguments for this script are:
1. -d input_directory specify input directories. should contain .pfw or .pfw.gz files. 3. -h display help
Parallel GZip¶
The script is a multi-threaded gzip utility for dftracer traces.
<install-dir>/bin/usage: dftracer_pgzip [-v] [-d input_directory]
Arguments for this script are:
-v enable verbose mode
-h display help
-d input_directory specify input directories. should contain .pfw or .pfw.gz files.
Sparse Git Clone¶
The script enables sparse git-clone of dftracer traces of the specified branch into the specified local directory. It optionally provides interactive selection of directories to clone.
<install-dir>/bin/usage: git_sparse_clone_interactive <remote repository> <branch> <local directory> [directory]
Arguments for this script are:
-r repository name name of remote repository
-b branch name name of remote branch
-l local directory name of local directory to clone into
-d directory optional comma-separated list of directories to sparse-clone.
Sparse Git Push¶
The script enables sparse git-push of dftracer traces to the specified remote repository and branch. It optionally provides interactive selection of directories to push.
<install-dir>/bin/usage: git_sparse_push_interactive <remote repository> <branch> [directory]
Arguments for this script are:
-r repository name name of remote repository
-b branch name name of remote branch
-d directory optional comma-separated list of directories to sparse-push.