summaryrefslogtreecommitdiff
path: root/meta-ibm/recipes-phosphor/dump
diff options
context:
space:
mode:
authorDave Cobbley <david.j.cobbley@linux.intel.com>2018-08-23 04:40:54 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-08-23 19:39:42 +0300
commit194ff4f1f5d44b12e9cb06ddafa6adb20174a13c (patch)
tree823835cd29daf8901a31ac14c7e6534abf199be3 /meta-ibm/recipes-phosphor/dump
parent4feb727cd6b77a68bdaca63e121b378d814f5eaf (diff)
downloadopenbmc-194ff4f1f5d44b12e9cb06ddafa6adb20174a13c.tar.xz
[Subtree] Bring openbmc machines to top level
The new subtree model brings the subtrees up from the openbmc-machines layer. Change-Id: I58a03ae1be374bc79ae1438e65e888375d12d0c0 Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-ibm/recipes-phosphor/dump')
-rw-r--r--meta-ibm/recipes-phosphor/dump/phosphor-debug-collector.bbappend21
-rw-r--r--meta-ibm/recipes-phosphor/dump/phosphor-debug-collector/plugins.d/ibm_elogall29
2 files changed, 50 insertions, 0 deletions
diff --git a/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector.bbappend b/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector.bbappend
new file mode 100644
index 000000000..402e4fa09
--- /dev/null
+++ b/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-ibm/recipes-phosphor/dump/phosphor-debug-collector/plugins.d/ibm_elogall b/meta-ibm/recipes-phosphor/dump/phosphor-debug-collector/plugins.d/ibm_elogall
new file mode 100644
index 000000000..3054f237c
--- /dev/null
+++ b/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"