prettier: re-format
Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML
files to have consistent formatting for these file types. Re-run the
formatter on the whole repository.
Change-Id: Ie200c0d0da7926b8e0dae0b44c5618762f7fd666
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/ffdc/docs/plugin.md b/ffdc/docs/plugin.md
index 13fc72a..35f283b 100644
--- a/ffdc/docs/plugin.md
+++ b/ffdc/docs/plugin.md
@@ -1,13 +1,17 @@
### Plugin
-Plugin feature for the log collector is to load a user python functions at runtime by the engine and execute it.
+Plugin feature for the log collector is to load a user python functions at
+runtime by the engine and execute it.
-The design infrastructure allows user to extend or call their existing python scripts without needing to expose
-the implementation. This enriches the log collection and mechanize the work flow as per user driven as per
-their requirement,
+The design infrastructure allows user to extend or call their existing python
+scripts without needing to expose the implementation. This enriches the log
+collection and mechanize the work flow as per user driven as per their
+requirement,
### Understanding Plugin
-The plugin works like any stand-alone piece of python script or library function.
+
+The plugin works like any stand-alone piece of python script or library
+function.
The main components in plugin infrastructure are:
@@ -16,10 +20,13 @@
- plugin parser in the collector engine
### Plugin Directory
-Python module script are added or copied to `plugins` directory and the log engine loads these plugins during
-runtime and on demand from the YAML else they are not invoked automatically.
+
+Python module script are added or copied to `plugins` directory and the log
+engine loads these plugins during runtime and on demand from the YAML else they
+are not invoked automatically.
Example:
+
```
plugins/
├── foo_func.py
@@ -31,6 +38,7 @@
### Plugin Template Example
Stand-alone functions: plugins/foo_func.py
+
```
# Sample for documentation plugin
@@ -44,6 +52,7 @@
Class function(s): plugins/plugin_class.py
Example:
+
```
class plugin_class:
@@ -56,6 +65,7 @@
Static Class function(s): plugins/plugin_class.py
Example:
+
```
class plugin_class:
@@ -64,13 +74,14 @@
print(msg)
```
-This is to avoid passing object self in plugin args YAML when calling the class function(s).
-However python class static method has its own limitation, do not use unless needed.
-
+This is to avoid passing object self in plugin args YAML when calling the class
+function(s). However python class static method has its own limitation, do not
+use unless needed.
You can add your own plugin modules to extend further.
Test your plugin:
+
```
python3 plugins/foo_func.py
```
@@ -78,6 +89,7 @@
### YAML Syntax
Plugin function without return statement.
+
```
- plugin:
- plugin_name: plugin.foo_func.print_vars
@@ -86,17 +98,19 @@
```
Plugin function with return statement.
+
```
- plugin:
- plugin_name: return_value = plugin.foo_func.return_vars
- plugin_args:
```
-when the return directive is used by implying "=" , the `return_value`
-can be accessed within the same block by another following plugins
-by using the variable name directly.
+when the return directive is used by implying "=" , the `return_value` can be
+accessed within the same block by another following plugins by using the
+variable name directly.
Example:
+
```
- plugin:
- plugin_name: plugin.foo_func.print_vars
@@ -104,20 +118,23 @@
- return_value
```
-To accept multiple return values by using coma "," separated statement
+To accept multiple return values by using coma "," separated statement
+
```
- plugin_name: return_value1,return_value2 = plugin.foo_func.print_vars
```
Accessing a class method:
-The rule remains same as other functions, however for a class object plugin syntax
+The rule remains same as other functions, however for a class object plugin
+syntax
```
- plugin_name: plugin.<file_name>.<class_object>.<class_method>
```
Example: (from the class example previously mentioned)
+
```
- plugin:
- plugin_name: plugin.plugin_class.plugin_class.plugin_print_msg
@@ -128,7 +145,6 @@
### Plugin execution output for sample
-
```
[PLUGIN-START]
Call func: plugin.foo_func.print_vars("Hello plugin")
@@ -156,6 +172,7 @@
```
Else, plugin response will be skipped and not written to any file.
+
```
FILES:
- None
@@ -164,12 +181,14 @@
### Plugin ERROR Direcive
Error directive on plugin supported
-- exit_on_error : If there was an error in a plugin stacked, the subsequent
- plugin would not be executed if this is declared.
-- continue_on_error : If there was an error and user declare this directive,
- then the plugin block will continue to execute.
+
+- exit_on_error : If there was an error in a plugin stacked, the subsequent
+ plugin would not be executed if this is declared.
+- continue_on_error : If there was an error and user declare this directive,
+ then the plugin block will continue to execute.
Example:
+
```
- plugin:
- plugin_name: plugin.foo_func.print_vars
@@ -178,19 +197,21 @@
- plugin_error: exit_on_error
```
-This error directive would come into force only if there is an error detected
-by the plugin during execution and not the error response returned from the plugin
+This error directive would come into force only if there is an error detected by
+the plugin during execution and not the error response returned from the plugin
function in general.
-To go further, there is another directive for plugin to check if the plugin function
-returned a valid data or not.
+To go further, there is another directive for plugin to check if the plugin
+function returned a valid data or not.
The directive statement is
+
```
- plugin_expects_return: <data type>
```
Example:
+
```
- plugin:
- plugin:
@@ -204,10 +225,11 @@
- plugin_expects_return: str
```
-The above example states that, the plugin function is expecting a return data of type
-string. If the plugin function does not return data or the returned data is not of type
-string, then it would throw an error and sets the plugin_error flag exit_on_error as True.
+The above example states that, the plugin function is expecting a return data of
+type string. If the plugin function does not return data or the returned data is
+not of type string, then it would throw an error and sets the plugin_error flag
+exit_on_error as True.
-This directive helps in validating plugin return data to handle different plugin blocks
-stacked together which are depending on the success of the previous plugin execution to do
-further processing correctly.
+This directive helps in validating plugin return data to handle different plugin
+blocks stacked together which are depending on the success of the previous
+plugin execution to do further processing correctly.
diff --git a/ffdc/docs/yaml_syntax_rules.md b/ffdc/docs/yaml_syntax_rules.md
index 349f5a2..546da52 100644
--- a/ffdc/docs/yaml_syntax_rules.md
+++ b/ffdc/docs/yaml_syntax_rules.md
@@ -1,13 +1,14 @@
### YAML Configuration
-YAML is a human friendly data serialization standard for all programming languages.
+YAML is a human friendly data serialization standard for all programming
+languages.
Refer: https://yaml.org/
YAML is the main orchestrator in terms of how the user arranges the data to be
collected in this log collection tool. The better context and syntax usage would
-improve the execution, parsing and data collection feeds to the collector engine.
-
+improve the execution, parsing and data collection feeds to the collector
+engine.
### YAML Rules
@@ -30,8 +31,8 @@
COMMANDS, FILES, PROTOCOL is mandatory for all YAML block.
-Note: The FILES directive is not needed for protocol using SCP (Refer YAML Block Example)
-
+Note: The FILES directive is not needed for protocol using SCP (Refer YAML Block
+Example)
### YAML Block Examples
diff --git a/ffdc/ffdc_config.yaml b/ffdc/ffdc_config.yaml
index 8897a3b..0ca91af 100644
--- a/ffdc/ffdc_config.yaml
+++ b/ffdc/ffdc_config.yaml
@@ -17,320 +17,360 @@
# Filename is <OS>_general.txt, where <OS> is in [OPENBMC, RHEL, UBUNTU]
GENERAL:
COMMANDS:
- - 'rm -rf /tmp/*BMC_* /tmp/PEL_* /tmp/pldm* /tmp/PLDM* /tmp/GUARD* /tmp/fan_* /tmp/DEVTREE /tmp/bmcweb_*'
- - 'echo "++++++++++ cat /etc/os-release ++++++++++" >> /tmp/OPENBMC_general.txt'
- - 'cat /etc/os-release >> /tmp/OPENBMC_general.txt'
- - 'echo -e "\n++++++++++ cat /etc/timestamp ++++++++++" >> /tmp/OPENBMC_general.txt'
- - 'cat /etc/timestamp >> /tmp/OPENBMC_general.txt'
- - 'echo -e "\n++++++++++ uname -a ++++++++++" >> /tmp/OPENBMC_general.txt'
- - 'uname -a >> /tmp/OPENBMC_general.txt'
- - 'echo -e "\n++++++++++ cat /etc/timestamp ++++++++++" >> /tmp/OPENBMC_general.txt'
- - 'cat /etc/timestamp >> /tmp/OPENBMC_general.txt'
- - 'echo -e "\n++++++++++ uptime;cat /proc/uptime ++++++++++" >> /tmp/OPENBMC_general.txt'
- - 'uptime >> /tmp/OPENBMC_general.txt'
- - 'cat /proc/uptime >> /tmp/OPENBMC_general.txt'
- - 'echo -e "\n++++++++++ df -hT ++++++++++" >> /tmp/OPENBMC_general.txt'
- - 'df -hT >> /tmp/OPENBMC_general.txt'
- - 'echo -e "\n++++++++++ date;/sbin/hwclock --show ++++++++++" >> /tmp/OPENBMC_general.txt'
- - 'date >> /tmp/OPENBMC_general.txt'
- - '/sbin/hwclock --show >> /tmp/OPENBMC_general.txt'
- - '/usr/bin/timedatectl >> /tmp/OPENBMC_general.txt'
- - 'echo -e "\n++++++++++ /usr/bin/obmcutil state ++++++++++" >> /tmp/OPENBMC_general.txt'
- - '/usr/bin/obmcutil state >> /tmp/OPENBMC_general.txt'
+ - "rm -rf /tmp/*BMC_* /tmp/PEL_* /tmp/pldm* /tmp/PLDM* /tmp/GUARD*
+ /tmp/fan_* /tmp/DEVTREE /tmp/bmcweb_*"
+ - 'echo "++++++++++ cat /etc/os-release ++++++++++" >>
+ /tmp/OPENBMC_general.txt'
+ - "cat /etc/os-release >> /tmp/OPENBMC_general.txt"
+ - 'echo -e "\n++++++++++ cat /etc/timestamp ++++++++++" >>
+ /tmp/OPENBMC_general.txt'
+ - "cat /etc/timestamp >> /tmp/OPENBMC_general.txt"
+ - 'echo -e "\n++++++++++ uname -a ++++++++++" >>
+ /tmp/OPENBMC_general.txt'
+ - "uname -a >> /tmp/OPENBMC_general.txt"
+ - 'echo -e "\n++++++++++ cat /etc/timestamp ++++++++++" >>
+ /tmp/OPENBMC_general.txt'
+ - "cat /etc/timestamp >> /tmp/OPENBMC_general.txt"
+ - 'echo -e "\n++++++++++ uptime;cat /proc/uptime ++++++++++" >>
+ /tmp/OPENBMC_general.txt'
+ - "uptime >> /tmp/OPENBMC_general.txt"
+ - "cat /proc/uptime >> /tmp/OPENBMC_general.txt"
+ - 'echo -e "\n++++++++++ df -hT ++++++++++" >>
+ /tmp/OPENBMC_general.txt'
+ - "df -hT >> /tmp/OPENBMC_general.txt"
+ - 'echo -e "\n++++++++++ date;/sbin/hwclock --show ++++++++++" >>
+ /tmp/OPENBMC_general.txt'
+ - "date >> /tmp/OPENBMC_general.txt"
+ - "/sbin/hwclock --show >> /tmp/OPENBMC_general.txt"
+ - "/usr/bin/timedatectl >> /tmp/OPENBMC_general.txt"
+ - 'echo -e "\n++++++++++ /usr/bin/obmcutil state ++++++++++" >>
+ /tmp/OPENBMC_general.txt'
+ - "/usr/bin/obmcutil state >> /tmp/OPENBMC_general.txt"
FILES:
- - '/tmp/OPENBMC_general.txt'
+ - "/tmp/OPENBMC_general.txt"
PROTOCOL:
- - 'SSH'
+ - "SSH"
OPENBMC_LOGS:
COMMANDS:
- - 'cat /sys/class/watchdog/watchdog1/bootstatus >/tmp/BMC_flash_side.txt'
- - 'grep -r . /sys/class/hwmon/* >/tmp/BMC_hwmon.txt'
- - 'top -n 1 -b >/tmp/BMC_proc_list.txt'
- - 'ls -Al /proc/*/fd/ >/tmp/BMC_proc_fd_active_list.txt'
- - 'journalctl --no-pager >/tmp/BMC_journalctl_nopager.txt'
- - 'journalctl -o json-pretty >/tmp/BMC_journalctl_pretty.json'
- - 'dmesg >/tmp/BMC_dmesg.txt'
- - 'cat /proc/cpuinfo >/tmp/BMC_procinfo.txt'
- - 'cat /proc/meminfo >/tmp/BMC_meminfo.txt'
- - 'systemctl status --all >/tmp/BMC_systemd.txt'
- - 'systemctl list-units --failed >/tmp/BMC_failed_service.txt'
- - 'systemctl list-jobs >/tmp/BMC_list_service.txt'
- - 'cat /var/log/obmc-console.log >/tmp/BMC_obmc_console.txt'
- - 'cat /var/log/obmc-console1.log >/tmp/BMC_obmc_console1.txt'
- - 'peltool -l >/tmp/PEL_logs_list.json'
- - {'peltool -a >/tmp/PEL_logs_display.json':600}
- - {'peltool -l -a -f >/tmp/PEL_logs_complete_list.json 2>&1':1200}
- - {'peltool -a -f -h>/tmp/PEL_logs_complete_display.json 2>&1':1200}
- - {'strace -p $(pidof pldmd) -o /tmp/pldmd_strace.txt & sleep 60 ; kill $!':70}
- - 'hexdump -C /var/lib/phosphor-logging/extensions/pels/badPEL >/tmp/PEL_logs_badPEL.txt'
- - 'guard -l >/tmp/GUARD_list.txt'
- - 'pldmtool fru getfrurecordtable>/tmp/PLDM_fru_record.txt'
- - 'killall -s SIGUSR1 pldmd; sleep 5'
- - 'fanctl dump'
- - 'cat /var/lib/phosphor-software-manager/pnor/rw/DEVTREE > /tmp/DEVTREE'
- - 'cat /home/root/bmcweb_persistent_data.json > /tmp/bmcweb_persistent_data.json'
+ - "cat /sys/class/watchdog/watchdog1/bootstatus
+ >/tmp/BMC_flash_side.txt"
+ - "grep -r . /sys/class/hwmon/* >/tmp/BMC_hwmon.txt"
+ - "top -n 1 -b >/tmp/BMC_proc_list.txt"
+ - "ls -Al /proc/*/fd/ >/tmp/BMC_proc_fd_active_list.txt"
+ - "journalctl --no-pager >/tmp/BMC_journalctl_nopager.txt"
+ - "journalctl -o json-pretty >/tmp/BMC_journalctl_pretty.json"
+ - "dmesg >/tmp/BMC_dmesg.txt"
+ - "cat /proc/cpuinfo >/tmp/BMC_procinfo.txt"
+ - "cat /proc/meminfo >/tmp/BMC_meminfo.txt"
+ - "systemctl status --all >/tmp/BMC_systemd.txt"
+ - "systemctl list-units --failed >/tmp/BMC_failed_service.txt"
+ - "systemctl list-jobs >/tmp/BMC_list_service.txt"
+ - "cat /var/log/obmc-console.log >/tmp/BMC_obmc_console.txt"
+ - "cat /var/log/obmc-console1.log >/tmp/BMC_obmc_console1.txt"
+ - "peltool -l >/tmp/PEL_logs_list.json"
+ - { "peltool -a >/tmp/PEL_logs_display.json": 600 }
+ - {
+ "peltool -l -a -f >/tmp/PEL_logs_complete_list.json 2>&1": 1200,
+ }
+ - {
+ "peltool -a -f -h>/tmp/PEL_logs_complete_display.json 2>&1": 1200,
+ }
+ - {
+ "strace -p $(pidof pldmd) -o /tmp/pldmd_strace.txt & sleep 60
+ ; kill $!": 70,
+ }
+ - "hexdump -C /var/lib/phosphor-logging/extensions/pels/badPEL
+ >/tmp/PEL_logs_badPEL.txt"
+ - "guard -l >/tmp/GUARD_list.txt"
+ - "pldmtool fru getfrurecordtable>/tmp/PLDM_fru_record.txt"
+ - "killall -s SIGUSR1 pldmd; sleep 5"
+ - "fanctl dump"
+ - "cat /var/lib/phosphor-software-manager/pnor/rw/DEVTREE >
+ /tmp/DEVTREE"
+ - "cat /home/root/bmcweb_persistent_data.json >
+ /tmp/bmcweb_persistent_data.json"
FILES:
- - '/tmp/BMC_flash_side.txt'
- - '/tmp/BMC_hwmon.txt'
- - '/tmp/BMC_proc_list.txt'
- - '/tmp/BMC_proc_fd_active_list.txt'
- - '/tmp/BMC_journalctl_nopager.txt'
- - '/tmp/BMC_journalctl_pretty.json'
- - '/tmp/BMC_dmesg.txt'
- - '/tmp/BMC_procinfo.txt'
- - '/tmp/BMC_meminfo.txt'
- - '/tmp/BMC_systemd.txt'
- - '/tmp/BMC_failed_service.txt'
- - '/tmp/BMC_list_service.txt'
- - '/tmp/BMC_obmc_console.txt'
- - '/tmp/BMC_obmc_console1.txt'
- - '/tmp/PEL_logs_list.json'
- - '/tmp/PEL_logs_complete_list.json'
- - '/tmp/PEL_logs_complete_display.json'
- - '/tmp/PEL_logs_display.json'
- - '/tmp/pldmd_strace.txt'
- - '/tmp/PEL_logs_badPEL.txt'
- - '/tmp/GUARD_list.txt'
- - '/tmp/PLDM_fru_record.txt'
- - '/tmp/pldm_flight_recorder'
- - '/tmp/fan_control_dump.json'
- - '/tmp/DEVTREE'
- - '/tmp/bmcweb_persistent_data.json'
+ - "/tmp/BMC_flash_side.txt"
+ - "/tmp/BMC_hwmon.txt"
+ - "/tmp/BMC_proc_list.txt"
+ - "/tmp/BMC_proc_fd_active_list.txt"
+ - "/tmp/BMC_journalctl_nopager.txt"
+ - "/tmp/BMC_journalctl_pretty.json"
+ - "/tmp/BMC_dmesg.txt"
+ - "/tmp/BMC_procinfo.txt"
+ - "/tmp/BMC_meminfo.txt"
+ - "/tmp/BMC_systemd.txt"
+ - "/tmp/BMC_failed_service.txt"
+ - "/tmp/BMC_list_service.txt"
+ - "/tmp/BMC_obmc_console.txt"
+ - "/tmp/BMC_obmc_console1.txt"
+ - "/tmp/PEL_logs_list.json"
+ - "/tmp/PEL_logs_complete_list.json"
+ - "/tmp/PEL_logs_complete_display.json"
+ - "/tmp/PEL_logs_display.json"
+ - "/tmp/pldmd_strace.txt"
+ - "/tmp/PEL_logs_badPEL.txt"
+ - "/tmp/GUARD_list.txt"
+ - "/tmp/PLDM_fru_record.txt"
+ - "/tmp/pldm_flight_recorder"
+ - "/tmp/fan_control_dump.json"
+ - "/tmp/DEVTREE"
+ - "/tmp/bmcweb_persistent_data.json"
PROTOCOL:
- - 'SSH'
+ - "SSH"
# DUMP_LOGS: This section provides option to 'SCP if file exist'.
# COMMANDS: filename is preceded by ls -AX '.
# FILES: is not needed and is ignored if exists.
DUMP_LOGS:
COMMANDS:
- - 'ls -AX /var/lib/systemd/coredump/core.*'
- - 'ls -AX /var/lib/phosphor-debug-collector/dumps/*/*'
- - 'ls -AX /var/lib/phosphor-debug-collector/hostbootdump/*/*'
+ - "ls -AX /var/lib/systemd/coredump/core.*"
+ - "ls -AX /var/lib/phosphor-debug-collector/dumps/*/*"
+ - "ls -AX /var/lib/phosphor-debug-collector/hostbootdump/*/*"
PROTOCOL:
- - 'SCP'
+ - "SCP"
# URLs and Files for OPENBMC redfish
# URLs and Files are one-to-one corresponding.
# File contains the data returned from 'redfishtool GET URL'
REDFISH_LOGS:
COMMANDS:
- - redfishtool -u ${username} -p ${password} -r ${hostname} -S Always raw GET /redfish/v1/AccountService/Accounts
- - redfishtool -u ${username} -p ${password} -r ${hostname} -S Always raw GET /redfish/v1/Managers/bmc/LogServices/Dump/Entries
- - redfishtool -u ${username} -p ${password} -r ${hostname} -S Always raw GET /redfish/v1/Systems/system/LogServices/Dump/Entries
- - redfishtool -u ${username} -p ${password} -r ${hostname} -S Always raw GET /redfish/v1/Systems/system/LogServices/EventLog/Entries
+ - redfishtool -u ${username} -p ${password} -r ${hostname} -S Always
+ raw GET /redfish/v1/AccountService/Accounts
+ - redfishtool -u ${username} -p ${password} -r ${hostname} -S Always
+ raw GET /redfish/v1/Managers/bmc/LogServices/Dump/Entries
+ - redfishtool -u ${username} -p ${password} -r ${hostname} -S Always
+ raw GET /redfish/v1/Systems/system/LogServices/Dump/Entries
+ - redfishtool -u ${username} -p ${password} -r ${hostname} -S Always
+ raw GET /redfish/v1/Systems/system/LogServices/EventLog/Entries
- plugin:
- - plugin_name: plugin.redfish.enumerate_request
- - plugin_args:
- - ${hostname}
- - ${username}
- - ${password}
- - /redfish/v1/
- - json
+ - plugin_name: plugin.redfish.enumerate_request
+ - plugin_args:
+ - ${hostname}
+ - ${username}
+ - ${password}
+ - /redfish/v1/
+ - json
FILES:
- - 'REDFISH_bmc_user_accounts.json'
- - 'REDFISH_bmc_dump_entries.json'
- - 'REDFISH_system_dumps_entries.json'
- - 'REDFISH_event_log_entries.json'
- - 'REDFISH_enumerate_v1.json'
+ - "REDFISH_bmc_user_accounts.json"
+ - "REDFISH_bmc_dump_entries.json"
+ - "REDFISH_system_dumps_entries.json"
+ - "REDFISH_event_log_entries.json"
+ - "REDFISH_enumerate_v1.json"
PROTOCOL:
- - 'REDFISH'
+ - "REDFISH"
# Commands and Files to collect for via out of band IPMI.
IPMI_LOGS:
COMMANDS:
- - ipmitool -I lanplus -C 17 -U ${username} -P ${password} -H ${hostname} lan print
- - ipmitool -I lanplus -C 17 -U ${username} -P ${password} -H ${hostname} fru list
- - ipmitool -I lanplus -C 17 -U ${username} -P ${password} -H ${hostname} user list
+ - ipmitool -I lanplus -C 17 -U ${username} -P ${password} -H
+ ${hostname} lan print
+ - ipmitool -I lanplus -C 17 -U ${username} -P ${password} -H
+ ${hostname} fru list
+ - ipmitool -I lanplus -C 17 -U ${username} -P ${password} -H
+ ${hostname} user list
FILES:
- - 'IPMI_LAN_print.txt'
- - 'IPMI_FRU_list.txt'
- - 'IPMI_USER_list.txt'
+ - "IPMI_LAN_print.txt"
+ - "IPMI_FRU_list.txt"
+ - "IPMI_USER_list.txt"
PROTOCOL:
- - 'IPMI'
+ - "IPMI"
# Commands and Files to collect for all Linux distributions
LINUX:
LINUX_LOGS:
COMMANDS:
- - 'cat /sys/firmware/opal/msglog >/tmp/OS_msglog.txt'
- - 'ppc64_cpu --frequency >/tmp/OS_cpufrequency.txt'
- - 'dmesg >/tmp/OS_dmesg.txt'
- - 'cat /var/log/opal-prd* >/tmp/OS_opal_prd.txt'
- - 'cat /var/log/boot.log >/tmp/OS_boot.txt'
- - 'cat /proc/cpuinfo >/tmp/OS_procinfo.txt'
- - 'cat /proc/meminfo >/tmp/OS_meminfo.txt'
- - 'netstat -a >/tmp/OS_netstat.txt'
- - 'lspci >/tmp/OS_lspci.txt'
- - 'lscpu >/tmp/OS_lscpu.txt'
- - 'lscfg >/tmp/OS_lscfg.txt'
- - 'journalctl --no-pager -b > /tmp/OS_journalctl_nopager.txt '
+ - "cat /sys/firmware/opal/msglog >/tmp/OS_msglog.txt"
+ - "ppc64_cpu --frequency >/tmp/OS_cpufrequency.txt"
+ - "dmesg >/tmp/OS_dmesg.txt"
+ - "cat /var/log/opal-prd* >/tmp/OS_opal_prd.txt"
+ - "cat /var/log/boot.log >/tmp/OS_boot.txt"
+ - "cat /proc/cpuinfo >/tmp/OS_procinfo.txt"
+ - "cat /proc/meminfo >/tmp/OS_meminfo.txt"
+ - "netstat -a >/tmp/OS_netstat.txt"
+ - "lspci >/tmp/OS_lspci.txt"
+ - "lscpu >/tmp/OS_lscpu.txt"
+ - "lscfg >/tmp/OS_lscfg.txt"
+ - "journalctl --no-pager -b > /tmp/OS_journalctl_nopager.txt "
FILES:
- - '/tmp/OS_msglog.txt'
- - '/tmp/OS_cpufrequency.txt'
- - '/tmp/OS_dmesg.txt'
- - '/tmp/OS_opal_prd.txt'
- - '/tmp/OS_boot.txt'
- - '/tmp/OS_procinfo.txt'
- - '/tmp/OS_meminfo.txt'
- - '/tmp/OS_netstat.txt'
- - '/tmp/OS_lspci.txt'
- - '/tmp/OS_lscpu.txt'
- - '/tmp/OS_lscfg.txt'
- - '/tmp/OS_journalctl_nopager.txt'
+ - "/tmp/OS_msglog.txt"
+ - "/tmp/OS_cpufrequency.txt"
+ - "/tmp/OS_dmesg.txt"
+ - "/tmp/OS_opal_prd.txt"
+ - "/tmp/OS_boot.txt"
+ - "/tmp/OS_procinfo.txt"
+ - "/tmp/OS_meminfo.txt"
+ - "/tmp/OS_netstat.txt"
+ - "/tmp/OS_lspci.txt"
+ - "/tmp/OS_lscpu.txt"
+ - "/tmp/OS_lscfg.txt"
+ - "/tmp/OS_journalctl_nopager.txt"
PROTOCOL:
- - 'SSH'
+ - "SSH"
# Commands and Files to collect for Ubuntu Linux only
UBUNTU:
GENERAL:
COMMANDS:
- - 'rm -rf /tmp/UBUNTU_general.txt'
- - 'echo "++++++++++ UBUNTU Rleasae ++++++++++" > /tmp/UBUNTU_general.txt'
- - 'cat /etc/os-release >> /tmp/UBUNTU_general.txt'
- - 'echo "\n++++++++++ Time stamp ++++++++++" >> /tmp/UBUNTU_general.txt'
- - 'date >> /tmp/UBUNTU_general.txt'
- - 'echo "\n++++++++++ uname -a ++++++++++" >> /tmp/UBUNTU_general.txt'
- - 'uname -a >> /tmp/UBUNTU_general.txt'
+ - "rm -rf /tmp/UBUNTU_general.txt"
+ - 'echo "++++++++++ UBUNTU Rleasae ++++++++++" >
+ /tmp/UBUNTU_general.txt'
+ - "cat /etc/os-release >> /tmp/UBUNTU_general.txt"
+ - 'echo "\n++++++++++ Time stamp ++++++++++" >>
+ /tmp/UBUNTU_general.txt'
+ - "date >> /tmp/UBUNTU_general.txt"
+ - 'echo "\n++++++++++ uname -a ++++++++++" >>
+ /tmp/UBUNTU_general.txt'
+ - "uname -a >> /tmp/UBUNTU_general.txt"
- 'echo "\n++++++++++ uptime ++++++++++" >> /tmp/UBUNTU_general.txt'
- - 'uptime >> /tmp/UBUNTU_general.txt'
+ - "uptime >> /tmp/UBUNTU_general.txt"
FILES:
- - '/tmp/UBUNTU_general.txt'
+ - "/tmp/UBUNTU_general.txt"
PROTOCOL:
- - 'SSH'
+ - "SSH"
UBUNTU_LOGS:
COMMANDS:
- - '{ cat /etc/os-release; uname -a; rpm -qa ; } >/tmp/OS_info.txt'
- - 'tail -n 200000 /var/log/messages >/tmp/OS_syslog.txt'
- - 'rm -rf /tmp/sosreport*FFDC*'
- - {'sosreport --batch --tmp-dir /tmp --label FFDC >/tmp/OS_sosreport.txt': 1200}
- - 'tar -zcvf /tmp/crash.tar.gz /var/crash'
+ - "{ cat /etc/os-release; uname -a; rpm -qa ; } >/tmp/OS_info.txt"
+ - "tail -n 200000 /var/log/messages >/tmp/OS_syslog.txt"
+ - "rm -rf /tmp/sosreport*FFDC*"
+ - {
+ "sosreport --batch --tmp-dir /tmp --label FFDC
+ >/tmp/OS_sosreport.txt": 1200,
+ }
+ - "tar -zcvf /tmp/crash.tar.gz /var/crash"
FILES:
- - '/tmp/OS_info.txt'
- - '/tmp/OS_syslog.txt'
- - '/tmp/OS_sosreport.txt'
- - '/tmp/sosreport*.tar.xz'
- - '/tmp/crash.tar.gz'
+ - "/tmp/OS_info.txt"
+ - "/tmp/OS_syslog.txt"
+ - "/tmp/OS_sosreport.txt"
+ - "/tmp/sosreport*.tar.xz"
+ - "/tmp/crash.tar.gz"
PROTOCOL:
- - 'SSH'
+ - "SSH"
DUMP_LOGS:
COMMANDS:
- - 'ls -AX /tmp/htx/htxerr'
- - 'ls -AX /tmp/htx/htxmsg'
+ - "ls -AX /tmp/htx/htxerr"
+ - "ls -AX /tmp/htx/htxmsg"
PROTOCOL:
- - 'SCP'
+ - "SCP"
# Commands and Files to collect for RHE Linux only
RHEL:
GENERAL:
COMMANDS:
- - 'rm -rf /tmp/RHEL_general.txt'
+ - "rm -rf /tmp/RHEL_general.txt"
- 'echo "++++++++++ RHEL Rleasae ++++++++++" > /tmp/RHEL_general.txt'
- - 'cat /etc/os-release >> /tmp/RHEL_general.txt'
- - 'echo -e "\n++++++++++ Time stamp ++++++++++" >> /tmp/RHEL_general.txt'
- - 'date >> /tmp/RHEL_general.txt'
- - 'echo -e "\n++++++++++ uname -a ++++++++++" >> /tmp/RHEL_general.txt'
- - 'uname -a >> /tmp/RHEL_general.txt'
+ - "cat /etc/os-release >> /tmp/RHEL_general.txt"
+ - 'echo -e "\n++++++++++ Time stamp ++++++++++" >>
+ /tmp/RHEL_general.txt'
+ - "date >> /tmp/RHEL_general.txt"
+ - 'echo -e "\n++++++++++ uname -a ++++++++++" >>
+ /tmp/RHEL_general.txt'
+ - "uname -a >> /tmp/RHEL_general.txt"
- 'echo -e "\n++++++++++ uptime ++++++++++" >> /tmp/RHEL_general.txt'
- - 'uptime >> /tmp/RHEL_general.txt'
+ - "uptime >> /tmp/RHEL_general.txt"
FILES:
- - '/tmp/RHEL_general.txt'
+ - "/tmp/RHEL_general.txt"
PROTOCOL:
- - 'SSH'
+ - "SSH"
RHEL_LOGS:
COMMANDS:
- - '{ cat /etc/os-release; uname -a; rpm -qa ; } >/tmp/OS_info.txt'
- - 'tail -n 200000 /var/log/messages >/tmp/OS_syslog.txt'
- - 'rm -rf /tmp/sosreport*FFDC*'
- - {'sosreport --batch --tmp-dir /tmp --label FFDC >/tmp/OS_sosreport.txt': 1200}
- - 'tar -zcvf /tmp/crash.tar.gz /var/crash'
+ - "{ cat /etc/os-release; uname -a; rpm -qa ; } >/tmp/OS_info.txt"
+ - "tail -n 200000 /var/log/messages >/tmp/OS_syslog.txt"
+ - "rm -rf /tmp/sosreport*FFDC*"
+ - {
+ "sosreport --batch --tmp-dir /tmp --label FFDC
+ >/tmp/OS_sosreport.txt": 1200,
+ }
+ - "tar -zcvf /tmp/crash.tar.gz /var/crash"
FILES:
- - '/tmp/OS_info.txt'
- - '/tmp/OS_syslog.txt'
- - '/tmp/OS_sosreport.txt'
- - '/tmp/sosreport*.tar.xz'
- - '/tmp/crash.tar.gz'
+ - "/tmp/OS_info.txt"
+ - "/tmp/OS_syslog.txt"
+ - "/tmp/OS_sosreport.txt"
+ - "/tmp/sosreport*.tar.xz"
+ - "/tmp/crash.tar.gz"
PROTOCOL:
- - 'SSH'
+ - "SSH"
DUMP_LOGS:
COMMANDS:
- - 'ls -AX /tmp/htx/htxerr'
- - 'ls -AX /tmp/htx/htxmsg'
+ - "ls -AX /tmp/htx/htxerr"
+ - "ls -AX /tmp/htx/htxmsg"
PROTOCOL:
- - 'SCP'
+ - "SCP"
# Commands and Files to collect for SLES Linux only
SLES:
GENERAL:
COMMANDS:
- - 'rm -rf /tmp/SLES_general.txt'
+ - "rm -rf /tmp/SLES_general.txt"
- 'echo "++++++++++ SLES Rleasae ++++++++++" > /tmp/SLES_general.txt'
- - 'cat /etc/os-release >> /tmp/SLES_general.txt'
- - 'echo "\n++++++++++ Time stamp ++++++++++" >> /tmp/SLES_general.txt'
- - 'date >> /tmp/SLES_general.txt'
+ - "cat /etc/os-release >> /tmp/SLES_general.txt"
+ - 'echo "\n++++++++++ Time stamp ++++++++++" >>
+ /tmp/SLES_general.txt'
+ - "date >> /tmp/SLES_general.txt"
- 'echo "\n++++++++++ uname -a ++++++++++" >> /tmp/SLES_general.txt'
- - 'uname -a >> /tmp/SLES_general.txt'
+ - "uname -a >> /tmp/SLES_general.txt"
- 'echo "\n++++++++++ uptime ++++++++++" >> /tmp/SLES_general.txt'
- - 'uptime >> /tmp/SLES_general.txt'
+ - "uptime >> /tmp/SLES_general.txt"
FILES:
- - '/tmp/SLES_general.txt'
+ - "/tmp/SLES_general.txt"
PROTOCOL:
- - 'SSH'
+ - "SSH"
SLES_LOGS:
COMMANDS:
- - '{ cat /etc/os-release; uname -a; rpm -qa ; } >/tmp/OS_info.txt'
- - 'tail -n 200000 /var/log/messages >/tmp/OS_syslog.txt'
- - 'rm -rf /tmp/scc*.txz.md5'
- - {'supportconfig >/tmp/OS_supportconfig.txt': 1200}
- - 'cp /var/log/scc*.txz.md5 /tmp/'
- - 'tar -zcvf /tmp/crash.tar.gz /var/crash'
+ - "{ cat /etc/os-release; uname -a; rpm -qa ; } >/tmp/OS_info.txt"
+ - "tail -n 200000 /var/log/messages >/tmp/OS_syslog.txt"
+ - "rm -rf /tmp/scc*.txz.md5"
+ - { "supportconfig >/tmp/OS_supportconfig.txt": 1200 }
+ - "cp /var/log/scc*.txz.md5 /tmp/"
+ - "tar -zcvf /tmp/crash.tar.gz /var/crash"
FILES:
- - '/tmp/OS_info.txt'
- - '/tmp/OS_syslog.txt'
- - '/tmp/OS_supportconfig.txt'
- - '/tmp/scc*.txz.md5'
- - '/tmp/crash.tar.gz'
+ - "/tmp/OS_info.txt"
+ - "/tmp/OS_syslog.txt"
+ - "/tmp/OS_supportconfig.txt"
+ - "/tmp/scc*.txz.md5"
+ - "/tmp/crash.tar.gz"
PROTOCOL:
- - 'SSH'
+ - "SSH"
DUMP_LOGS:
COMMANDS:
- - 'ls -AX /tmp/htx/htxerr'
- - 'ls -AX /tmp/htx/htxmsg'
+ - "ls -AX /tmp/htx/htxerr"
+ - "ls -AX /tmp/htx/htxmsg"
PROTOCOL:
- - 'SCP'
+ - "SCP"
# Commands and Files to collect for AIX only
AIX:
GENERAL:
COMMANDS:
- - 'rm -rf /tmp/AIX_general.txt'
+ - "rm -rf /tmp/AIX_general.txt"
- 'echo "++++++++++ AIX Release ++++++++++" > /tmp/AIX_general.txt'
- - 'cat /proc/version | tail -1 >> /tmp/AIX_general.txt'
+ - "cat /proc/version | tail -1 >> /tmp/AIX_general.txt"
- 'echo "\n++++++++++ Time stamp ++++++++++" >> /tmp/AIX_general.txt'
- - 'date >> /tmp/AIX_general.txt'
+ - "date >> /tmp/AIX_general.txt"
- 'echo "\n++++++++++ uname -a ++++++++++" >> /tmp/AIX_general.txt'
- - 'uname -a >> /tmp/AIX_general.txt'
+ - "uname -a >> /tmp/AIX_general.txt"
- 'echo "\n++++++++++ uptime ++++++++++" >> /tmp/AIX_general.txt'
- - 'uptime >> /tmp/AIX_general.txt'
- - 'echo "\n++++++++++ System Info ++++++++++" >> /tmp/AIX_general.txt'
- - 'prtconf | head -15 >> /tmp/AIX_general.txt'
+ - "uptime >> /tmp/AIX_general.txt"
+ - 'echo "\n++++++++++ System Info ++++++++++" >>
+ /tmp/AIX_general.txt'
+ - "prtconf | head -15 >> /tmp/AIX_general.txt"
FILES:
- - '/tmp/AIX_general.txt'
+ - "/tmp/AIX_general.txt"
PROTOCOL:
- - 'SSH'
+ - "SSH"
AIX_LOGS:
COMMANDS:
- - 'errpt -a >/tmp/OS_errpt.txt ; errclear 0;'
- - 'bindprocessor -q >/tmp/OS_processors.txt'
+ - "errpt -a >/tmp/OS_errpt.txt ; errclear 0;"
+ - "bindprocessor -q >/tmp/OS_processors.txt"
FILES:
- - '/tmp/OS_errpt.txt'
- - '/tmp/OS_processors.txt'
+ - "/tmp/OS_errpt.txt"
+ - "/tmp/OS_processors.txt"
PROTOCOL:
- - 'SSH'
+ - "SSH"
DUMP_LOGS:
COMMANDS:
- - 'ls -AX /tmp/htx/htxerr'
- - 'ls -AX /tmp/htx/htxmsg'
+ - "ls -AX /tmp/htx/htxerr"
+ - "ls -AX /tmp/htx/htxmsg"
PROTOCOL:
- - 'SCP'
+ - "SCP"
diff --git a/ffdc/templates/log_collector_config_template.yaml b/ffdc/templates/log_collector_config_template.yaml
index 7e5f156..a418a8c 100644
--- a/ffdc/templates/log_collector_config_template.yaml
+++ b/ffdc/templates/log_collector_config_template.yaml
@@ -6,46 +6,48 @@
MY_BLOCK:
MY_LOGS:
COMMANDS:
- - 'dmesg >/tmp/dmesg.txt'
+ - "dmesg >/tmp/dmesg.txt"
FILES:
- - '/tmp/dmesg.txt'
+ - "/tmp/dmesg.txt"
PROTOCOL:
- - 'SSH'
+ - "SSH"
REDFISH_LOGS:
COMMANDS:
- - redfishtool -u ${username} -p ${password} -r ${hostname} -S Always raw GET /redfish/v1/AccountService/Accounts
+ - redfishtool -u ${username} -p ${password} -r ${hostname} -S Always
+ raw GET /redfish/v1/AccountService/Accounts
FILES:
- - 'REDFISH_bmc_user_accounts.json'
+ - "REDFISH_bmc_user_accounts.json"
PROTOCOL:
- - 'REDFISH'
+ - "REDFISH"
IPMI_LOGS:
COMMANDS:
- - ipmitool -I lanplus -C 17 -U ${username} -P ${password} -H ${hostname} lan print
+ - ipmitool -I lanplus -C 17 -U ${username} -P ${password} -H
+ ${hostname} lan print
FILES:
- - 'IPMI_LAN_print.txt'
+ - "IPMI_LAN_print.txt"
PROTOCOL:
- - 'IPMI'
+ - "IPMI"
SHELL_LOGS:
COMMANDS:
- plugin:
- - plugin_name: plugin.ssh_execution.ssh_execute_cmd
- - plugin_args:
- - ${hostname}
- - ${username}
- - ${password}
- - cat /etc/os-release
- - 3
- - plugin_error: exit_on_error
+ - plugin_name: plugin.ssh_execution.ssh_execute_cmd
+ - plugin_args:
+ - ${hostname}
+ - ${username}
+ - ${password}
+ - cat /etc/os-release
+ - 3
+ - plugin_error: exit_on_error
FILES:
- plugin_release.txt
PROTOCOL:
- - 'SHELL'
+ - "SHELL"
DUMP_LOGS:
COMMANDS:
- - 'ls -AX /var/lib/systemd/coredump/core.*'
+ - "ls -AX /var/lib/systemd/coredump/core.*"
PROTOCOL:
- - 'SCP'
+ - "SCP"