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            - "killall -s SIGUSR1 phosphor-fan-monitor; sleep 5"
91            - "cat /var/lib/phosphor-software-manager/pnor/rw/DEVTREE >
92              /tmp/DEVTREE"
93            - "cat /home/root/bmcweb_persistent_data.json >
94              /tmp/bmcweb_persistent_data.json"
95        FILES:
96            - "/tmp/BMC_flash_side.txt"
97            - "/tmp/BMC_hwmon.txt"
98            - "/tmp/BMC_proc_list.txt"
99            - "/tmp/BMC_proc_fd_active_list.txt"
100            - "/tmp/BMC_journalctl_nopager.txt"
101            - "/tmp/BMC_journalctl_pretty.json"
102            - "/tmp/BMC_dmesg.txt"
103            - "/tmp/BMC_procinfo.txt"
104            - "/tmp/BMC_meminfo.txt"
105            - "/tmp/BMC_systemd.txt"
106            - "/tmp/BMC_failed_service.txt"
107            - "/tmp/BMC_list_service.txt"
108            - "/tmp/BMC_obmc_console.txt"
109            - "/tmp/BMC_obmc_console1.txt"
110            - "/tmp/PEL_logs_list.json"
111            - "/tmp/PEL_logs_complete_list.json"
112            - "/tmp/PEL_logs_complete_display.json"
113            - "/tmp/PEL_logs_display.json"
114            - "/tmp/pldmd_strace.txt"
115            - "/tmp/PEL_logs_badPEL.txt"
116            - "/tmp/GUARD_list.txt"
117            - "/tmp/PLDM_fru_record.txt"
118            - "/tmp/pldm_flight_recorder"
119            - "/tmp/fan_control_dump.json"
120            - "/tmp/fan_monitor_dump.json"
121            - "/tmp/DEVTREE"
122            - "/tmp/bmcweb_persistent_data.json"
123        PROTOCOL:
124            - "SSH"
125
126    # DUMP_LOGS: This section provides option to 'SCP if file exist'.
127    #     COMMANDS: filename is preceded by ls -AX '.
128    #     FILES: is not needed and is ignored if exists.
129    DUMP_LOGS:
130        COMMANDS:
131            - "ls -AX /var/lib/systemd/coredump/core.*"
132            - "ls -AX /var/lib/phosphor-debug-collector/dumps/*/*"
133            - "ls -AX /var/lib/phosphor-debug-collector/hostbootdump/*/*"
134        PROTOCOL:
135            - "SCP"
136
137    # URLs and Files for OPENBMC redfish
138    # URLs and Files are one-to-one corresponding.
139    # File contains the data returned from 'redfishtool GET URL'
140    REDFISH_LOGS:
141        COMMANDS:
142            - redfishtool -u ${username} -p ${password} -r
143              ${hostname}:${port_https} -S Always raw GET
144              /redfish/v1/AccountService/Accounts
145            - redfishtool -u ${username} -p ${password} -r
146              ${hostname}:${port_https} -S Always raw GET
147              /redfish/v1/Managers/${manager_id}/LogServices/Dump/Entries
148            - redfishtool -u ${username} -p ${password} -r
149              ${hostname}:${port_https} -S Always raw GET
150              /redfish/v1/Systems/system/LogServices/Dump/Entries
151            - redfishtool -u ${username} -p ${password} -r
152              ${hostname}:${port_https} -S Always raw GET
153              /redfish/v1/Systems/system/LogServices/EventLog/Entries
154            - plugin:
155                  - plugin_name: plugin.redfish.enumerate_request
156                  - plugin_args:
157                        - ${hostname}:${port_https}
158                        - ${username}
159                        - ${password}
160                        - /redfish/v1/
161                        - json
162        FILES:
163            - "REDFISH_bmc_user_accounts.json"
164            - "REDFISH_bmc_dump_entries.json"
165            - "REDFISH_system_dumps_entries.json"
166            - "REDFISH_event_log_entries.json"
167            - "REDFISH_enumerate_v1.json"
168        PROTOCOL:
169            - "REDFISH"
170
171    # Commands and Files to collect for via out of band IPMI.
172    IPMI_LOGS:
173        COMMANDS:
174            - ipmitool -I lanplus -C 17 -U ${username} -P ${password} -H
175              ${hostname} -p ${port_ipmi} lan print
176            - ipmitool -I lanplus -C 17 -U ${username} -P ${password} -H
177              ${hostname} -p ${port_ipmi} fru list
178            - ipmitool -I lanplus -C 17 -U ${username} -P ${password} -H
179              ${hostname} -p ${port_ipmi} user list
180        FILES:
181            - "IPMI_LAN_print.txt"
182            - "IPMI_FRU_list.txt"
183            - "IPMI_USER_list.txt"
184        PROTOCOL:
185            - "IPMI"
186
187# Commands and Files to collect for all Linux distributions
188LINUX:
189    LINUX_LOGS:
190        COMMANDS:
191            - "cat /sys/firmware/opal/msglog >/tmp/OS_msglog.txt"
192            - "ppc64_cpu --frequency >/tmp/OS_cpufrequency.txt"
193            - "dmesg >/tmp/OS_dmesg.txt"
194            - "cat /var/log/opal-prd* >/tmp/OS_opal_prd.txt"
195            - "cat /var/log/boot.log >/tmp/OS_boot.txt"
196            - "cat /proc/cpuinfo >/tmp/OS_procinfo.txt"
197            - "cat /proc/meminfo >/tmp/OS_meminfo.txt"
198            - "netstat -a >/tmp/OS_netstat.txt"
199            - "lspci >/tmp/OS_lspci.txt"
200            - "lscpu >/tmp/OS_lscpu.txt"
201            - "lscfg >/tmp/OS_lscfg.txt"
202            - "journalctl --no-pager -b > /tmp/OS_journalctl_nopager.txt "
203        FILES:
204            - "/tmp/OS_msglog.txt"
205            - "/tmp/OS_cpufrequency.txt"
206            - "/tmp/OS_dmesg.txt"
207            - "/tmp/OS_opal_prd.txt"
208            - "/tmp/OS_boot.txt"
209            - "/tmp/OS_procinfo.txt"
210            - "/tmp/OS_meminfo.txt"
211            - "/tmp/OS_netstat.txt"
212            - "/tmp/OS_lspci.txt"
213            - "/tmp/OS_lscpu.txt"
214            - "/tmp/OS_lscfg.txt"
215            - "/tmp/OS_journalctl_nopager.txt"
216        PROTOCOL:
217            - "SSH"
218
219# Commands and Files to collect for Ubuntu Linux only
220UBUNTU:
221    GENERAL:
222        COMMANDS:
223            - "rm -rf /tmp/UBUNTU_general.txt"
224            - 'echo "++++++++++ UBUNTU Rleasae ++++++++++" >
225              /tmp/UBUNTU_general.txt'
226            - "cat /etc/os-release >> /tmp/UBUNTU_general.txt"
227            - 'echo "\n++++++++++ Time stamp ++++++++++" >>
228              /tmp/UBUNTU_general.txt'
229            - "date >> /tmp/UBUNTU_general.txt"
230            - 'echo  "\n++++++++++ uname -a ++++++++++" >>
231              /tmp/UBUNTU_general.txt'
232            - "uname -a >> /tmp/UBUNTU_general.txt"
233            - 'echo "\n++++++++++ uptime ++++++++++" >> /tmp/UBUNTU_general.txt'
234            - "uptime >> /tmp/UBUNTU_general.txt"
235        FILES:
236            - "/tmp/UBUNTU_general.txt"
237        PROTOCOL:
238            - "SSH"
239    UBUNTU_LOGS:
240        COMMANDS:
241            - "{ cat /etc/os-release; uname -a; rpm -qa ; } >/tmp/OS_info.txt"
242            - "tail -n 200000 /var/log/messages >/tmp/OS_syslog.txt"
243            - "rm -rf /tmp/sosreport*FFDC*"
244            - {
245                  ? "sosreport --batch --tmp-dir /tmp --label FFDC
246                    >/tmp/OS_sosreport.txt"
247                  : 1200,
248              }
249            - "tar -zcvf /tmp/crash.tar.gz /var/crash"
250        FILES:
251            - "/tmp/OS_info.txt"
252            - "/tmp/OS_syslog.txt"
253            - "/tmp/OS_sosreport.txt"
254            - "/tmp/sosreport*.tar.xz"
255            - "/tmp/crash.tar.gz"
256        PROTOCOL:
257            - "SSH"
258    DUMP_LOGS:
259        COMMANDS:
260            - "ls -AX /tmp/htx/htxerr"
261            - "ls -AX /tmp/htx/htxmsg"
262        PROTOCOL:
263            - "SCP"
264
265# Commands and Files to collect for RHE Linux only
266RHEL:
267    GENERAL:
268        COMMANDS:
269            - "rm -rf /tmp/RHEL_general.txt"
270            - 'echo "++++++++++ RHEL Rleasae ++++++++++" > /tmp/RHEL_general.txt'
271            - "cat /etc/os-release >> /tmp/RHEL_general.txt"
272            - 'echo -e "\n++++++++++ Time stamp ++++++++++" >>
273              /tmp/RHEL_general.txt'
274            - "date >> /tmp/RHEL_general.txt"
275            - 'echo -e "\n++++++++++ uname -a ++++++++++" >>
276              /tmp/RHEL_general.txt'
277            - "uname -a >> /tmp/RHEL_general.txt"
278            - 'echo -e "\n++++++++++ uptime ++++++++++" >> /tmp/RHEL_general.txt'
279            - "uptime >> /tmp/RHEL_general.txt"
280        FILES:
281            - "/tmp/RHEL_general.txt"
282        PROTOCOL:
283            - "SSH"
284    RHEL_LOGS:
285        COMMANDS:
286            - "{ cat /etc/os-release; uname -a; rpm -qa ; } >/tmp/OS_info.txt"
287            - "tail -n 200000 /var/log/messages >/tmp/OS_syslog.txt"
288            - "rm -rf /tmp/sosreport*FFDC*"
289            - {
290                  ? "sosreport --batch --tmp-dir /tmp --label FFDC
291                    >/tmp/OS_sosreport.txt"
292                  : 1200,
293              }
294            - "tar -zcvf /tmp/crash.tar.gz /var/crash"
295        FILES:
296            - "/tmp/OS_info.txt"
297            - "/tmp/OS_syslog.txt"
298            - "/tmp/OS_sosreport.txt"
299            - "/tmp/sosreport*.tar.xz"
300            - "/tmp/crash.tar.gz"
301        PROTOCOL:
302            - "SSH"
303    DUMP_LOGS:
304        COMMANDS:
305            - "ls -AX /tmp/htx/htxerr"
306            - "ls -AX /tmp/htx/htxmsg"
307        PROTOCOL:
308            - "SCP"
309
310# Commands and Files to collect for SLES Linux only
311SLES:
312    GENERAL:
313        COMMANDS:
314            - "rm -rf /tmp/SLES_general.txt"
315            - 'echo "++++++++++ SLES Rleasae ++++++++++" > /tmp/SLES_general.txt'
316            - "cat /etc/os-release >> /tmp/SLES_general.txt"
317            - 'echo "\n++++++++++ Time stamp ++++++++++" >>
318              /tmp/SLES_general.txt'
319            - "date >> /tmp/SLES_general.txt"
320            - 'echo "\n++++++++++ uname -a ++++++++++" >> /tmp/SLES_general.txt'
321            - "uname -a >> /tmp/SLES_general.txt"
322            - 'echo "\n++++++++++ uptime ++++++++++" >> /tmp/SLES_general.txt'
323            - "uptime >> /tmp/SLES_general.txt"
324        FILES:
325            - "/tmp/SLES_general.txt"
326        PROTOCOL:
327            - "SSH"
328    SLES_LOGS:
329        COMMANDS:
330            - "{ cat /etc/os-release; uname -a; rpm -qa ; } >/tmp/OS_info.txt"
331            - "tail -n 200000 /var/log/messages >/tmp/OS_syslog.txt"
332            - "rm -rf /tmp/scc*.txz.md5"
333            - { "supportconfig >/tmp/OS_supportconfig.txt": 1200 }
334            - "cp /var/log/scc*.txz.md5 /tmp/"
335            - "tar -zcvf /tmp/crash.tar.gz /var/crash"
336        FILES:
337            - "/tmp/OS_info.txt"
338            - "/tmp/OS_syslog.txt"
339            - "/tmp/OS_supportconfig.txt"
340            - "/tmp/scc*.txz.md5"
341            - "/tmp/crash.tar.gz"
342        PROTOCOL:
343            - "SSH"
344    DUMP_LOGS:
345        COMMANDS:
346            - "ls -AX /tmp/htx/htxerr"
347            - "ls -AX /tmp/htx/htxmsg"
348        PROTOCOL:
349            - "SCP"
350
351# Commands and Files to collect for AIX only
352AIX:
353    GENERAL:
354        COMMANDS:
355            - "rm -rf /tmp/AIX_general.txt"
356            - 'echo "++++++++++ AIX Release ++++++++++" > /tmp/AIX_general.txt'
357            - "cat /proc/version | tail -1 >> /tmp/AIX_general.txt"
358            - 'echo "\n++++++++++ Time stamp ++++++++++" >> /tmp/AIX_general.txt'
359            - "date >> /tmp/AIX_general.txt"
360            - 'echo  "\n++++++++++ uname -a ++++++++++" >> /tmp/AIX_general.txt'
361            - "uname -a >> /tmp/AIX_general.txt"
362            - 'echo "\n++++++++++ uptime ++++++++++" >> /tmp/AIX_general.txt'
363            - "uptime >> /tmp/AIX_general.txt"
364            - 'echo "\n++++++++++ System Info ++++++++++" >>
365              /tmp/AIX_general.txt'
366            - "prtconf | head -15 >> /tmp/AIX_general.txt"
367        FILES:
368            - "/tmp/AIX_general.txt"
369        PROTOCOL:
370            - "SSH"
371    AIX_LOGS:
372        COMMANDS:
373            - "errpt -a >/tmp/OS_errpt.txt ; errclear 0;"
374            - "bindprocessor -q >/tmp/OS_processors.txt"
375        FILES:
376            - "/tmp/OS_errpt.txt"
377            - "/tmp/OS_processors.txt"
378        PROTOCOL:
379            - "SSH"
380    DUMP_LOGS:
381        COMMANDS:
382            - "ls -AX /tmp/htx/htxerr"
383            - "ls -AX /tmp/htx/htxmsg"
384        PROTOCOL:
385            - "SCP"
386