Intel® Trace Analyzer and Collector User and Reference Guide

ID 767272
Date 10/31/2024
Public
Document Table of Contents

stftool Utility

Synopsis

stftool <input file> <config options>
--help
--version

Description

The stftool utility program reads a structured trace file (STF) in normal or single-file format. It can perform various operations with this file:

  • Extract all or a subset of the trace data (default)

  • Convert the file format without modifying the content (--convert )

  • List the components of the file (--print-files)

  • Remove all components (--remove)

  • Rename or move the file (--move)

  • List statistics (--print-statistics)

The output and behavior of stftool is configured similarly to Intel® Trace Collector: with a configuration file, environment variables, and command-line options. The environment variable VT_CONFIG can be set to the name of an Intel® Trace Collector configuration file. If the file exists and is readable, then it is parsed first. Its settings are overridden with environment variables, which in turn are overridden by configuration options on the command line.

All configuration options can be specified on the command line by adding the prefix '--' and listing its arguments after the keyword. The output format is derived automatically from the suffix of the output file. You can write to stdout by using '-' as the filename; this defaults to writing ASCII VTF*.

These are examples of converting the entire file into different formats:

stftool example.stf --convert example.avt # ASCII
stftool example.stf --convert - # ASCII to stdout
stftool example.stf --convert - --logfile-format SINGLESTF | gzip -c >example.single.stf.gz # gzipped single-file STF 

Without the --convert switch one can extract certain parts, but only write VTF:

stftool example.stf --request 1s:5s --logfile-name example_1s5s.avt # extract interval as ASCII

All options can be given as environment variables. The format of the configuration file and environment variables are described in more detail in the documentation in the Configuration Reference section.