General Profiling Command

Function

The msprof command-line tool provides the capabilities of collecting and parsing the profile data during AI task running, system data of the AI processor, and other required data.

The general profiling command of msprof is used to query the basic information about profiling, including parameter description, AI task file, data storage path, and custom environment variables.

Command Format

Log in to the operating environment and run the following command in any directory:

In the following examples, the recommended method is used to avoid redundant information.

app Parameters

The user executable program and related parameters can be passed. The following are examples:

  • If abnormal symbols are found in the parameters, the parameters cannot be identified. It is recommended that you employ method 1 for user application passing. If method 1 is used and the user application command contains parameters that need to be enclosed in quotation marks, write the command to a shell script and run the shell script to add the user application command to the msprof command.
  • You are advised not to configure AI tasks in directories owned by other users or directories writable by other users to avoid privilege escalation risks. You are advised not to perform high-risk operations, such as deleting files or directories, changing passwords, and running privilege escalation commands. Do not use pmupload as the application name.
  • This parameter is required if you collect all profile data, profile data during AI task running, or msproftx data. This parameter is optional if you profile system data of the AI processor. This parameter is optional if you profile the host-side system data.

options Parameters

Example

Log in to the operating environment and run the following command in any directory:
msprof --output=/home/projects/output /home/projects/MyApp/out/main

After the msprof command is executed, the profile data file is automatically parsed and exported. For details, see Profile Data File References..