All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bills, Jason M" <jason.m.bills@linux.intel.com>
To: www <ouyangxuan10@163.com>,
	"openbmc@lists.ozlabs.org" <openbmc@lists.ozlabs.org>
Subject: Re: why sel-logger not add all info to journal?
Date: Fri, 11 Oct 2019 08:38:01 -0700	[thread overview]
Message-ID: <7977c2a2-1432-3db2-e598-1f434dfd166e@linux.intel.com> (raw)
In-Reply-To: <6db4fd1b.3ba4.16db89fcc8b.Coremail.ouyangxuan10@163.com>

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|
> 
> 

  reply	other threads:[~2019-10-11 15:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-11  2:22 why sel-logger not add all info to journal? www
2019-10-11 15:38 ` Bills, Jason M [this message]
2019-10-12  1:12   ` www

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7977c2a2-1432-3db2-e598-1f434dfd166e@linux.intel.com \
    --to=jason.m.bills@linux.intel.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=ouyangxuan10@163.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.