xref: /openbmc/openbmc-test-automation/ffdc/ffdc_config.yaml (revision 4d4302835588e40baff7a7ccaf1f705c9b224911)
1---
2# This yaml formatted file contains defaults items to collect FFDC for the targeted system
3# COMMANDS - List of commands to be run on the corresponding targeted system (inband)
4#            to generate and/or collect data
5# FILES    - List of files; with complete path; on the corresponding targeted system
6#            to be copied to external destination
7# PROTOCOL - Protocol used to communicate with targeted system; ssh, Rest, redfish, etc
8#
9# Note: Items in COMMANDS and FILES are not necessarily one-to-one correspondence.
10#       For example, a file could have been created by an internal process,
11#       and is listed in FILES to be collected.
12#
13
14# Commands and Files to collect for a given OpenBMC system.
15OPENBMC:
16    # Commands and File to take snapshot of linux based system.
17    # Filename is <OS>_general.txt, where <OS> is in [OPENBMC, RHEL, UBUNTU]
18    GENERAL:
19        COMMANDS:
20            - "rm -rf /tmp/*BMC_* /tmp/PEL_* /tmp/pldm* /tmp/PLDM* /tmp/GUARD*
21              /tmp/fan_* /tmp/DEVTREE /tmp/bmcweb_*"
22            - 'echo "++++++++++ cat /etc/os-release ++++++++++" >>
23              /tmp/OPENBMC_general.txt'
24            - "cat /etc/os-release >> /tmp/OPENBMC_general.txt"
25            - 'echo -e "\n++++++++++ cat /etc/timestamp ++++++++++" >>
26              /tmp/OPENBMC_general.txt'
27            - "cat /etc/timestamp >> /tmp/OPENBMC_general.txt"
28            - 'echo -e "\n++++++++++ uname -a ++++++++++" >>
29              /tmp/OPENBMC_general.txt'
30            - "uname -a >> /tmp/OPENBMC_general.txt"
31            - 'echo -e "\n++++++++++ cat /etc/timestamp ++++++++++" >>
32              /tmp/OPENBMC_general.txt'
33            - "cat /etc/timestamp >> /tmp/OPENBMC_general.txt"
34            - 'echo -e "\n++++++++++ uptime;cat /proc/uptime ++++++++++" >>
35              /tmp/OPENBMC_general.txt'
36            - "uptime >> /tmp/OPENBMC_general.txt"
37            - "cat /proc/uptime >> /tmp/OPENBMC_general.txt"
38            - 'echo -e "\n++++++++++ df -hT ++++++++++" >>
39              /tmp/OPENBMC_general.txt'
40            - "df -hT >> /tmp/OPENBMC_general.txt"
41            - 'echo -e "\n++++++++++ date;/sbin/hwclock --show ++++++++++" >>
42              /tmp/OPENBMC_general.txt'
43            - "date >> /tmp/OPENBMC_general.txt"
44            - "/sbin/hwclock --show >> /tmp/OPENBMC_general.txt"
45            - "/usr/bin/timedatectl >> /tmp/OPENBMC_general.txt"
46            - 'echo -e "\n++++++++++ /usr/bin/obmcutil state ++++++++++" >>
47              /tmp/OPENBMC_general.txt'
48            - "/usr/bin/obmcutil state >> /tmp/OPENBMC_general.txt"
49        FILES:
50            - "/tmp/OPENBMC_general.txt"
51        PROTOCOL:
52            - "SSH"
53
54    OPENBMC_LOGS:
55        COMMANDS:
56            - "cat /sys/class/watchdog/watchdog1/bootstatus
57              >/tmp/BMC_flash_side.txt"
58            - "grep -r . /sys/class/hwmon/* >/tmp/BMC_hwmon.txt"
59            - "top -n 1 -b >/tmp/BMC_proc_list.txt"
60            - "ls -Al /proc/*/fd/ >/tmp/BMC_proc_fd_active_list.txt"
61            - "journalctl --no-pager >/tmp/BMC_journalctl_nopager.txt"
62            - "journalctl -o json-pretty >/tmp/BMC_journalctl_pretty.json"
63            - "dmesg >/tmp/BMC_dmesg.txt"
64            - "cat /proc/cpuinfo >/tmp/BMC_procinfo.txt"
65            - "cat /proc/meminfo >/tmp/BMC_meminfo.txt"
66            - "systemctl status --all >/tmp/BMC_systemd.txt"
67            - "systemctl list-units --failed >/tmp/BMC_failed_service.txt"
68            - "systemctl list-jobs >/tmp/BMC_list_service.txt"
69            - "cat /var/log/obmc-console.log >/tmp/BMC_obmc_console.txt"
70            - "cat /var/log/obmc-console1.log >/tmp/BMC_obmc_console1.txt"
71            - "peltool -l >/tmp/PEL_logs_list.json"
72            - { "peltool -a >/tmp/PEL_logs_display.json": 600 }
73            - {
74                  "peltool  -l -a -f >/tmp/PEL_logs_complete_list.json 2>&1": 1200,
75              }
76            - {
77                  "peltool -a -f -h>/tmp/PEL_logs_complete_display.json 2>&1": 1200,
78              }
79            - {
80                  ? "strace -p $(pidof pldmd) -o /tmp/pldmd_strace.txt & sleep
81                    60 ; kill $!"
82                  : 70,
83              }
84            - "hexdump -C /var/lib/phosphor-logging/extensions/pels/badPEL
85              >/tmp/PEL_logs_badPEL.txt"
86            - "guard -l >/tmp/GUARD_list.txt"
87            - "pldmtool fru getfrurecordtable>/tmp/PLDM_fru_record.txt"
88            - "killall -s SIGUSR1 pldmd; sleep 5"
89            - "fanctl dump"
90            - "cat /var/lib/phosphor-software-manager/pnor/rw/DEVTREE >
91              /tmp/DEVTREE"
92            - "cat /home/root/bmcweb_persistent_data.json >
93              /tmp/bmcweb_persistent_data.json"
94        FILES:
95            - "/tmp/BMC_flash_side.txt"
96            - "/tmp/BMC_hwmon.txt"
97            - "/tmp/BMC_proc_list.txt"
98            - "/tmp/BMC_proc_fd_active_list.txt"
99            - "/tmp/BMC_journalctl_nopager.txt"
100            - "/tmp/BMC_journalctl_pretty.json"
101            - "/tmp/BMC_dmesg.txt"
102            - "/tmp/BMC_procinfo.txt"
103            - "/tmp/BMC_meminfo.txt"
104            - "/tmp/BMC_systemd.txt"
105            - "/tmp/BMC_failed_service.txt"
106            - "/tmp/BMC_list_service.txt"
107            - "/tmp/BMC_obmc_console.txt"
108            - "/tmp/BMC_obmc_console1.txt"
109            - "/tmp/PEL_logs_list.json"
110            - "/tmp/PEL_logs_complete_list.json"
111            - "/tmp/PEL_logs_complete_display.json"
112            - "/tmp/PEL_logs_display.json"
113            - "/tmp/pldmd_strace.txt"
114            - "/tmp/PEL_logs_badPEL.txt"
115            - "/tmp/GUARD_list.txt"
116            - "/tmp/PLDM_fru_record.txt"
117            - "/tmp/pldm_flight_recorder"
118            - "/tmp/fan_control_dump.json"
119            - "/tmp/DEVTREE"
120            - "/tmp/bmcweb_persistent_data.json"
121        PROTOCOL:
122            - "SSH"
123
124    # DUMP_LOGS: This section provides option to 'SCP if file exist'.
125    #     COMMANDS: filename is preceded by ls -AX '.
126    #     FILES: is not needed and is ignored if exists.
127    DUMP_LOGS:
128        COMMANDS:
129            - "ls -AX /var/lib/systemd/coredump/core.*"
130            - "ls -AX /var/lib/phosphor-debug-collector/dumps/*/*"
131            - "ls -AX /var/lib/phosphor-debug-collector/hostbootdump/*/*"
132        PROTOCOL:
133            - "SCP"
134
135    # URLs and Files for OPENBMC redfish
136    # URLs and Files are one-to-one corresponding.
137    # File contains the data returned from 'redfishtool GET URL'
138    REDFISH_LOGS:
139        COMMANDS:
140            - redfishtool -u ${username} -p ${password} -r ${hostname} -S Always
141              raw GET /redfish/v1/AccountService/Accounts
142            - redfishtool -u ${username} -p ${password} -r ${hostname} -S Always
143              raw GET
144              /redfish/v1/Managers/${manager_id}/LogServices/Dump/Entries
145            - redfishtool -u ${username} -p ${password} -r ${hostname} -S Always
146              raw GET /redfish/v1/Systems/system/LogServices/Dump/Entries
147            - redfishtool -u ${username} -p ${password} -r ${hostname} -S Always
148              raw GET /redfish/v1/Systems/system/LogServices/EventLog/Entries
149            - plugin:
150                  - plugin_name: plugin.redfish.enumerate_request
151                  - plugin_args:
152                        - ${hostname}
153                        - ${username}
154                        - ${password}
155                        - ${manager_id}
156                        - /redfish/v1/
157                        - json
158        FILES:
159            - "REDFISH_bmc_user_accounts.json"
160            - "REDFISH_bmc_dump_entries.json"
161            - "REDFISH_system_dumps_entries.json"
162            - "REDFISH_event_log_entries.json"
163            - "REDFISH_enumerate_v1.json"
164        PROTOCOL:
165            - "REDFISH"
166
167    # Commands and Files to collect for via out of band IPMI.
168    IPMI_LOGS:
169        COMMANDS:
170            - ipmitool -I lanplus -C 17 -U ${username} -P ${password} -H
171              ${hostname} lan print
172            - ipmitool -I lanplus -C 17 -U ${username} -P ${password} -H
173              ${hostname} fru list
174            - ipmitool -I lanplus -C 17 -U ${username} -P ${password} -H
175              ${hostname} user list
176        FILES:
177            - "IPMI_LAN_print.txt"
178            - "IPMI_FRU_list.txt"
179            - "IPMI_USER_list.txt"
180        PROTOCOL:
181            - "IPMI"
182
183# Commands and Files to collect for all Linux distributions
184LINUX:
185    LINUX_LOGS:
186        COMMANDS:
187            - "cat /sys/firmware/opal/msglog >/tmp/OS_msglog.txt"
188            - "ppc64_cpu --frequency >/tmp/OS_cpufrequency.txt"
189            - "dmesg >/tmp/OS_dmesg.txt"
190            - "cat /var/log/opal-prd* >/tmp/OS_opal_prd.txt"
191            - "cat /var/log/boot.log >/tmp/OS_boot.txt"
192            - "cat /proc/cpuinfo >/tmp/OS_procinfo.txt"
193            - "cat /proc/meminfo >/tmp/OS_meminfo.txt"
194            - "netstat -a >/tmp/OS_netstat.txt"
195            - "lspci >/tmp/OS_lspci.txt"
196            - "lscpu >/tmp/OS_lscpu.txt"
197            - "lscfg >/tmp/OS_lscfg.txt"
198            - "journalctl --no-pager -b > /tmp/OS_journalctl_nopager.txt "
199        FILES:
200            - "/tmp/OS_msglog.txt"
201            - "/tmp/OS_cpufrequency.txt"
202            - "/tmp/OS_dmesg.txt"
203            - "/tmp/OS_opal_prd.txt"
204            - "/tmp/OS_boot.txt"
205            - "/tmp/OS_procinfo.txt"
206            - "/tmp/OS_meminfo.txt"
207            - "/tmp/OS_netstat.txt"
208            - "/tmp/OS_lspci.txt"
209            - "/tmp/OS_lscpu.txt"
210            - "/tmp/OS_lscfg.txt"
211            - "/tmp/OS_journalctl_nopager.txt"
212        PROTOCOL:
213            - "SSH"
214
215# Commands and Files to collect for Ubuntu Linux only
216UBUNTU:
217    GENERAL:
218        COMMANDS:
219            - "rm -rf /tmp/UBUNTU_general.txt"
220            - 'echo "++++++++++ UBUNTU Rleasae ++++++++++" >
221              /tmp/UBUNTU_general.txt'
222            - "cat /etc/os-release >> /tmp/UBUNTU_general.txt"
223            - 'echo "\n++++++++++ Time stamp ++++++++++" >>
224              /tmp/UBUNTU_general.txt'
225            - "date >> /tmp/UBUNTU_general.txt"
226            - 'echo  "\n++++++++++ uname -a ++++++++++" >>
227              /tmp/UBUNTU_general.txt'
228            - "uname -a >> /tmp/UBUNTU_general.txt"
229            - 'echo "\n++++++++++ uptime ++++++++++" >> /tmp/UBUNTU_general.txt'
230            - "uptime >> /tmp/UBUNTU_general.txt"
231        FILES:
232            - "/tmp/UBUNTU_general.txt"
233        PROTOCOL:
234            - "SSH"
235    UBUNTU_LOGS:
236        COMMANDS:
237            - "{ cat /etc/os-release; uname -a; rpm -qa ; } >/tmp/OS_info.txt"
238            - "tail -n 200000 /var/log/messages >/tmp/OS_syslog.txt"
239            - "rm -rf /tmp/sosreport*FFDC*"
240            - {
241                  ? "sosreport --batch --tmp-dir /tmp --label FFDC
242                    >/tmp/OS_sosreport.txt"
243                  : 1200,
244              }
245            - "tar -zcvf /tmp/crash.tar.gz /var/crash"
246        FILES:
247            - "/tmp/OS_info.txt"
248            - "/tmp/OS_syslog.txt"
249            - "/tmp/OS_sosreport.txt"
250            - "/tmp/sosreport*.tar.xz"
251            - "/tmp/crash.tar.gz"
252        PROTOCOL:
253            - "SSH"
254    DUMP_LOGS:
255        COMMANDS:
256            - "ls -AX /tmp/htx/htxerr"
257            - "ls -AX /tmp/htx/htxmsg"
258        PROTOCOL:
259            - "SCP"
260
261# Commands and Files to collect for RHE Linux only
262RHEL:
263    GENERAL:
264        COMMANDS:
265            - "rm -rf /tmp/RHEL_general.txt"
266            - 'echo "++++++++++ RHEL Rleasae ++++++++++" > /tmp/RHEL_general.txt'
267            - "cat /etc/os-release >> /tmp/RHEL_general.txt"
268            - 'echo -e "\n++++++++++ Time stamp ++++++++++" >>
269              /tmp/RHEL_general.txt'
270            - "date >> /tmp/RHEL_general.txt"
271            - 'echo -e "\n++++++++++ uname -a ++++++++++" >>
272              /tmp/RHEL_general.txt'
273            - "uname -a >> /tmp/RHEL_general.txt"
274            - 'echo -e "\n++++++++++ uptime ++++++++++" >> /tmp/RHEL_general.txt'
275            - "uptime >> /tmp/RHEL_general.txt"
276        FILES:
277            - "/tmp/RHEL_general.txt"
278        PROTOCOL:
279            - "SSH"
280    RHEL_LOGS:
281        COMMANDS:
282            - "{ cat /etc/os-release; uname -a; rpm -qa ; } >/tmp/OS_info.txt"
283            - "tail -n 200000 /var/log/messages >/tmp/OS_syslog.txt"
284            - "rm -rf /tmp/sosreport*FFDC*"
285            - {
286                  ? "sosreport --batch --tmp-dir /tmp --label FFDC
287                    >/tmp/OS_sosreport.txt"
288                  : 1200,
289              }
290            - "tar -zcvf /tmp/crash.tar.gz /var/crash"
291        FILES:
292            - "/tmp/OS_info.txt"
293            - "/tmp/OS_syslog.txt"
294            - "/tmp/OS_sosreport.txt"
295            - "/tmp/sosreport*.tar.xz"
296            - "/tmp/crash.tar.gz"
297        PROTOCOL:
298            - "SSH"
299    DUMP_LOGS:
300        COMMANDS:
301            - "ls -AX /tmp/htx/htxerr"
302            - "ls -AX /tmp/htx/htxmsg"
303        PROTOCOL:
304            - "SCP"
305
306# Commands and Files to collect for SLES Linux only
307SLES:
308    GENERAL:
309        COMMANDS:
310            - "rm -rf /tmp/SLES_general.txt"
311            - 'echo "++++++++++ SLES Rleasae ++++++++++" > /tmp/SLES_general.txt'
312            - "cat /etc/os-release >> /tmp/SLES_general.txt"
313            - 'echo "\n++++++++++ Time stamp ++++++++++" >>
314              /tmp/SLES_general.txt'
315            - "date >> /tmp/SLES_general.txt"
316            - 'echo "\n++++++++++ uname -a ++++++++++" >> /tmp/SLES_general.txt'
317            - "uname -a >> /tmp/SLES_general.txt"
318            - 'echo "\n++++++++++ uptime ++++++++++" >> /tmp/SLES_general.txt'
319            - "uptime >> /tmp/SLES_general.txt"
320        FILES:
321            - "/tmp/SLES_general.txt"
322        PROTOCOL:
323            - "SSH"
324    SLES_LOGS:
325        COMMANDS:
326            - "{ cat /etc/os-release; uname -a; rpm -qa ; } >/tmp/OS_info.txt"
327            - "tail -n 200000 /var/log/messages >/tmp/OS_syslog.txt"
328            - "rm -rf /tmp/scc*.txz.md5"
329            - { "supportconfig >/tmp/OS_supportconfig.txt": 1200 }
330            - "cp /var/log/scc*.txz.md5 /tmp/"
331            - "tar -zcvf /tmp/crash.tar.gz /var/crash"
332        FILES:
333            - "/tmp/OS_info.txt"
334            - "/tmp/OS_syslog.txt"
335            - "/tmp/OS_supportconfig.txt"
336            - "/tmp/scc*.txz.md5"
337            - "/tmp/crash.tar.gz"
338        PROTOCOL:
339            - "SSH"
340    DUMP_LOGS:
341        COMMANDS:
342            - "ls -AX /tmp/htx/htxerr"
343            - "ls -AX /tmp/htx/htxmsg"
344        PROTOCOL:
345            - "SCP"
346
347# Commands and Files to collect for AIX only
348AIX:
349    GENERAL:
350        COMMANDS:
351            - "rm -rf /tmp/AIX_general.txt"
352            - 'echo "++++++++++ AIX Release ++++++++++" > /tmp/AIX_general.txt'
353            - "cat /proc/version | tail -1 >> /tmp/AIX_general.txt"
354            - 'echo "\n++++++++++ Time stamp ++++++++++" >> /tmp/AIX_general.txt'
355            - "date >> /tmp/AIX_general.txt"
356            - 'echo  "\n++++++++++ uname -a ++++++++++" >> /tmp/AIX_general.txt'
357            - "uname -a >> /tmp/AIX_general.txt"
358            - 'echo "\n++++++++++ uptime ++++++++++" >> /tmp/AIX_general.txt'
359            - "uptime >> /tmp/AIX_general.txt"
360            - 'echo "\n++++++++++ System Info ++++++++++" >>
361              /tmp/AIX_general.txt'
362            - "prtconf | head -15 >> /tmp/AIX_general.txt"
363        FILES:
364            - "/tmp/AIX_general.txt"
365        PROTOCOL:
366            - "SSH"
367    AIX_LOGS:
368        COMMANDS:
369            - "errpt -a >/tmp/OS_errpt.txt ; errclear 0;"
370            - "bindprocessor -q >/tmp/OS_processors.txt"
371        FILES:
372            - "/tmp/OS_errpt.txt"
373            - "/tmp/OS_processors.txt"
374        PROTOCOL:
375            - "SSH"
376    DUMP_LOGS:
377        COMMANDS:
378            - "ls -AX /tmp/htx/htxerr"
379            - "ls -AX /tmp/htx/htxmsg"
380        PROTOCOL:
381            - "SCP"
382