Collecting Host-side System Data
msprof supports the collection of host-side system data, including the CPU usage, memory usage, disk I/O usage, and network I/O usage. After the collection, it automatically parses the profile data and flush corresponding files to disks.
Command Example (Depending on AI Job Runtime Profiling)
Log in to the environment where the Ascend-CANN-Toolkit is located as the running user and run the profile data collection command after operations in Environment Setup are complete.
msprof --output=/home/projects/output --host-sys=cpu /home/projects/MyApp/out/main
Command Example (Depending on Ascend AI Processor System Data Collection)
Log in to the environment where the Ascend-CANN-Toolkit is located as the running user and run the profile data collection command after operations in Environment Setup are complete.
msprof --output=/home/projects/output --sys-devices=<ID> --sys-period=<period> --sys-hardware-mem=on --host-sys-pid=<pid> --host-sys=cpu
Command-line Options
Option |
Description |
Required/Optional |
Result File |
|---|---|---|---|
--host-sys |
Host-side system profile data collection option (or options separated by commas), selected from cpu, mem, disk, network, and osrt. To set this option, you must set host-sys-pid or pass a user application. The arguments are as follows:
Example: --host-sys=cpu,mem,disk,network NOTE:
|
Either --host-sys or --host-sys-usage must be specified. |
The CPU Usage level in msprof_*.json and the host_cpu_usage_*.csv file The Memory Usage level in msprof_*.json and the host_mem_usage_*.csv file The Disk Usage level in msprof_*.json and the host_disk_usage_*.csv file The Network Usage level in msprof_*.json and the host_network_usage_*.csv file The OS Runtime API level in msprof_*.json and the os_runtime_statistic_*.csv file |
--host-sys-usage |
Host-side system and process profile data collection option (or options separated by commas), selected from cpu and mem. If the host-sys-pid option is also configured, the CPU or memory usage of a specified process on the host is collected. The values are described as follows:
Example: --host-sys-usage=cpu,mem |
Either --host-sys or --host-sys-usage must be specified. |
CPU usage of processes on the host |
--host-sys-pid |
PID of the host-side application to profile. This option does not need to be set in collection depending on AI job runtime Profiling. |
Optional |
- |
--host-sys-usage-freq |
CPU and memory usage sampling frequency (Hz). Defaults to 50. Must be in the range [1, 50]. |
Optional |
- |