commit | 41167a2a144783721852d6960ff7626d6e247cc2 | [log] [tgz] |
---|---|---|
author | Jian Zhang <zhangjian.3032@bytedance.com> | Tue Dec 10 23:14:05 2024 +0800 |
committer | Jayanth Othayoth <ojayanth@gmail.com> | Tue Feb 11 01:49:40 2025 -0600 |
tree | fab7522fb9f4a15fc01831ab65ee4e127db8cdd9 | |
parent | d56bab55fe4d3d1436eac5ff5ccc3fd95537b291 [diff] |
dreport: collecting all namespace journal logs For BMCs that support multiple namespaces to manage logs, add the --namespace=* option to the journalctl command to collect all logs. refer to systemd-journald.service.html[0]. Tested: 1. Prepare a namespace configuration, to isolate logs (in general for the third-party code, like silicon vendor, etc), avoid too many unexpected to noise the system. ``` ~# cp /etc/systemd/journald.conf /etc/systemd/journald@intel.conf ~# mkdir -p /etc/systemd/system/com.intel.crashdump.service.d ~# echo "[Service]" > /etc/systemd/system/com.intel.crashdump.service.d/override.conf ~# echo "LogNamespace=intel" >> /etc/systemd/system/com.intel.crashdump.service.d/override.conf ~# reboot # or restart systemd-journald, and daemon-reload ```` 2. using journalctl vs journalctl --namespace=* ``` ~# journalctl -u com.intel.crashdump.service Dec 10 16:56:49 xxx systemd[1]: Starting Intel BMC CPU Crashdump... Dec 10 16:56:55 xxx systemd[1]: Started Intel BMC CPU Crashdump. ``` ``` ~# journalctl --namespace=* Dec 10 16:56:49 xxx systemd[1]: Starting Intel BMC CPU Crashdump... Dec 10 16:56:55 xxx systemd[1]: Started Intel BMC CPU Crashdump. Dec 10 16:56:57 xxx crashdump[258]: Crashdump version: .... Dec 10 16:56:57 xxx crashdump[258]: Initializing crashdump... .... ``` 3. After this change, check the journal logs, and the journal logs should be collect the logs from all namespaces. ``` cat journal-pretty.log| ag "Initializing crashdump" "MESSAGE" : "Initializing crashdump...", ``` [0]: https://www.freedesktop.org/software/systemd/man/latest/systemd-journald.service.html#Journal%20Namespaces Change-Id: I70f33eb6119cbe041bb0dc2aac527e02d8f5e757 Signed-off-by: Jian Zhang <zhangjian.3032@bytedance.com>
Phosphor Debug Collector provides mechanisms to collect various log files and system parameters. Used to troubleshoot problems in OpenBMC based systems.
One such mechanism is dreport, a script that collects debug data and packages it into an archive file.
To build this package with meson, do the following steps:
1. meson builddir 2. ninja -C builddir
To clean the built files run ninja -C builddir clean
.
Tests can be run in the CI docker container, refer local-ci-build
or with an OpenBMC x86 sdk(see below for x86 steps).
meson -Dtests=enabled build ninja -C build test