diff options
author | Matt Spinler <spinler@us.ibm.com> | 2018-03-29 16:34:38 -0500 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-04-10 13:51:41 +0000 |
commit | b9e821a3f9b9665e617800268fa8cb4c056ed9d8 (patch) | |
tree | d09e3db372ba3757475450e2f36d9c8cfbbca3f3 /meta-openbmc-machines | |
parent | 26ffa12f8c1f452c31d94093f495bc92176b5d70 (diff) | |
download | talos-openbmc-b9e821a3f9b9665e617800268fa8cb4c056ed9d8.tar.gz talos-openbmc-b9e821a3f9b9665e617800268fa8cb4c056ed9d8.zip |
dreport: Collect IBM error objects on IBM systems
Add a plugin for systems in the meta-ibm layer
to collect the com.ibm.Logging objects in a dump.
Resolves openbmc/openbmc#3043
Tested: Run dreport and check that the IBM data is there.
Change-Id: Iaa01a07633265c767649caaf8b9b1580f31ce7cd
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'meta-openbmc-machines')
2 files changed, 50 insertions, 0 deletions
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector.bbappend b/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector.bbappend new file mode 100644 index 000000000..402e4fa09 --- /dev/null +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector.bbappend @@ -0,0 +1,21 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://plugins.d/ibm_elogall" + +install_ibm_plugins() { + + install -m 0755 ${WORKDIR}/plugins.d/ibm_elogall ${D}${dreport_plugin_dir} + +} + +#Link in the plugins so dreport run them at the appropriate time +python link_ibm_plugins() { + + workdir = d.getVar('WORKDIR', True) + script = os.path.join(workdir, 'plugins.d', 'ibm_elogall') + install_dreport_user_script(script, d) + +} + +do_install[postfuncs] += "install_ibm_plugins" +do_install[postfuncs] += "link_ibm_plugins" diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector/plugins.d/ibm_elogall b/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector/plugins.d/ibm_elogall new file mode 100644 index 000000000..3054f237c --- /dev/null +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector/plugins.d/ibm_elogall @@ -0,0 +1,29 @@ +#!/bin/bash +# +# config: 2 20 +# @brief: Get the IBM specific elog objects +# + +. $DREPORT_INCLUDE/functions + +desc="IBM elog" + +entries=$(busctl --list --no-pager tree \ + com.ibm.Logging | grep \ + '/xyz/openbmc_project/logging/entry/') + +#check for elog entries. +if [ -z "$entries" ]; then + log_info "No $desc entries" + exit 0 +fi + +command="busctl call --verbose --no-pager \ + com.ibm.Logging \ + /xyz/openbmc_project/logging \ + org.freedesktop.DBus.ObjectManager \ + GetManagedObjects" + +file_name="ibm_elogall.log" + +add_cmd_output "$command" "$file_name" "$desc" |