summaryrefslogtreecommitdiffstats
path: root/tools/dreport.d/plugins.d/hostlogger
blob: 8399f9f7d3b6f9627ec53f59ea3b2c694249ea81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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