diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/dreport.d/plugins.d/hostlogger | 19 |
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 |