Intel® Inspector User Guide for Linux* OS

ID 767796
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Saving and Formatting Reports from the Command Line

By default, a report is written to stdout in text format, but the Intel Inspectorinspxe-cl command provides a number of options you can use when generating a report.

Saving a Report to a File

To save a report to a file, you must use the report-output option when generating a report, and specify a pathname for the output file. By default, most reports are saved as a text file, but you can also choose CSV or XML. Whichever file type you choose, filtering and sorting options are available for formatting your report.

Example

Generate a status report from the most recent result and save it as status-report.txt file in the current working directory.

$ inspxe-cl -report status -report-output status-report.txt

Generating a Report in CSV File Format

Use the format option with the CSV format.

If you choose the CSV format and want to use a delimiter other than the default comma, you must use the csv-delimiter option to specify either a comma or tab delimiter.

CSV Report Example

Generate an observations report in CSV format using tab delimiters, and save it as observations.csv.

$ inspxe-cl -report observations -format csv -csv-delimiter tab -report-output ./out/observations.csv

Sorting Report Data

There are a pair of options that you can use to sort report data: sort-asc and sort-desc. Use the sort-asc action-option to organize a report in ascending order of the specified field(s), or use sort-desc to sort it in descending order. You can specify up to three different fields.

Data Sorting Example

Generate a problems report from the most recently collected result, and display the problems by line number in ascending order.

$ inspxe-cl -report problem -sort-asc line

Filtering Report Data

You can filter a report by specifying columns and values that should be included or excluded, and these can be used singly or in combination.

Syntax

-filter | -f <column_name> = <value>

To display data that equals the specified values only, run the amplxe-cl command with the report action and filter option as follows:

$ inspxe-cl -report <report_type> -filter <column_name> = <value>

where

  • <column_name> is the column name (module, function, and so on)

  • <value> is the value to include

Specify multiple filter items by using multiple -filter option attributes.

NOTE:
  • Multiple values for the same column are combined with 'OR'.

  • Values for different columns are combined with 'AND'.

Report Filtering Examples

Generate a Problems report that only includes problems in the source file combine.cpp that have not yet been investigated.

$ inspxe-cl -report problems -filter source=combine.cpp -filter investigated=not_investigated

Generate a Problems report, filtering it so that only critical problems are reported.

$ inspxe-cl -report problems -user-data-dir "My Inspector Results - myProjectName" -f severity=critical