dreport: Added BMC state plugin

Plugin used for collecting BMC state information.

Change-Id: Id22c18757acabf4944a2b136f1f14abf19021a6a
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
diff --git a/tools/dreport.d/plugins.d/bmcstate b/tools/dreport.d/plugins.d/bmcstate
new file mode 100644
index 0000000..c5e31a7
--- /dev/null
+++ b/tools/dreport.d/plugins.d/bmcstate
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+# config: 123 5
+# @brief: Collect BMC state information.
+#
+
+. $DREPORT_INCLUDE/functions
+
+desc="BMC State"
+file_name="bmc-state.log"
+command="busctl get-property \
+                    xyz.openbmc_project.State.BMC \
+                    /xyz/openbmc_project/state/bmc0 \
+                    xyz.openbmc_project.State.BMC \
+                    CurrentBMCState"
+
+add_cmd_output "$command" "$file_name" "$desc"