Collecting Logs
Logs collected by Kbox_maintainer include Android logs and server logs. For details, see Table 1.
Category |
Description |
|---|---|
Android logs |
Run the logcat command to collect logs in the log buffer. |
Collect the application stack information (in /data/anr) during an ANR. |
|
Run the dumpsys activity, dumpsys meminfo and dumpsys input commands to collect necessary dumpsys information. |
|
Run the ps –a command to collect process information. |
|
Run the getprop command to collect system property information. |
|
Server logs |
Collect syslog and kernel logs in /var/log. |
Run the dmesg –T command to view the startup information. |
|
Run the docker stats/docker inspect command to collect Docker logs. |
Kbox_maintainer can collect logs of a single container or all containers, and pack the collected logs. It provides the log field. You can add a container ID or container name after the field to collect logs of the specified container. If no container ID is specified, logs of all containers are collected by default. Example:
1 2 | python3 kbox_maintainer.py log python3 kbox_maintainer.py log kbox_1 |
When you use the log collection function, if a log collection task takes a long time, a possible cause is that there are too many logs in the /var/log directory. You can clear the logs as required.