<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
27.03.2018 04:41, Emily Shaffer wrote:<br>
<blockquote type="cite"
cite="mid:CAJoAoZnuJvrOSh7dxN7rx0o-y0_KG8w4Y4+wBwyWXKAVsxg=Dg@mail.gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div dir="ltr"><br>
<br>
<div class="gmail_quote">
<div dir="ltr">On Mon, Mar 26, 2018 at 5:00 AM Ratan Gupta
<<a href="mailto:ratagupt@linux.vnet.ibm.com"
moz-do-not-send="true">ratagupt@linux.vnet.ibm.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I would be explaining a rough idea of how we plan to go
about,<br>
This is related to <a
href="https://github.com/openbmc/openbmc/issues/2979"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://github.com/openbmc/openbmc/issues/2979</a><br>
<br>
Please share your thoughts and feedback on this proposal.<br>
<br>
=>we were planning to add the property in the chassis
interface<br>
which tells that since how many hours chassis was powered
on.<br>
<br>
=>This property gets updated by internal timer which
wakes up after<br>
an hour and updates this property if chassis is powered
on.<br>
<br>
1) Should we set the uptime to 0 if chassis state has
been<br>
transitioned from<br>
PowerOn-->PowerOff<br>
<br>
or<br>
<br>
2) Don't update this property for the chassis power off
duration and<br>
update<br>
this property when the chassis state changes to PowerOn.<br>
<br>
What is community view on this?<br>
</blockquote>
<div><br>
</div>
<div>IMO, it depends on whether clients might be using this
uptime to determine whether the host is on now; or maybe
whether they might need to capture the latest uptime during
some crash log that begins after the host goes down. My gut
feeling is that it's correct to set it to zero when it
powers off, and start incrementing it again starting when it
powers on. But I also suppose it's not feasible to use
uptime to determine current host state, if the value is
stored in hours, since it would be almost one full hour
before the value could report the host as "on"....</div>
<div><br>
</div>
<div>Is there a use case where someone might want to read the
previous uptime, while the host is still down?</div>
</div>
</div>
</blockquote>
I believe, we must follow the IPMI specification, which clearly
states in section 1.7.28 that the POH counter is:<br>
<br>
"to return a counter value proportional to the system operating (S0)
power-on hours"<br>
<br>
It looks quite clear to me that this is similar to a car mileage
meter. That is, a means to identify when it's time to do some
servicing and/or track warranty.<br>
<br>
The note in section 28.14 further backs my understanding and
clarifies the matter:<br>
<br>
======<br>
Note that in a power-managed system, the definition of ‘powered up’
can be somewhat ambiguous. The definition<br>
used here is that the power-on hours shall accumulate whenever the
system is in the operational (S0) state. An<br>
implementation may elect to increment power-on hours in the S1 and
S2 states as well.<br>
<br>
‘Clear’ or ‘Set’ commands are not specified for this counter. This
is because the counter is most typically used for<br>
warranty tracking or replacement purposes where changing or clearing
the counter would defeat the purpose.<br>
======<br>
<br>
Hence, we need to elect whether or not we want to count S1 and S2
states (whatever they are called for POWER), but there shall be no
doubt that the value is cumulative and must not be reset to zero.<br>
<br>
P.S. I must say that I often see how the community is trying to
reinvent IPMI without reading the specifications. I believe it is a
very wrong approach, and I implore you all to first try to find the
answer in the IPMI specification, and only when the answer can not
be found, turn to other implementations like MegaRAC or anything.<br>
<br>
Sincerely,<br>
Alexander.<br>
</body>
</html>