Skip to content
Commit bbd80db8 authored by Claire Weinan's avatar Claire Weinan Committed by Ed Tanous
Browse files

LogService: Increase dump timestamp precision

This is a follow-on to "LogService: Increase Fault Log timestamp
precision" [1]. Since microsecond precision timestamp support for
other dump types (in addition to FaultLog) have recently been added in
phosphor-debug-collector (see "Populate timestamps with microsecond
precision" [2]), we now update bmcweb to expose these timestamps with
microsecond precision.

Dump entry "Created" timestamps are based on the "Elapsed" property of
the D-Bus interface xyz.openbmc_project.Time.EpochTime [3], which is
defined as time elapsed since the epoch in microseconds.

Client impact: Dump entry "Created" timestamps are shown with
microsecond precision instead of second precision, for entries of all
dump types (not just FaultLog).

Tested:
Forced creation of a system dump entry from BMC console:
```
busctl call xyz.openbmc_project.Dump.Manager  /xyz/openbmc_project/dump/system xyz.openbmc_project.Dump.NewDump Notify ut 1 2
```

Retrieved the entry individually and as part of its collection:
```
curl -k -H "X-Auth-Token: $token" -X GET http://${bmc}/redfish/v1/Systems/system/LogServices/Dump/Entries/1
curl -k -H "X-Auth-Token: $token" -X GET http://${bmc}/redfish/v1/Systems/system/LogServices/Dump/Entries
```

Before change: `"Created": "2022-10-25T22:56:13+00:00",`
After change:  `"Created": "2022-10-25T22:56:13.271157+00:00",`

Redfish Service Validator passed on the following URI trees:
/redfish/v1/Managers/bmc/LogServices/Dump/Entries
/redfish/v1/Managers/bmc/LogServices/FaultLog/Entries
/redfish/v1/Systems/system/LogServices/Dump/Entries

[1] https://github.com/openbmc/bmcweb/commit/c6fecdabd58b4c380caf1b83801ad4eb54922fff
[2] https://github.com/openbmc/phosphor-debug-collector/commit/c0ab9d43d5e19123cca1a1592ee07fc064b84199
[3] https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Time/EpochTime.interface.yaml



Signed-off-by: default avatarClaire Weinan <cweinan@google.com>
Change-Id: Ia1682d09cf196c63da7d236df31695be5a5ad34b
parent 0ea4b4e2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment