Log Processing Mechanism
Logs record the running process and exception information of the system and support troubleshooting in system running and program debugging during development.
- Collecting logs
On the device side, the log driver collects logs of non-Ctrl CPUs, and the sklogd and slogd processes collect logs of the Ctrl CPU.
On the host side, the sklogd and slogd processes collect kernel-mode and user-mode logs.
- Transmitting logs
The device transmits logs to the host through the driver, and the host receives logs through the log-daemon module.
- Saving logs to files
Logs on the device side are saved in log files prefixed with device-id and device-os-id by log-daemon. Logs on the host side are saved in log files prefixed with host-0 by the slogd and sklogd.
- Log files prefixed with device-id record logs of the non-Ctrl CPUs on the device side.
- Log files prefixed with device-os-id record logs of the Ctrl CPU on the device side, including user-mode logs and kernel-mode logs.
- Symmetric Multi-Processing (SMP): In AI Server (8 Ascend AI Processors) scenarios, device-os-0 records logs of devices 0–3, and device-os-4 records logs of devices 4–7.
- Asymmetric Multi-Processing (AMP): Logs of each device are recorded separately in the corresponding device-os-id file.