openbmc Digest, Vol 41, Issue 79

Bills, Jason M jason.m.bills at linux.intel.com
Wed Jan 23 07:10:05 AEDT 2019



On 1/20/2019 7:28 PM, 刘锡伟 wrote:
> Hi
> 1. I would like to ask any one how to generate BMC logging through 
> phosphor-logging?

Are you looking at internal BMC logging or system event logging to view 
through something like 'ipmitool sel'?

For internal BMC logging, you can simply call the 
phosphor::logging::log<level>() function to add the message to the journal.

I'm not as familiar with it, but phosphor-logging also has report() and 
commit() capabilities to add error objects to D-Bus.  I believe these 
objects can be viewed using 'ipmitool sel' commands.

> 2. When to call the IpmiSelAdd and IpmiSelAddOem methods?

phosphor-sel-logger uses a new approach to log IPMI SEL events to the 
journal instead of as D-Bus objects.  Whenever an IPMI sensor has an 
event, it would call IpmiSelAdd or IpmiSelAddOem to log that entry to 
the journal as a SEL event.

For example, if you have a threshold sensor that crosses a critical 
threshold, that event can be logged to the SEL by calling IpmiSelAdd.

Alternatively, phosphor-sel-logger can be extended to watch for events 
from that threshold sensor and log without calling IpmiSelAdd.

> 3. Write the log to journalctl through phosphor-sel-logger. Could you 
> read it through the ipmiStorageGetSELInfo method of intel-ipmi-oem?

Yes.  Today, however, it is tied to the sensor path on D-Bus to get some 
of the information for the SEL record.  Without that mapping, some of 
the data returned by ipmiStorageGetSELInfo may not be accurate.

> Thanks
> 


More information about the openbmc mailing list