summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtem Senichev <artemsen@gmail.com>2018-11-13 11:06:18 +0300
committerArtem Senichev <artemsen@gmail.com>2018-11-14 18:39:25 +0300
commite57ee7623b4e4a5e6987879548ce4f201eabe685 (patch)
tree0be61ad0a951b3558e1d6b55ec57836b15b84e3f
parent6916cec8e133e223c9dca9393e652d6cfe4d5162 (diff)
downloadphosphor-debug-collector-e57ee7623b4e4a5e6987879548ce4f201eabe685.zip
phosphor-debug-collector-e57ee7623b4e4a5e6987879548ce4f201eabe685.tar.gz
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 <artemsen@gmail.com> Tested-by: Artem Senichev <artemsen@gmail.com>
-rw-r--r--tools/dreport.d/plugins.d/hostlogger19
1 files changed, 19 insertions, 0 deletions
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
OpenPOWER on IntegriCloud