#
9d921096 |
| 15-Dec-2022 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Capture the journal in UserData sections
If a PEL message registry entry has a 'JournalCapture' section, capture the listed portions of the journal in UserData sections for that error.
If the
PEL: Capture the journal in UserData sections
If a PEL message registry entry has a 'JournalCapture' section, capture the listed portions of the journal in UserData sections for that error.
If the JSON looks like:
"JournalCapture": { "NumLines": 30 }
Then the code will capture the previous 30 lines from the journal into a single UserData section.
If the JSON looks like:
"JournalCapture": { "Sections": [ { "SyslogID": "phosphor-bmc-state-manager", "NumLines": 20 }, { "SyslogID": "phosphor-log-manager", "NumLines": 15 } ] }
Then the code will create two UserData sections, the first with the most recent 20 lines from phosphor-bmc-state-manager, and the second with 15 lines from phosphor-log-manager.
If a section would cause the PEL to exceed its maximum size of 16KB, it will be dropped. While the UserData class does have a shrink() method, it prunes data from the end, which would cause the most recent journal entries to be removed, which could be misleading.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I2ecbd8002b0e7087eb166a1219c6ab9da14a122a
show more ...
|
#
d96fa60d |
| 15-Dec-2022 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Create class to read from the journal
Create a Journal class that can extract messages out of the journal and return them as a vector of strings that look like:
"Dec 14 15:58:17 systemd[1]: sy
PEL: Create class to read from the journal
Create a Journal class that can extract messages out of the journal and return them as a vector of strings that look like:
"Dec 14 15:58:17 systemd[1]: systemd-tmpfiles-clean.service: Deactivated successfully."
It can either grab the previous N entries, or the previous N entries that match a specific SYSLOG_IDENTIFIER value.
The class follows the same strategy as the DataInterface class where a base class pointer is passed into the PEL Manager class so that during unit test it can be mocked.
Future commits will capture the journal into PEL UserData sections.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I9f4bb304c4b213165049fa00de2e62f962ae67f1
show more ...
|