phosphor-sel-logger package
HI Jason,
When I use the latest commit(7d5054ac), it can only record one sel log(the latest sel).
After tracing code I found that the recordId [1] always be 1.
[1] https://github.com/openbmc/phosphor-sel-logger/blob/7d5054ac15bee9945ac00c470c36c94b565ac8fa/src/sel_logger.cpp#L112
I have questions about the above situation.
1. where the "selLogFilename"[2] file be created?
Code [3] checks the file but can't find where to create it in this package.
[2] https://github.com/openbmc/phosphor-sel-logger/blob/7d5054ac15bee9945ac00c470c36c94b565ac8fa/include/sel_logger.hpp#L37
[3] https://github.com/openbmc/phosphor-sel-logger/blob/7d5054ac15bee9945ac00c470c36c94b565ac8fa/src/sel_logger.cpp#L55
2. After manually creating a file on /var/log/, the sel log behavior is normal. It can log several logs. but after I clear the sel log, the record id does not restart at 1.
Commit id : 6afe9560852c6431c43c8e79a28e2b7cb498e355
BRs,
will
Hi Will,
Quoted 6 lines · Will Liang (梁永鉉)
HI Jason,
When I use the latest commit(7d5054ac), it can only record one sel log(the latest sel).
After tracing code I found that the recordId [1] always be 1.
[1] https://github.com/openbmc/phosphor-sel-logger/blob/7d5054ac15bee9945ac00c470c36c94b565ac8fa/src/sel_logger.cpp#L112
Sorry for the confusion. This comes from when we ran into issues persisting the journal to flash, so we had to move it from the journal to rsyslog.
The rsyslog implementation we use is available here: https://github.com/Intel-BMC/openbmc/tree/intel/meta-openbmc-mods/meta-common/recipes-extended/rsyslog.
I haven't figured out the right way to put this in upstream, yet.
Quoted 7 lines
I have questions about the above situation.
1. where the "selLogFilename"[2] file be created?
Code [3] checks the file but can't find where to create it in this package.
[2] https://github.com/openbmc/phosphor-sel-logger/blob/7d5054ac15bee9945ac00c470c36c94b565ac8fa/include/sel_logger.hpp#L37
[3] https://github.com/openbmc/phosphor-sel-logger/blob/7d5054ac15bee9945ac00c470c36c94b565ac8fa/src/sel_logger.cpp#L55
With the configuration above, rsyslog will create and update the ipmi_sel file in /var/log as entries get added to the journal.
Quoted 4 lines
2. After manually creating a file on
/var/log/, the sel log behavior is normal. It can log several logs. but after I clear the sel log, the record id does not restart at 1.
Commit id :6afe9560852c6431c43c8e79a28e2b7cb498e355
In intel-ipmi-oem, the clear SEL command deletes the files in /var/log to restart the count at 1: https://github.com/openbmc/intel-ipmi-oem/blob/master/src/storagecommands.cpp#L1071.
Quoted 3 lines
BRs,
will