Attn: Dump request and monitoring support
Support for requesting a dump from the dump manager and monitoring the
dump progress.
Signed-off-by: Ben Tyner <ben.tyner@ibm.com>
Change-Id: I03acd2b8c13ce0b5ced63ff7fbb32f7225467aee
diff --git a/attn/attn_logging.cpp b/attn/attn_logging.cpp
index a9be924..73eebdf 100644
--- a/attn/attn_logging.cpp
+++ b/attn/attn_logging.cpp
@@ -1,8 +1,10 @@
#include <unistd.h>
+#include <attn/attn_common.hpp>
#include <attn/attn_dbus.hpp>
#include <attn/attn_logging.hpp>
#include <attn/pel/pel_minimal.hpp>
+#include <attn/ti_handler.hpp>
#include <phosphor-logging/log.hpp>
namespace attn
@@ -404,6 +406,18 @@
close(pelFd);
}
}
+
+ uint8_t subsystem = std::stoi(i_additional["Subsystem"]);
+
+ // If not hypervisor TI
+ if (static_cast<uint8_t>(pel::SubsystemID::hypervisor) != subsystem)
+ {
+ // Request a dump and transition the host
+ if ("true" == i_additional["Dump"])
+ {
+ requestDump(pelId); // will not return until dump is complete
+ }
+ }
}
}