Collect Command - Collect Command - 57368

uProf User Guide

Document ID
57368
Release Date
2025-06-09
Revision
5.1 English

The Collect command is used to configure profiling and monitor raw events while the launched program is executing, the duration set expires or Ctrl+C key combination is hit.

The options listed in the following table can be preceded by a "collect" keyword for collection of profile data. To collect and generate metrics reports in a single step, the same options can be used with the collect keyword omitted. In this case, report command options are also supported.

The following table lists the collect command options.

Table 1. AMDuProfSys Collect Command Options
Option Description
-s, --config Collect data using predefined config files, ini files, or obfuscated file.
-a, --all-cpus Collect from all the cores.
Note: Options -C and –a cannot be used together.
-C, --cpu <CPUs>

List of CPUs to monitor. Multiple CPUs can be provided as a comma separated list with no space: 0,1.

Example of CPUs range: 0,5-10 (CPUs 0,5,6,7,8,9,10 are monitored)

-m, --metrics Collect user defined custom metrics through command line.
-d, --duration <DURATION (seconds)> Profile duration in seconds.
Note: This option will not work if a workload is passed as argument.
-D, --delay <DELAY (milliseconds)> Delay profile data collection in milli seconds
Note: If duration is set, profiling will start after the delay duration has elapsed.
-i, --input-file <INPUT_FILE> Path to INI file / YAML config file.
-o, --output-file <OUTPUT_FILE> Name of the output directory to be created by AMDuProfSys in which raw files and reports will be stored.
-t, --tid <tid> Monitor events on existing thread(s). Multiple TIDs can be provided as a comma separated list.
Note: It is available only on Linux.
-p, --pid <pid> Monitor events on existing process(es). Multiple PIDs can be provided as comma separated list.
Note: It is available only on Linux.
-I, --interval <INTERVAL (milliseconds)> Interval in milli seconds at which raw event count deltas will be stored in the file.
Note: Interval is required to be specified for collecting time-series data.
-V, --verbose Enable verbose mode to get detailed output.
--obfuscation Collect a large set of AMD-internal events using obfuscated raw events file. A usable report of this data can only be generated internally at AMD, not using distributed Public builds.
Note: -r is the shortcut option for Obfuscation.
--use-linux-perf This option can be used in Linux to collect the profile data using Linux Perf instead of AMDuProf driver.
--affinity <CPUs> Comma separated list of CPUs. Workload is run on the configured CPUs.
--mux-interval <MUX_INTERVAL (milliseconds)> Set the multiplexing interval for collection in milli seconds (requires root access with Linux Perf collector)
--export-session Create a compressed archive of the required session files with a detailed log-file.
--force Ignore errors raised to ensure optimal collection conditions and proceed with profiling.
Note: A prompt to use this option appears when certain errors occur.
--reset-hw-counters Resets the hardware counters before starting the collection.
--wait-for-signal Wait for SIGUSR1(Linux)/SIGBREAK(Windows) to start the collection, SIGINT to stop.
-g, --gen-raw-events Generate a raw config file using the provided INI file, which can subsequently be utilized for the Obfuscation feature.