dreport: add hwmon details to the BMC dump
Copy the hwmon details from /sys/class/hwmon/* to hwmon.log
and append the file to the BMC dump
Tested:
/sys/class/hwmon/hwmon0/in1_max_alarm: 0
/sys/class/hwmon/hwmon0/curr2_crit_alarm: 0
/sys/class/hwmon/hwmon0/temp5_crit: -500
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
Change-Id: I20a2f20323a9d5095eac0cede46595a2e011ba9f
diff --git a/tools/dreport.d/plugins.d/hwmon b/tools/dreport.d/plugins.d/hwmon
new file mode 100644
index 0000000..1512d46
--- /dev/null
+++ b/tools/dreport.d/plugins.d/hwmon
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+#
+# config: 2 50
+# @brief: Collect hwmon information
+#
+
+. $DREPORT_INCLUDE/functions
+
+file_name="hwmon.log"
+if [ -d "/sys/class/hwmon/" ]; then
+ add_cmd_output "grep -r . /sys/class/hwmon/*" "$file_name" "hwmon"
+fi