Collecting Logs

Table 1 describes the log parameters. Log parameters (such as file names) can contain only letters, digits, and special characters (-._,/=). For security purposes, the paths involved in Table 1 must meet the security requirements of your organization.

Table 1 Parameter description

Parameter

Description

Mandatory

--output-file=<FILENAME>

Specifies the output path and file name of the collected logs. The recommended file name extension is .tar.gz. If --output-file is not specified, the ascend-report-<hostname>-<YYYYMMDDhhmmss>.tar.gz file is generated in the current path by default. If only the name of the output file is specified but the output path is not specified, the file with the specified name is generated in the current path by default. The output path of collected logs cannot contain a large number of other files.

No

--safe

Invokes the ascend-dmi tool to check the device health status. In this case, the power consumption test is not performed. For more information about ascend-dmi, run the ascend-dmi -h command.

This option is enabled by default.

No

--extra

Invokes the ascend-dmi tool to check all check items. If the power consumption test is performed, the AI Core usage and processor temperature increase. After the collection is complete, the AI Core usage and processor temperature become normal. For more information about ascend-dmi, run the ascend-dmi -h command.

No

--modules=<MODULE>[,<MODULE>]...

Specifies the modules whose information is to be collected. Use commas (,) to separate multiple modules. The options are system, ascend, and mindx. For details about the mapping between the specified modules and the collected files, see Table 2.

By default, all modules are collected, which is equivalent to module=all. However, files with extra parameters can be collected only after the parameters are specified.

No

--ascend-path=<PATH>

Specifies the installation path of the Ascend software. The default path is /usr/local/Ascend. If the --extra parameter is used in an Atlas 500 AI edge station, you must configure --ascend-path=/opt/ascend/ to specify the CANN installation path.

No

--user=<USERNAME>

Specifies the user whose CANN logs are collected. This parameter is supported only for the root user and cannot be performed on the Atlas 200 AI accelerator module (RC).

This parameter and --user-log are mutually exclusive and cannot be used at the same time. If neither --user nor --user-log is specified, the user mode logs of the current user are collected by default in $HOME/ascend/log and /var/log/ascend_seclog.

NOTE:

--user is recommended.

No

--user-log=<USERLOG>

Specifies the directory from which cann logs are collected. The value can be /root/ascend/log or /home/ xxx /ascend/log. This parameter is supported only for the root user and cannot be performed on the Atlas 200 AI accelerator module (RC).

This parameter and --user are mutually exclusive and cannot be used at the same time. If neither --user nor --user-log is specified, the user mode logs of the current user are collected by default in $HOME/ascend/log and /var/log/ascend_seclog.

NOTE:

--user is recommended.

No

--sdk-log-path=<PATH>

Specifies the directory for storing SDK logs. Enter the actual directory for storing generated SDK logs.

You are advised to set this parameter to the minimum directory where the logs to be collected are located. If the directory is too large, all readable files in the directory will be collected, including a large amount of redundant information.

No

Table 2 Mapping between modules and files

Module

Collected File

Note

system

system-report.log.gz

-

ascend

ascend-report.log.gz, ascend_user_log.tar.gz, device_log.tar.gz, ascend_user_install_log.tar.gz, and YYYY-MM-DD-HH-MM-SS folder

  • ascend_user_log.tar.gz is collected and generated only when Ascend software logs exist.
  • The YYYY-MM-DD-HH-MM-SS folder is collected and generated only when the system-level device logs exist.

mindx

alog.tar.gz, plog.tar.gz, and mindx_sdk_info_*.tar.gz

The alog.tar.gz and plog.tar.gz files are collected and generated only when the logs of edge devices exist. The mindx_sdk_info_*.tar.gz file is collected and generated only when the path of SDK logs to be collected is specified.

Example

  • ascend-log-collect.sh (executed in default mode)

  • ascend-log-collect.sh --safe (executing in safe mode)

  • ascend-log-collect.sh --extra (executing in extra mode)

  • ascend-log-collect.sh --output-file=./result.tar.gz (specifying the output file)

  • (--modules=ascend): ascend-log-collect.sh --modules=ascend (collecting only the Ascend NPU health information and Ascend software logs)

  • ascend-log-collect.sh --user=HwHiAiUser (Specifying the user whose CANN logs are collected.)

  • ascend-log-collect.sh --user-log=/root/ascend/log (Specifying the directory from which CANN logs are collected.)

  • ascend-log-collect.sh --sdk-log-path=/home/ascend/cl/mxManufacture/logs (Specifying the directory for collecting SDK logs.)