From e57ee7623b4e4a5e6987879548ce4f201eabe685 Mon Sep 17 00:00:00 2001 From: Artem Senichev Date: Tue, 13 Nov 2018 11:06:18 +0300 Subject: Add phosphor-hostlogger plugin to dreport phosphor-hostlogger project stores host's console output data, such as boot logs or Linux kernel messages printed to the system console. https://github.com/openbmc/phosphor-hostlogger Tested: Run dreport inside the BMC console, the result dump archive must contains host console logs. Change-Id: Icc45888a43b42de78c93aa0bc0ba7a295f0a76e3 Signed-off-by: Artem Senichev Tested-by: Artem Senichev --- tools/dreport.d/plugins.d/hostlogger | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tools/dreport.d/plugins.d/hostlogger diff --git a/tools/dreport.d/plugins.d/hostlogger b/tools/dreport.d/plugins.d/hostlogger new file mode 100644 index 0000000..8399f9f --- /dev/null +++ b/tools/dreport.d/plugins.d/hostlogger @@ -0,0 +1,19 @@ +#!/bin/bash +# +# config: 123 20 +# @brief: Collect host's logs +# + +. ${DREPORT_INCLUDE}/functions + +DESCRIPTION="Host logs" +LOGS_PATH="/var/lib/obmc/hostlogs" + +if [[ -d ${LOGS_PATH} ]]; then + # Flush currently collected messages + busctl --no-pager --verbose call \ + xyz.openbmc_project.HostLogger /xyz/openbmc_project/HostLogger \ + xyz.openbmc_project.HostLogger Flush + # Copy log directory + add_copy_file "${LOGS_PATH}" "${DESCRIPTION}" +fi -- cgit v1.2.1