<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:·s²Ó©úÅé;
        panose-1:2 2 5 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@·s²Ó©úÅé";
        panose-1:2 1 6 1 0 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"¯Â¤å¦r ¦r¤¸";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Calibri",sans-serif;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.a
        {mso-style-name:"¯Â¤å¦r ¦r¤¸";
        mso-style-priority:99;
        mso-style-link:¯Â¤å¦r;
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1269695875;
        mso-list-template-ids:985435012;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:„h;
        mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:„X;
        mso-level-tab-stop:108.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:„X;
        mso-level-tab-stop:144.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:„X;
        mso-level-tab-stop:180.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:„X;
        mso-level-tab-stop:216.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:„X;
        mso-level-tab-stop:252.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:„X;
        mso-level-tab-stop:288.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:„X;
        mso-level-tab-stop:324.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l1
        {mso-list-id:1293251441;
        mso-list-template-ids:-207869536;}
@list l1:level1
        {mso-level-number-format:bullet;
        mso-level-text:„h;
        mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l1:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l1:level3
        {mso-level-number-format:bullet;
        mso-level-text:„X;
        mso-level-tab-stop:108.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l1:level4
        {mso-level-number-format:bullet;
        mso-level-text:„X;
        mso-level-tab-stop:144.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l1:level5
        {mso-level-number-format:bullet;
        mso-level-text:„X;
        mso-level-tab-stop:180.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l1:level6
        {mso-level-number-format:bullet;
        mso-level-text:„X;
        mso-level-tab-stop:216.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l1:level7
        {mso-level-number-format:bullet;
        mso-level-text:„X;
        mso-level-tab-stop:252.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l1:level8
        {mso-level-number-format:bullet;
        mso-level-text:„X;
        mso-level-tab-stop:288.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l1:level9
        {mso-level-number-format:bullet;
        mso-level-text:„X;
        mso-level-tab-stop:324.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l2
        {mso-list-id:2053722701;
        mso-list-type:hybrid;
        mso-list-template-ids:458155410 -488465268 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l2:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:„«;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:18.0pt;
        text-indent:-18.0pt;
        font-family:Wingdings;
        mso-fareast-font-family:·s²Ó©úÅé;
        mso-bidi-font-family:"Courier New";}
@list l2:level2
        {mso-level-number-format:bullet;
        mso-level-text:ƒÞ;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:48.0pt;
        text-indent:-24.0pt;
        font-family:Wingdings;}
@list l2:level3
        {mso-level-number-format:bullet;
        mso-level-text:ƒå;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:72.0pt;
        text-indent:-24.0pt;
        font-family:Wingdings;}
@list l2:level4
        {mso-level-number-format:bullet;
        mso-level-text:ƒÜ;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:96.0pt;
        text-indent:-24.0pt;
        font-family:Wingdings;}
@list l2:level5
        {mso-level-number-format:bullet;
        mso-level-text:ƒÞ;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:120.0pt;
        text-indent:-24.0pt;
        font-family:Wingdings;}
@list l2:level6
        {mso-level-number-format:bullet;
        mso-level-text:ƒå;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:144.0pt;
        text-indent:-24.0pt;
        font-family:Wingdings;}
@list l2:level7
        {mso-level-number-format:bullet;
        mso-level-text:ƒÜ;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:168.0pt;
        text-indent:-24.0pt;
        font-family:Wingdings;}
@list l2:level8
        {mso-level-number-format:bullet;
        mso-level-text:ƒÞ;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:192.0pt;
        text-indent:-24.0pt;
        font-family:Wingdings;}
@list l2:level9
        {mso-level-number-format:bullet;
        mso-level-text:ƒå;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:216.0pt;
        text-indent:-24.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="ZH-TW" link="blue" vlink="purple">
<div class="WordSection1">
<div>
<div>
<div>
<p class="MsoPlainText"><span lang="EN-US">Hi Nan,<o:p></o:p></span></p>
<p class="MsoPlainText" style="text-indent:12.0pt"><span lang="EN-US">Thank you for the announcement, and here is a little feedback for the introduction.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Hope it will be helpful to you.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">On Mon, Mar 08, 2021 at 01:45:00PM -0800, Nan Zhou wrote:<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   We found there are some improvements as listed below,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   - Logs are not exposed to Redfish until they reach BUF_MAXSIZE or BUF_MAXTIME
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   (defined in https://github.com/openbmc/phosphor-hostlogger), but we want
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   to achieve a stream-like console. We could set BUF_MAXSIZE to 1 or BUF_MAXTIME<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   to a very short interval, but it will amplify the overhead of compression and
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   decompression.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Just remind that hostlogger message can manual flush by trigger signal SIGUSR1.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   - Persistence isn</span><span lang="EN-US" style="font-family:"Courier New"">¡¦</span><span lang="EN-US">t optional. phosphor-hostlogger doesn</span><span lang="EN-US" style="font-family:"Courier New"">¡¦</span><span lang="EN-US">t
 expose any IPC interface. <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   bmcweb can only talk to phosphor-hostlogger via zip files, which makes persistence of logs a necessary condition.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   - Method 1: *D-Bus Signal*; phosphor-hostlogger implements an interface<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   which contains a signal. The payload of the signal should contain<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   timestamps and log messages.  BmcWeb registers as a listener and once it<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   receives a signal, it populates a new LogEntry. BmcWeb should implement its<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   own configurable ring buffer to store log entries received from D-Bus.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">I think this method can be covered by phosphor-hostlogger if we using SIGUSR1 to trigger the message.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">But the performance will be a problem.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   - Method 2: *File Watcher*; add file watchers in BmcWeb to monitor the<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   log files produced by phosphor-hostlogger. This method is similar to method<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   1. But persistence is still a necessary condition.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   - Method 3: *obmc-console + bmcweb*: install the console collection and<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   ring buffer parts of phosphor-hostlogger as a library. Use the library<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   directly in BmcWeb to collect console logs.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">I prefer to this method, but how to implement the phosphor-hostlogger as a library and install into the existing bmcweb may be a problem.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   - Method 4: *phosphor-hostlogger + journal + rsyslog + bmcweb*: this<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   architecture is very similar to what the current OpenBMC uses for<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   redfish-event<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   <<a href="https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenbmc%2Fdocs%2Fblob%2Fmaster%2Farchitecture%2Fredfish-logging-in-bmcweb.md&amp;data=04%7C01%7CSpencer.Ku%40quantatw.com%7Cb9cdaaa48d1d4d20771208d8e307e0a5%7C179b032707fc4973ac738de7313561b2%7C1%7C0%7C637508970271861045%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=7RwG8tjsFT5NHT6KhdxRcPi6jNJqi7LLV3QuaeoMpd8%3D&amp;reserved=0">https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenbmc%2Fdocs%2Fblob%2Fmaster%2Farchitecture%2Fredfish-logging-in-bmcweb.md&amp;data=04%7C01%7CSpencer.Ku%40quantatw.com%7Cb9cdaaa48d1d4d20771208d8e307e0a5%7C179b032707fc4973ac738de7313561b2%7C1%7C0%7C637508970271861045%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=7RwG8tjsFT5NHT6KhdxRcPi6jNJqi7LLV3QuaeoMpd8%3D&amp;reserved=0</a>>.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   Add a new schema for log entries. Publish journal logs in<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   phosphor-hostlogger. Add file watchers in BmcWeb to monitor the log files<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   produced by rsyslog. rsyslog should have log rotation enabled. Persistence<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">>   is still a necessary condition.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Sincerely,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Spencer Ku<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
</div>
</div>
</div>
</div>
</body>
</html>