Host console logs service
Sai Dasari
sdasari at fb.com
Thu Oct 25 04:38:11 AEDT 2018
On 10/24/18, 8:56 AM, "openbmc on behalf of Artem Senichev" <openbmc-bounces+sdasari=fb.com at lists.ozlabs.org on behalf of artemsen at gmail.com> wrote:
Hi All,
As you know, OpenBMC contains obmc-console project that intended to
work with host's console. It's very useful that omc-console-server
stores last logs inside its ring buffer, but it would be better to
make the log collector more smarter.
On our VESNIN server, we have an own extension of obmc-console - it is
a standalone service that reads log messages from obmc-console-server,
marks each message with a timestamp and save it to an internal memory
buffer. We have a custom policy that determines how large a buffer can
be (limit by time or message numbers), in which cases the buffer
should be flushed to a file, and how many previous log files can be
saved on a flash drive (some kind of rotation).
By default the buffer has limit of 3000 messages and it flushed to a
file on every significant host state change (host on/off, OS boot
complete). This gives us the opportunity to store not only the latest
messages, but also the logs of the last boot process separately
(hostboot, skiboot, etc).
So, if you find this service useful for the OpenBMC project, we can
upload the source code to the community.
Thanks Artem! Based on the description above, it looks like very useful feature. Few questions related to design are: Is this stand-alone service designed as a D-Bus service? How does this change the existing user interface with obmc-console i.e. any new CLI options change or behavior change? Can this be used from REST-API or Redfish? How to configure the custom policy to configure? Etc. It would be great if you could use the Design template @ https://github.com/openbmc/docs/tree/master/designs to explain the design details for helping in understanding and providing feedback.
Sources:
https://github.com/YADRO-KNS/phosphor-hostlogger
Small demo:
# ls -lA /var/lib/obmc/hostlogs
-rw-r--r-- 1 root root 6336 Oct 24 09:26
host_20181024_092655.log.gz
-rw-r--r-- 1 root root 9589 Oct 24 11:43
host_20181024_114342.log.gz
-rw-r--r-- 1 root root 6547 Oct 24 12:01
host_20181024_120119.log.gz
# zcat /var/lib/obmc/hostlogs/host_20181024_120119.log.gz
[ 11:55:02 ]: >>> Log collection started at 24.10.2018 11:55:02
[ 11:55:02 ]: --== Welcome to Hostboot v2.1-199-g38a9f30-dirty/hbicore.bin/ ==--
[ 11:55:06 ]: 5.66868|ISTEP 6. 3 - host_init_fsi
[ 11:55:06 ]: 6.27102|ISTEP 6. 4 - host_set_ipl_parms
[ 11:55:06 ]: 6.27234|ISTEP 6. 5 - host_discover_targets
...
Best regards,
Artem Senichev
Software Engineer, YADRO.
More information about the openbmc
mailing list