Collect Bad VPD as a part of BMC dump.

Collect bad VPD as a part of user intiated BMC dump.
In openpower-vpd-parser we collect IBM vpd using a feature flag "ibm-parser".
So the vpd we collect are specific to ibm-systems. Hence placing the badvpd plugin
in tools/dreport.d/ibm.d rather than in tools/dreport.d/plugins.d.

The badvpd plugin will get installed via phosphor-debug-collector recipe file from meta-ibm layer.

The symlink creation to the right type of plugin directory(say - pl_user.d/pl_elog.d/pl_checkstop.d/pl_core.d)
will also be done from the meta-ibm layer in phosphor-debug-collector recipe file.

Tested on simics:

root@rainier:~# mkdir /tmp/bad-vpd
root@rainier:~# dreport -v
Wed Mar 3 04:43:18 UTC 2021 Name:          obmcdump_00000000_1614746598.tar.xz
Wed Mar 3 04:43:18 UTC 2021 Epochtime:     1614746598
Wed Mar 3 04:43:18 UTC 2021 ID:            00000000
Wed Mar 3 04:43:18 UTC 2021 Type:          user
Wed Mar 3 04:43:18 UTC 2021 INFO: Collected disk usage
Wed Mar 3 04:43:18 UTC 2021 INFO: Collected failed services
Wed Mar 3 04:43:19 UTC 2021 INFO: Collected Journal pretty log
Wed Mar 3 04:43:19 UTC 2021 INFO: Copied Memory info /proc/meminfo
Wed Mar 3 04:43:19 UTC 2021 INFO: Collected top
Wed Mar 3 04:43:19 UTC 2021 INFO: Copied Bad VPD /tmp/bad-vpd
Wed Mar 3 04:43:19 UTC 2021 INFO: Copied OS release info /etc/os-release
Wed Mar 3 04:43:19 UTC 2021 INFO: No elog entries
Wed Mar 3 04:43:19 UTC 2021 INFO: Collected inventory
Wed Mar 3 04:43:19 UTC 2021 INFO: Copied OBMC console log /var/log/obmc-console.log
Wed Mar 3 04:43:19 UTC 2021 INFO: Collected ip addr
Wed Mar 3 04:43:19 UTC 2021 INFO: Collected ip link
Wed Mar 3 04:43:19 UTC 2021 INFO: Collected PRI-Flash: U-Boot environment variables
Wed Mar 3 04:43:19 UTC 2021 INFO: Copied GUARD Records /var/lib/phosphor-software-manager/pnor/prsv/GUARD
Wed Mar 3 04:43:19 UTC 2021 ERROR: /etc/alt_fw_env.config does not exist
Wed Mar 3 04:43:19 UTC 2021 INFO: Copied CPU info /proc/cpuinfo
Wed Mar 3 04:43:19 UTC 2021 INFO: Collected uptime
Wed Mar 3 04:43:19 UTC 2021 INFO: Collected BMC State
Wed Mar 3 04:43:19 UTC 2021 INFO: Collected Chassis State
Wed Mar 3 04:43:19 UTC 2021 INFO: Collected hostnamectl
Wed Mar 3 04:43:19 UTC 2021 INFO: Collected Host State
Adding Dump Header :/usr/share/dreport.d/include.d/gendumpheader
Wed Mar 3 04:44:08 UTC 2021 Report is available in /tmp
Wed Mar 3 04:44:08 UTC 2021 Successfully completed

Check the dump tar file generated in /tmp directory.
After skipping 628 bytes of dump header in tar, untar it.
The files in /tmp/bad-vpd directory will get collected.

Signed-off-by: PriyangaRamasamy <priyanga24@in.ibm.com>
Change-Id: I47f6dde077f9852cc3061cc8c03819c12749337c
1 file changed
tree: a104943472ef6052ca780df0301a12833ca98131
  1. dump-extensions/
  2. host-transport-extensions/
  3. test/
  4. tools/
  5. xyz/
  6. .clang-format
  7. .gitignore
  8. bmc_dump_entry.cpp
  9. bmc_dump_entry.hpp
  10. core_manager.cpp
  11. core_manager.hpp
  12. core_manager_main.cpp
  13. dump-extensions.hpp
  14. dump_entry.cpp
  15. dump_entry.hpp
  16. dump_internal.hpp
  17. dump_manager.cpp
  18. dump_manager.hpp
  19. dump_manager_bmc.cpp
  20. dump_manager_bmc.hpp
  21. dump_manager_main.cpp
  22. dump_offload.cpp
  23. dump_offload.hpp
  24. dump_serialize.cpp
  25. dump_serialize.hpp
  26. dump_utils.cpp
  27. dump_utils.hpp
  28. elog_watch.cpp
  29. elog_watch.hpp
  30. errors_map.mako.hpp
  31. errors_map_gen.py
  32. example_errors_watch.yaml
  33. ffdc
  34. host_transport_exts.hpp
  35. LICENSE
  36. MAINTAINERS
  37. meson.build
  38. meson_options.txt
  39. README.md
  40. watch.cpp
  41. watch.hpp
README.md

phosphor-debug-collector

Phosphor Debug Collector provides mechanisms to collect various log files and system parameters. Used to troubleshoot problems in OpenBMC based systems.

To Build

To build this package with meson, do the following steps:

    1. meson builddir
    2. ninja -C builddir

To clean the built files run ninja -C builddir clean.

To run unit tests

Tests can be run in the CI docker container, refer local-ci-build

or with an OpenBMC x86 sdk(see below for x86 steps).

meson -Doe-sdk=enabled -Dtests=enabled build
ninja -C build test