From: James Feist <james.feist@linux.intel.com>
To: "Tony Lee (李文富)" <Tony.Lee@quantatw.com>,
"jason.m.bills@linux.intel.com" <jason.m.bills@linux.intel.com>
Cc: "openbmc@lists.ozlabs.org" <openbmc@lists.ozlabs.org>,
"Buddy Huang (黃天鴻)" <Buddy.Huang@quantatw.com>
Subject: Re: Showing signed sensor value when the command "ipmitool sel elist" is executed
Date: Mon, 28 Oct 2019 10:16:38 -0700 [thread overview]
Message-ID: <efe40787-6aae-c64d-128e-42dd0ed912f2@linux.intel.com> (raw)
In-Reply-To: <b3c1129773c64c97b9655701cb506578@quantatw.com>
On 10/27/19 11:41 PM, Tony Lee (李文富) wrote:
> Hi Jason,
>
> We know that when we execute the command "ipmitool sel elist", it will return something like the following,
> "18 | 10/16/19 | 18:28:41 UTC | Temperature nvme0 | Upper Non-critical going high | Asserted | Reading 72 > Threshold 70 degrees C".
>
> I met a problem that when the sensor value in the d-bus is negative, the current reading in "ipmitool sel elist" will be 0.
> It seems that because the type of scaledValue is defined "uint32_t", there is always a none negative value even current value is a negative value obtained from the d-bus. In
> https://github.com/openbmc/phosphor-sel-logger/blob/master/include/sensorutils.hpp#L159
>
> Is this is an issue or I need to set it up somewhere?
If min is < 0, then this should work:
https://github.com/openbmc/phosphor-sel-logger/blob/6afe9560852c6431c43c8e79a28e2b7cb498e355/include/sensorutils.hpp#L61
https://github.com/openbmc/phosphor-dbus-interfaces/blob/12162be363f11b9dafa92b5379db671712b3523c/xyz/openbmc_project/Sensor/Value.interface.yaml#L28
It uses MinValue < 0 to determine if the sensor is signed or not.
Thanks,
-James
>
> Thanks
> Best Regards,
> Tony
>
next prev parent reply other threads:[~2019-10-28 17:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-28 6:41 Showing signed sensor value when the command "ipmitool sel elist" is executed Tony Lee (李文富)
2019-10-28 17:16 ` James Feist [this message]
2019-10-29 6:40 ` Tony Lee (李文富)
2019-10-29 16:18 ` James Feist
2019-10-29 17:11 ` James Feist
2019-10-30 5:50 ` Tony Lee (李文富)
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=efe40787-6aae-c64d-128e-42dd0ed912f2@linux.intel.com \
--to=james.feist@linux.intel.com \
--cc=Buddy.Huang@quantatw.com \
--cc=Tony.Lee@quantatw.com \
--cc=jason.m.bills@linux.intel.com \
--cc=openbmc@lists.ozlabs.org \
/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.