Dreport: Add Kernel Command Line Info
Add functionality to collect kernel command line
information as part of the debug data collection
process. The new plugin retrieves data from
/proc/cmdline, which contains the kernel parameters
passed during boot.
Including this information in debug reports will
enhance troubleshooting capabilities for system
boot and configuration issues in OpenBMC-based
systems. It provides a snapshot of the kernel's
runtime parameters, which can help identify
misconfigurations or diagnose boot-related
problems.
Tested on qemuarm platform.
'''
Kernel cmdline: console=ttyAMA0 root=/dev/vda rw
Enables serial console debugging
Specifies root filesystem location
Mounts root in read-write mode
[1] busctl call xyz.openbmc_project.Dump.Manager /xyz/openbmc_project/dump/bmc xyz.openbmc_project.Dump.Create CreateDump a{sv} 1 "i" i 1234
tar -xvf obmcdump_1_1742903558.tar.xz
obmcdump_1_1742903558/
obmcdump_1_1742903558/summary.log
...
obmcdump_1_1742903558/kernalcmdline.log
...
cat obmcdump_1_1742903558/kernalcmdline.log | head
console=ttyAMA0 root=/dev/vda rw
'''
Change-Id: I71177a2d3ff7b9b80ce11eb22ef01434c6ecd686
Signed-off-by: Deepak Kamat <dkamat@nvidia.com>
diff --git a/tools/dreport.d/plugins.d/kernlcmdline b/tools/dreport.d/plugins.d/kernlcmdline
new file mode 100644
index 0000000..e563f82
--- /dev/null
+++ b/tools/dreport.d/plugins.d/kernlcmdline
@@ -0,0 +1,14 @@
+#!/bin/bash
+#
+# config: 2 30
+# @brief: Collect kernal command line parameter.
+#
+
+# shellcheck source=/dev/null
+. "$DREPORT_INCLUDE"/functions
+
+desc="Kernel command line parameters"
+file_name="kernalcmdline.log"
+command="cat /proc/cmdline"
+
+add_cmd_output "$command" "$file_name" "$desc"