All of lore.kernel.org
 help / color / mirror / Atom feed
* why sel-logger not add all info to journal?
@ 2019-10-11  2:22 www
  2019-10-11 15:38 ` Bills, Jason M
  0 siblings, 1 reply; 3+ messages in thread
From: www @ 2019-10-11  2:22 UTC (permalink / raw)
  To: openbmc

[-- Attachment #1: Type: text/plain, Size: 1862 bytes --]

Dear all,


Add sel-logger to openbmc project, when threshold sensor generate log, sel-logger will add message to journal, but why the message is incomplete?


sd_journal_send("MESSAGE=%s", message.c_str(),
                            "PRIORITY=%i", selPriority,
                            "MESSAGE_ID=%s", selMessageId,
                            "IPMI_SEL_RECORD_ID=%d", recordId,
                            "IPMI_SEL_RECORD_TYPE=%x", selSystemType,
                            "IPMI_SEL_GENERATOR_ID=%x", genId,
                            "IPMI_SEL_SENSOR_PATH=%s", path.c_str(),
                            "IPMI_SEL_EVENT_DIR=%x", assert,
                            "IPMI_SEL_DATA=%s", selDataStr,
                            NULL);
Sep 30 01:39:48 demoboard sel-logger[1187]: P12V sensor crossed a warning low threshold going low. Reading=0.089000 Threshold=11.400000.
Sep 30 01:39:48 demoboard sel-logger[1187]: P12V sensor crossed a critical low threshold going low. Reading=0.089000 Threshold=10.220000.
Sep 30 01:39:48 demoboard sel-logger[1187]: P5V sensor crossed a warning low threshold going low. Reading=0.231000 Threshold=4.750000.
Sep 30 01:39:48 demoboard sel-logger[1187]: P5V sensor crossed a critical low threshold going low. Reading=0.231000 Threshold=4.500000.
Sep 30 01:39:48 demoboard sel-logger[1187]: P3V3 sensor crossed a warning low threshold going low. Reading=0.002000 Threshold=3.100000.
Sep 30 01:39:48 demoboard sel-logger[1187]: P3V3 sensor crossed a critical low threshold going low. Reading=0.002000 Threshold=3.070000.
Sep 30 01:39:49 demoboard sel-logger[1187]: PVCCIN_CPU1 sensor crossed a warning low threshold going low. Reading=0.001000 Threshold=1.170000.
Sep 30 01:39:49 demoboard sel-logger[1187]: PVCCIN_CPU1 sensor crossed a critical low threshold going low. Reading=0.001000 Threshold=1.070000.
thanks,
Byron

[-- Attachment #2: Type: text/html, Size: 4362 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: why sel-logger not add all info to journal?
  2019-10-11  2:22 why sel-logger not add all info to journal? www
@ 2019-10-11 15:38 ` Bills, Jason M
  2019-10-12  1:12   ` www
  0 siblings, 1 reply; 3+ messages in thread
From: Bills, Jason M @ 2019-10-11 15:38 UTC (permalink / raw)
  To: www, openbmc

On 10/10/2019 7:22 PM, www wrote:
> Dear all,
> 
> Add sel-logger to openbmc project, when threshold sensor generate log, 
> sel-logger will add message to journal, but why the message is incomplete?

By incomplete do you mean that you do not see the journal fields as 
shown in the sd_journal_send() call (MESSAGE_ID, IPMI_SEL_RECORD_ID, etc.)?

Journal entries are made up of various fields each of the form 
"VARIABLE=value".  By default, journalctl only shows the contents of the 
MESSAGE field which is what you show below.  If you want to see all of 
the fields in the journal entry you can use 'journalctl -o json-pretty' 
which will print the full journal entry as a JSON-style object.

> 
> |sd_journal_send("MESSAGE=%s", message.c_str(), "PRIORITY=%i", 
> selPriority, "MESSAGE_ID=%s", selMessageId, "IPMI_SEL_RECORD_ID=%d", 
> recordId, "IPMI_SEL_RECORD_TYPE=%x", selSystemType, 
> "IPMI_SEL_GENERATOR_ID=%x", genId, "IPMI_SEL_SENSOR_PATH=%s", 
> path.c_str(), "IPMI_SEL_EVENT_DIR=%x", assert, "IPMI_SEL_DATA=%s", 
> selDataStr, NULL);|
> 
> |Sep 30 01:39:48 demoboard sel-logger[1187]: P12V sensor crossed a 
> warning low threshold going low. Reading=0.089000 Threshold=11.400000. 
> Sep 30 01:39:48 demoboard sel-logger[1187]: P12V sensor crossed a 
> critical low threshold going low. Reading=0.089000 Threshold=10.220000. 
> Sep 30 01:39:48 demoboard sel-logger[1187]: P5V sensor crossed a warning 
> low threshold going low. Reading=0.231000 Threshold=4.750000. Sep 30 
> 01:39:48 demoboard sel-logger[1187]: P5V sensor crossed a critical low 
> threshold going low. Reading=0.231000 Threshold=4.500000. Sep 30 
> 01:39:48 demoboard sel-logger[1187]: P3V3 sensor crossed a warning low 
> threshold going low. Reading=0.002000 Threshold=3.100000. Sep 30 
> 01:39:48 demoboard sel-logger[1187]: P3V3 sensor crossed a critical low 
> threshold going low. Reading=0.002000 Threshold=3.070000. Sep 30 
> 01:39:49 demoboard sel-logger[1187]: PVCCIN_CPU1 sensor crossed a 
> warning low threshold going low. Reading=0.001000 Threshold=1.170000. 
> Sep 30 01:39:49 demoboard sel-logger[1187]: PVCCIN_CPU1 sensor crossed a 
> critical low threshold going low. Reading=0.001000 Threshold=1.070000.|||
> 
> |thanks,|
> |Byron|
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re:Re: why sel-logger not add all info to journal?
  2019-10-11 15:38 ` Bills, Jason M
