The hrt_ucp_monitor Tool Introduction

The 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.

The hrt_ucp_monitor tool resides in these paths of the horizon_j6_open_explorer publication:

  • Linux: samples/ucp_tutorial/tools
  • QNX: samples/ucp_tutorial/deps_qnx/ucp/bin

The structure is as follows:

	└── monitor
	   ├── hrt_ucp_monitor             # monitor tool

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.

Support Scope

Supported IPs include BPU, DSP, GDC, STITCH, PYM, ISP, VPU (Video Process Unit and JPU).

Supported memory information includes DDR read and write bandwidth, ION memory, and process memory.

How to use

Running hrt_ucp_monitor -h or hrt_ucp_monitor --help to obtain tool usage details, as shown in the following:

Usage:
hrt_ucp_monitor [Option...] [Parameter]

[Option]                      [Instruction]
---------------------------------------------------------------------------------------------------------------
-h --help                     Display this information
-v --verbose                  Show additional information
-V --version                  Output version information & exit

[Option]                      [Parameter]
---------------------------------------------------------------------------------------------------------------
-b --batch                    [null]  : Run in non-interactive batch mode, default is interactive mode.
-d --delay                    [int]   : Delay between updates in milliseconds, default is 1000 ms.
                                        parameter range: [100, 10000].
-f --freq                     [int]   : Sampling frequency, default is 500 samples/sec, only used for BPU and DSP.
                                        parameter range: [10, 1000].
-n --number                   [int]   : Specifies the maximum number of iterations, default is forever.
                                        parameter range: [1, INT32_MAX].
-t --time                     [int]   : Specifies the duration time in seconds, default is forever.
                                        parameter range: [1, INT32_MAX].
-e --enable                   [string]: Hardware IP to be monitored, valid values are "bpu, dsp, gdc,
                                        stitch, pym, isp, jpu, vpu", case insensitive. Multiple parameters are
                                        separated by comma.

During the operation of hrt_ucp_monitor, you can early exit by pressing the Q key or exectuing CTRL+C.

Parameters Description

ParameterData TypeParameter DescriptionCorrelated Parameters
-h, --helpNone.Display this information.None.
-v, --versionNone.Output version information & exit.None.
-v, --verbosestringDisplay more detailed log information such as tool parameters during the operation of hrt_ucp_monitor.None.
-b, --batchnullSpecified to run in non-interactive batch mode, which is the default mode for interactive mode.None.
-d, --delayintSpecify the update interval in milliseconds, with a default value of 1000 milliseconds and an effective range of [100, 10000].None.
-f, --freqintSpecify the sampling frequency,defaluting to 500 samples per second, 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.
None.
-n, --numberintSpecify the usage refresh rate, valid range is [1, INT32_MAX]. 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.If this parameter is set, the -t, --time parameter cannot be set. If they are set simultaneously, an error message will be prompted.
-t, --timeintSpecify the tool running time in seconds, valid range is [1, INT32_MAX].
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 press CTRL+C to exit early.
If this parameter is set, the -n, --number parameter cannot be set. If they are set simultaneously, an error message will be prompted.
-e, --enablestringSpecify the hardware IP to be monitored, valid values are bpu, dsp, gdc, stitch, pym, isp, jpu, vpu, case insensitive. Multiple parameters are separated by comma.None.