The hrt_ucp_monitor Tool Introduction
hrt_ucp_monitor is a tool for monitoring hardware IP usage and memory information. Supported IPs include BPU, DSP, GDC, STITCH, PYM, ISP, CODEC[ VPU (Video Process Unit and JPU) ]. When submitting tasks, UCP can specify the Backend for task deployment, which corresponds to the hardware supported by UCP.
Supported memory information includes DDR read and write bandwidth, ION memory, and process memory.
hrt_ucp_monitor tool is located in the samples/ucp_tutorial/tools path of the horizon_j6_open_explorer publication. The structure is as follows:
You can deploy the hrt_ucp_monitor to the development board using a deb deployment package method, or you can copy the hrt_ucp_monitor to the development board for use separately.
If the hrt_ucp_monitor is not located in the path specified by the PATH environment variable, you need to manually specify the tool's path, for example by executing ./hrt_ucp_monitor in the tool's directory. If you are prompted that there is no execution permission, you can first execute chmod +x ./hrt_ucp_monitor.
Parameters Description
Usage Instructions
Running hrt_ucp_monitor -h or hrt_ucp_monitor --help to obtain tool usage details, as shown in the following:
During the operation of hrt_ucp_monitor, you can early exit by pressing the Q key or exectuing CTRL+C.
Default Parameters
Overview
When running hrt_ucp_monitor without specifying parameters, it will use default parameters to run. By default, all hardware IPs are monitored,
the interactive mode is used, BPU and DSP samples are taken every 500 times per second, and the hardware IP utilization is refreshed every 1000ms.
Example
batch
Overview
In the batch mode, it is not supported to receive user keystrokes. Instead, each time hrt_ucp_monitor refreshed the data, it will output a new line and is suitable for redirecting data to a file.
Example 1: Output results in terminal
Example 2: Redirect output results to file.
delay
Overview
Refresh time for hardware IP usage, unit milliseconds, current supported setting range is [100, 10000]. If the setting time is not within the valid ranges, it will fail and print error prompt information.
Example
The refesh time is set to 3 seconds, indicating that the data will be refreshed every 3 seconds.
freq
Overview
Applicable only to BPU and DSP, used to control the status sampling frequency of hardware IP. Currently supported range is [10, 1000], indicating a minimum sampling of 10 times and a maximum of 1000 samples per second. Due to different statistical methods for utilization, other hardware IPs such as GDC, STITCH do not require setting a sampling frequency. When setting a refresh time, utilization data for the specified period will be obtained.
Example
Set the sampleling period for the busy state of BPU and DSP to 100 samples per second.
number
Overview
Specify the maximum refresh numbers for the hareware IP usage, and when the refresh numbers reaches the maximum numbers, the hrt_ucp_monitor will automatically exit.
You can also press CTRL+C to exit early.
Example
time
Overview
For specifying the tool running time in seconds, hrt_ucp_monitor will calculate the maximum refresh numbers based on the refresh time.
When the refresh numbers reaches the maximum refresh numbers, hrt_ucp_monitor will automatically exit.
You can also early exit by presing CTRL+C just like the number parameter.
The time and number parameters can not be set simultaneously, an error message will be prompted.
Example
The default refresh time of the tool is 1 second, and after running for 10 seconds, it will exit.
enable
Overview
You can set the hardware IP to be monitored, which will only monitor the data you care about and reduce the CPU usage of the tool.
Example
The tool will only output BPU usage data.
verbose
Overview
Display more detailed log information such as tool parameters during the operation of hrt_ucp_monitor.
Example