@ 2019-10-12  1:12   ` www
  0 siblings, 0 replies; 3+ messages in thread
From: www @ 2019-10-12  1:12 UTC (permalink / raw)
  To: Bills, Jason M; +Cc: openbmc

[-- Attachment #1: Type: text/plain, Size: 2484 bytes --]

Dear Bills,


I can see the details message.
thank you for your help , it is all the world to me.


thanks,
byron







At 2019-10-11 23:38:01, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:
>On 10/10/2019 7:22 PM, www wrote:
>> Dear all,
>> 
>> Add sel-logger to openbmc project, when threshold sensor generate log, 
>> sel-logger will add message to journal, but why the message is incomplete?
>
>By incomplete do you mean that you do not see the journal fields as 
>shown in the sd_journal_send() call (MESSAGE_ID, IPMI_SEL_RECORD_ID, etc.)?
>
>Journal entries are made up of various fields each of the form 
>"VARIABLE=value".  By default, journalctl only shows the contents of the 
>MESSAGE field which is what you show below.  If you want to see all of 
>the fields in the journal entry you can use 'journalctl -o json-pretty' 
>which will print the full journal entry as a JSON-style object.
>
>> 
>> |sd_journal_send("MESSAGE=%s", message.c_str(), "PRIORITY=%i", 
>> selPriority, "MESSAGE_ID=%s", selMessageId, "IPMI_SEL_RECORD_ID=%d", 
>> recordId, "IPMI_SEL_RECORD_TYPE=%x", selSystemType, 
>> "IPMI_SEL_GENERATOR_ID=%x", genId, "IPMI_SEL_SENSOR_PATH=%s", 
>> path.c_str(), "IPMI_SEL_EVENT_DIR=%x", assert, "IPMI_SEL_DATA=%s", 
>> selDataStr, NULL);|
>> 
>> |Sep 30 01:39:48 demoboard sel-logger[1187]: P12V sensor crossed a 
>> warning low threshold going low. Reading=0.089000 Threshold=11.400000. 
>> Sep 30 01:39:48 demoboard sel-logger[1187]: P12V sensor crossed a 
>> critical low threshold going low. Reading=0.089000 Threshold=10.220000. 
>> Sep 30 01:39:48 demoboard sel-logger[1187]: P5V sensor crossed a warning 
>> low threshold going low. Reading=0.231000 Threshold=4.750000. Sep 30 
>> 01:39:48 demoboard sel-logger[1187]: P5V sensor crossed a critical low 
>> threshold going low. Reading=0.231000 Threshold=4.500000. Sep 30 
>> 01:39:48 demoboard sel-logger[1187]: P3V3 sensor crossed a warning low 
>> threshold going low. Reading=0.002000 Threshold=3.100000. Sep 30 
>> 01:39:48 demoboard sel-logger[1187]: P3V3 sensor crossed a critical low 
>> threshold going low. Reading=0.002000 Threshold=3.070000. Sep 30 
>> 01:39:49 demoboard sel-logger[1187]: PVCCIN_CPU1 sensor crossed a 
>> warning low threshold going low. Reading=0.001000 Threshold=1.170000. 
>> Sep 30 01:39:49 demoboard sel-logger[1187]: PVCCIN_CPU1 sensor crossed a 
>> critical low threshold going low. Reading=0.001000 Threshold=1.070000.|||
>> 
>> |thanks,|
>> |Byron|
>> 
>> 

[-- Attachment #2: Type: text/html, Size: 3310 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-12  1:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-11  2:22 why sel-logger not add all info to journal? www
2019-10-11 15:38 ` Bills, Jason M
2019-10-12  1:12   ` www

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.