tree: 75a1ebe31b272d8dcc813a2515247491b876a88e [path history] [tgz]
  1. Syslog/
  2. Create.interface.yaml
  3. Entry.interface.yaml
  4. ErrorBlocksTransition.interface.yaml
  5. Event.interface.yaml
  6. IPMI.interface.yaml
  7. README.md
  8. SEL.errors.yaml
  9. SEL.metadata.yaml
  10. Settings.interface.yaml
yaml/xyz/openbmc_project/Logging/README.md

OpenBMC logging

  • Provides a mechanism for logging events and errors to the journal.
  • Creates error entry D-Bus objects when an error is reported/committed.
  • Persists error entries across power off.

Error definitions

Generic error definitions

  • Generic errors used by applications are defined at phosphor-dbus-interfaces.
  • Generic errors can be used by all the applications by including the generated elog-errors.hpp header file.

Application error definitions

  • There are errors that are not generic and are very specific to the application. Such errors are defined in the application that uses the error.
  • Refer to openpower-debug-collector.

Error YAML files

  • Every error defined will have an error YAML file and a corresponding error metadata YAML file.
  • The error YAML file contains the error name and a one-line description of the error. An example of an error YAML file can be found here.
  • The error metadata YAML file captures required data. The format of the data is defined in the error metadata file. An example of an error metadata YAML file can be found here.

Logging to journal

  • Applications can log debug/error information to the journal using the log API
  • Applications can commit errors to the journal using the report or commit API
    • Refer to elog.hpp.
    • Logging entry D-Bus objects are created for the committed errors.

Delete All interface

REST commands

Logging in

  • Before you can do anything, you need to first login.
export bmc=xx.xx.xx.xx
curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST \
    -d '{"data": [ "root", "<root-password>" ] }' \
    https://{$bmc}/login

List logging child objects recursively

curl -c cjar -b cjar -k https://${bmc}/xyz/openbmc_project/logging/list

List logging attributes of child objects recursively

curl -c cjar -b cjar -s -k -H "Content-Type: application/json" -X GET \
    -d '{"data" : []}' \
    https://${bmc}/xyz/openbmc_project/logging/enumerate

Delete logging entries

curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST \
    -d '{"data": []}' \
    https://${bmc}/xyz/openbmc_project/logging/entry/<entry-num>/action/Delete

Delete all logging entries

curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST \
    -d "{\"data\": [] }" \
    https://${bmc}/xyz/openbmc_project/logging/action/DeleteAll