bmcweb: Add patch for gRPC Redfish metrics.
Add new gRPCStatistics OEM schema and implement it in
ManagerDiagnosticData handler.
This change requres grpc-redfish changes in
cl/524481965.
Refresh impacted patches.
TESTED: Built secure and insecure for Izumi. Run on Izumi BMC, query
from corp desktop using ssh tunnel. Query for ManagerDiagnosticData
and GooglegRPCStatistics. Verified ManagerDiagnosticData has entry
for GooglegRPCStatistics. Verified GooglegRPCStatistics contains
reasonable counters and latencies.
Passed Redfish Validator for URI:
/redfish/v1/Managers/bmc/ManagerDiagnosticData/Oem/Google/GooglegRPCStatistics
curl -u root@${MACHINE_NAME}-nfd01 -X GET "http://${bmc}/redfish/v1/Managers/bmc/ManagerDiagnosticData/Oem/Google/GooglegRPCStatistics"
Enter host password for user 'root@yscbg2-nfd01':
{
"@odata.id": "/redfish/v1/Managers/bmc/ManagerDiagnosticData/Oem/Google/GooglegRPCStatistics",
"@odata.type": "#GooglegRPCStatistics.v1_0_0.GooglegRPCStatistics",
"AuthenticatedCount": 16523,
"AuthenticatedFailCount": 0,
"AuthenticationLatencyMs": 4970,
"AuthorizedCount": 16523,
"AuthorizedFailCount": 0,
"HTTPMethods": [
{
"Count": 12,
"Method": 4
},
{
"Count": 16511,
"Method": 2
}
],
"HTTPResponseCodes": [
{
"Count": 16523,
"StatusCode": 200
}
],
"Id": "GooglegRPCStatistics",
"Name": "Google gRPC Statistics",
"ProcessingLatencyMs": 4771411,
"QueueLatencyMs": 48,
"RequestLatencyMs": 864,
"ResponseLatencyMs": 33317,
"gRPCInitLatencyMs": 1330,
"gRPCResponseCodes": [
{
"Count": 16523,
"StatusCode": 0
}
]
Google-Bug-Id: 273341948
Change-Id: Idaebde86f1338d92729bb26e128740a5afe56e32
Signed-off-by: Nancy Yuen <yuenn@google.com>
diff --git a/recipes-phosphor/interfaces/bmcweb/0001-Add-BootInfo-and-TopProcesses-to-ManagerDiagnosticDa.patch b/recipes-phosphor/interfaces/bmcweb/0001-Add-BootInfo-and-TopProcesses-to-ManagerDiagnosticDa.patch
index aa84388..0135a5f 100644
--- a/recipes-phosphor/interfaces/bmcweb/0001-Add-BootInfo-and-TopProcesses-to-ManagerDiagnosticDa.patch
+++ b/recipes-phosphor/interfaces/bmcweb/0001-Add-BootInfo-and-TopProcesses-to-ManagerDiagnosticDa.patch
@@ -1,4 +1,4 @@
-From c9329f7268d1904e6e2125c8315f48268514c0b2 Mon Sep 17 00:00:00 2001
+From 51cff3f72a76388f2d98a37e38ecedbea7c0fba0 Mon Sep 17 00:00:00 2001
From: Edward Lee <edwarddl@google.com>
Date: Fri, 23 Dec 2022 00:03:02 +0000
Subject: [PATCH 1/4] Add BootInfo and TopProcesses to ManagerDiagnosticData
@@ -76,16 +76,15 @@
The patch will have an upstream review once the daemon proposal is reviewed and is ready here (https://gerrit.openbmc.org/c/openbmc/docs/+/59284)
-Signed-off-by: Edward Lee <edwarddl@google.com>
---
redfish-core/lib/manager_diagnostic_data.hpp | 95 ++++++++++++++++++++
1 file changed, 95 insertions(+)
diff --git a/redfish-core/lib/manager_diagnostic_data.hpp b/redfish-core/lib/manager_diagnostic_data.hpp
-index 7e433e57..04a34e83 100644
+index cf3c0b79..386a321c 100644
--- a/redfish-core/lib/manager_diagnostic_data.hpp
+++ b/redfish-core/lib/manager_diagnostic_data.hpp
-@@ -15,6 +15,7 @@
+@@ -16,6 +16,7 @@
#include <nlohmann/json.hpp>
#include <sdbusplus/asio/property.hpp>
@@ -93,7 +92,7 @@
#include <string>
#include <string_view>
-@@ -23,6 +24,12 @@ namespace redfish
+@@ -24,6 +25,12 @@ namespace redfish
using SensorVariantType = dbus::utility::DbusVariantType;
@@ -106,7 +105,7 @@
std::optional<std::pair<std::string, std::string>>
checkAndGetSoleGetSubTreeResponse(
const dbus::utility::MapperGetSubTreeResponse& subtree)
-@@ -297,6 +304,92 @@ inline void
+@@ -298,6 +305,92 @@ inline void
std::array<const char*, 1>{"xyz.openbmc_project.Inventory.Item.Bmc"});
}
@@ -199,7 +198,7 @@
inline void
afterGetManagerStartTime(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
const boost::system::error_code& ec,
-@@ -369,6 +462,8 @@ inline void handleManagerDiagnosticDataGet(
+@@ -376,6 +469,8 @@ inline void handleManagerDiagnosticDataGet(
// Start the first step of the 4-step process to populate
// the BMC diagnostic data
findBmcInventory(asyncResp);
@@ -207,7 +206,7 @@
+ getDaemonInfo(asyncResp);
}
- inline void requestRoutesManagerDiagnosticData(App& app)
+ #ifdef BMCWEB_ENABLE_REDFISH_OEM_GRPC_STATS
--
-2.40.0.348.gf938b09366-goog
+2.40.1.521.gf1e218fcd8-goog
diff --git a/recipes-phosphor/interfaces/bmcweb/0001-Define-and-Implement-gRPC-Redfish-Statistics.patch b/recipes-phosphor/interfaces/bmcweb/0001-Define-and-Implement-gRPC-Redfish-Statistics.patch
new file mode 100644
index 0000000..4f5d089
--- /dev/null
+++ b/recipes-phosphor/interfaces/bmcweb/0001-Define-and-Implement-gRPC-Redfish-Statistics.patch
@@ -0,0 +1,900 @@
+From 74c9b751d0897130f2a39905029d630d549236e6 Mon Sep 17 00:00:00 2001
+From: Nancy Yuen <yuenn@google.com>
+Date: Sat, 8 Apr 2023 04:16:33 -0700
+Subject: Define and Implement gRPC Redfish Statistics.
+
+Add new gRPCStatistics OEM schema and implement
+it in ManagerDiagnosticData handler.
+
+This change requres grpc-redfish changes in
+cl/524481965.
+
+TESTED: Built secure and insecure for Izumi. Run on Izumi BMC, query
+ from corp desktop using ssh tunnel. Query for ManagerDiagnosticData
+ and GooglegRPCStatistics. Verified ManagerDiagnosticData has entry
+ for GooglegRPCStatistics. Verified GooglegRPCStatistics contains
+ reasonable counters and latencies.
+
+BUG: 273341948
+Signed-off-by: Nancy Yuen <yuenn@google.com>
+
+%% original patch: 0001-Define-and-Implement-gRPC-Redfish-Statistics.patch
+
+%% original patch: 0001-Define-and-Implement-gRPC-Redfish-Statistics.patch
+---
+ Redfish.md | 19 +
+ meson.build | 1 +
+ meson_options.txt | 8 +
+ redfish-core/lib/manager_diagnostic_data.hpp | 106 ++++++
+ scripts/update_schemas.py | 29 +-
+ src/webserver_main.cpp | 1 +
+ static/redfish/v1/$metadata/index.xml | 8 +
+ .../GooglegRPCStatistics.json | 359 ++++++++++++++++++
+ .../schema/GoogleManagerDiagnosticData_v1.xml | 37 ++
+ .../v1/schema/GooglegRPCStatistics_v1.xml | 177 +++++++++
+ 10 files changed, 744 insertions(+), 1 deletion(-)
+ create mode 100644 static/redfish/v1/JsonSchemas/GoogleManagerDiagnosticData/GooglegRPCStatistics.json
+ create mode 100644 static/redfish/v1/schema/GoogleManagerDiagnosticData_v1.xml
+ create mode 100644 static/redfish/v1/schema/GooglegRPCStatistics_v1.xml
+
+diff --git a/Redfish.md b/Redfish.md
+index 7f84f7a1..2e003cc0 100644
+--- a/Redfish.md
++++ b/Redfish.md
+@@ -574,6 +574,25 @@ other.
+
+ - ServiceRootUptimeSeconds
+
++### /redfish/v1/Managers/bmc/ManagerDiagnosticData/GooglegRPCStatistics
++
++#### gRPCStatistics
++
++- gRPCInitLatencyMs
++- AuthenticationLatencyMs
++- QueueLatencyMs
++- RequestLatencyMs
++- AuthenticationLatencyMs
++- ProcessingLatencyMs
++- ResponseLatencyMs
++- AuthorizedCount
++- AuthorizedFailCount
++- AuthenticatedCount
++- AuthenticatedFailCount
++- HTTPMethods
++- HTTPResponseCodes
++- gRPCStatusCodes
++
+ ### /redfish/v1/Managers/bmc/NetworkProtocol/
+
+ #### ManagerNetworkProtocol
+diff --git a/meson.build b/meson.build
+index e667091b..129dbdf4 100644
+--- a/meson.build
++++ b/meson.build
+@@ -96,6 +96,7 @@ feature_map = {
+ # gRPC Features
+ feature_map += {'mtls-grpc' : '-DBMCWEB_ENABLE_GRPC'}
+ feature_map += {'insecure-grpc' : '-DBMCWEB_ENABLE_INSECURE_GRPC'}
++feature_map += {'redfish-oem-google-grpc-statistics' : '-DBMCWEB_ENABLE_REDFISH_OEM_GRPC_STATS'}
+
+ # Get the options status and build a project summary to show which flags are
+ # being enabled during the configuration time.
+diff --git a/meson_options.txt b/meson_options.txt
+index f27e41c8..21cbfc88 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -363,3 +363,11 @@ option(
+ description: '''Authorize every request as long as it's authenticated. This
+ is insecure. Do not use this in production.'''
+ )
++
++option(
++ 'redfish-oem-google-grpc-statistics',
++ type: 'feature',
++ value: 'disabled',
++ description: '''Enables Redfish OEM gRPC statistics information under
++ ManagerDiagnosticData.'''
++)
+diff --git a/redfish-core/lib/manager_diagnostic_data.hpp b/redfish-core/lib/manager_diagnostic_data.hpp
+index 14b75fea..7ae64e7e 100644
+--- a/redfish-core/lib/manager_diagnostic_data.hpp
++++ b/redfish-core/lib/manager_diagnostic_data.hpp
+@@ -2,6 +2,7 @@
+
+ #include "app.hpp"
+ #include "async_resp.hpp"
++#include "grpc_statistics.h"
+ #include "http_request.hpp"
+ #include "privileges.hpp"
+ #include "query.hpp"
+@@ -82,15 +83,120 @@ inline void handleManagerDiagnosticDataGet(
+ asyncResp->res.jsonValue["Id"] = "ManagerDiagnosticData";
+ asyncResp->res.jsonValue["Name"] = "Manager Diagnostic Data";
+
++#ifdef BMCWEB_ENABLE_REDFISH_OEM_GRPC_STATS
++ asyncResp->res.jsonValue["Oem"]["Google"]["@odata.type"] =
++ "#GoogleManagerDiagnosticData.v1_0_0.GoogleManagerDiagnosticData";
++ asyncResp->res.jsonValue["Oem"]["Google"]["gRPCStatistics"]["@odata.id"] =
++ "/redfish/v1/Managers/bmc/ManagerDiagnosticData/Oem/Google/"
++ "GooglegRPCStatistics";
++#endif
+ managerGetServiceRootUptime(asyncResp);
+ }
+
++#ifdef BMCWEB_ENABLE_REDFISH_OEM_GRPC_STATS
++
++inline void handleManagerDiagnosticDataGooglegRPCStatsHead(
++ crow::App& app, const crow::Request& req,
++ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
++{
++ if (!redfish::setUpRedfishRoute(app, req, asyncResp))
++ {
++ return;
++ }
++ asyncResp->res.addHeader(
++ boost::beast::http::field::link,
++ "</redfish/v1/JsonSchemas/GoogleManagerDiagnosticData/"
++ "GooglegRPCStatistics.json>; rel=describedby");
++}
++
++inline void handleManagerDiagnosticDataGooglegRPCStatsGet(
++ crow::App& app, const crow::Request& req,
++ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
++{
++ if (!redfish::setUpRedfishRoute(app, req, asyncResp))
++ {
++ return;
++ }
++
++ nlohmann::json& j = asyncResp->res.jsonValue;
++ j["@odata.id"] =
++ "/redfish/v1/Managers/bmc/ManagerDiagnosticData/Oem/Google/"
++ "GooglegRPCStatistics";
++ j["@odata.type"] =
++ "#GooglegRPCStatistics.v1_0_0.GooglegRPCStatistics";
++ j["Id"] = "GooglegRPCStatistics";
++ j["Name"] = "Google gRPC Statistics";
++
++ grpc_redfish::gRPCStatisticsShared shared_stats;
++ grpc_redfish::gRPCStatistics stats = shared_stats.GetgRPCStatistics();
++
++ j["gRPCInitLatencyMs"] = stats.grpc_init_latency_ms.count();
++ j["AuthenticationLatencyMs"] = stats.authn_latency_total_ms.count();
++ j["QueueLatencyMs"] = stats.queue_latency_total_ms.count();
++ j["RequestLatencyMs"] = stats.request_latency_total_ms.count();
++ j["AuthenticationLatencyMs"] = stats.authz_latency_total_ms.count();
++ j["ProcessingLatencyMs"] = stats.processing_latency_total_ms.count();
++ j["ResponseLatencyMs"] = stats.response_latency_total_ms.count();
++
++ j["AuthorizedCount"] = stats.total_authorized_count;
++ j["AuthorizedFailCount"] = stats.total_authorized_fail_count;
++ j["AuthenticatedCount"] = stats.total_authenticated_count;
++ j["AuthenticatedFailCount"] = stats.total_authenticated_fail_count;
++
++ nlohmann::json::array_t httpMethodCounts;
++ for (auto const& [http, count] : stats.request_count)
++ {
++ nlohmann::json::object_t countObj;
++ countObj["Method"] = static_cast<unsigned>(http);
++ countObj["Count"] = static_cast<unsigned>(count);
++ httpMethodCounts.emplace_back(std::move(countObj));
++ }
++ nlohmann::json::array_t httpResponseCounts;
++ for (auto const& [response, count] : stats.http_response_count)
++ {
++ nlohmann::json::object_t countObj;
++ countObj["StatusCode"] = static_cast<unsigned>(response);
++ countObj["Count"] = static_cast<unsigned>(count);
++ httpResponseCounts.emplace_back(std::move(countObj));
++ }
++ nlohmann::json::array_t gRPCStatusCounts;
++ for (auto const& [status, count] : stats.grpc_response_count)
++ {
++ nlohmann::json::object_t countObj;
++ countObj["StatusCode"] = static_cast<unsigned>(status);
++ countObj["Count"] = static_cast<unsigned>(count);
++ gRPCStatusCounts.emplace_back(std::move(countObj));
++ }
++ j["HTTPMethods"] = std::move(httpMethodCounts);
++ j["HTTPResponseCodes"] = std::move(httpResponseCounts);
++ j["gRPCResponseCodes"] = std::move(gRPCStatusCounts);
++}
++#endif
++
+ inline void requestRoutesManagerDiagnosticData(App& app)
+ {
+ BMCWEB_ROUTE(app, "/redfish/v1/Managers/bmc/ManagerDiagnosticData")
+ .privileges(redfish::privileges::getManagerDiagnosticData)
+ .methods(boost::beast::http::verb::get)(
+ std::bind_front(handleManagerDiagnosticDataGet, std::ref(app)));
++
++#ifdef BMCWEB_ENABLE_REDFISH_OEM_GRPC_STATS
++ BMCWEB_ROUTE(
++ app,
++ "/redfish/v1/Managers/bmc/ManagerDiagnosticData/Oem/Google/"
++ "GooglegRPCStatistics")
++ .privileges(redfish::privileges::headManagerDiagnosticData)
++ .methods(boost::beast::http::verb::head)(std::bind_front(
++ handleManagerDiagnosticDataGooglegRPCStatsHead, std::ref(app)));
++
++ BMCWEB_ROUTE(
++ app,
++ "/redfish/v1/Managers/bmc/ManagerDiagnosticData/Oem/Google/"
++ "GooglegRPCStatistics")
++ .privileges(redfish::privileges::getManagerDiagnosticData)
++ .methods(boost::beast::http::verb::get)(std::bind_front(
++ handleManagerDiagnosticDataGooglegRPCStatsGet, std::ref(app)));
++#endif
+ }
+
+ } // namespace redfish
+diff --git a/scripts/update_schemas.py b/scripts/update_schemas.py
+index 794ec0cd..27e4f880 100755
+--- a/scripts/update_schemas.py
++++ b/scripts/update_schemas.py
+@@ -201,7 +201,7 @@ class SchemaVersion:
+
+
+ # Remove the old files
+-skip_prefixes = ["Oem", "OpenBMC"]
++skip_prefixes = ["Oem", "OpenBMC", "Google"]
+ if os.path.exists(schema_path):
+ files = [
+ os.path.join(schema_path, f)
+@@ -364,6 +364,33 @@ with open(metadata_index_path, "w") as metadata_index:
+
+ metadata_index.write("</edmx:Edmx>\n")
+
++ metadata_index.write(
++ ' <edmx:Reference Uri="'
++ '/redfish/v1/schema/GoogleManagerDiagnosticData_v1.xml">\n'
++ )
++ metadata_index.write(
++ ' <edmx:Include Namespace="GoogleManagerDiagnosticData"/>\n'
++ )
++ metadata_index.write(
++ ' <edmx:Include Namespace="GoogleManagerDiagnosticData.v1_0_0"/>\n'
++ )
++ metadata_index.write(" </edmx:Reference>\n")
++
++ metadata_index.write("</edmx:Edmx>\n")
++
++ metadata_index.write(
++ ' <edmx:Reference Uri="'
++ '/redfish/v1/schema/GooglegRPCStatistics_v1.xml">\n'
++ )
++ metadata_index.write(
++ ' <edmx:Include Namespace="GooglegRPCStatistics"/>\n'
++ )
++ metadata_index.write(
++ ' <edmx:Include Namespace="GooglegRPCStatistics.v1_0_0"/>\n'
++ )
++ metadata_index.write(" </edmx:Reference>\n")
++
++ metadata_index.write("</edmx:Edmx>\n")
+
+ for schema, version in json_schema_files.items():
+ zip_filepath = os.path.join("json-schema", version[0])
+diff --git a/src/webserver_main.cpp b/src/webserver_main.cpp
+index 6fbc0212..5bd9d2ca 100644
+--- a/src/webserver_main.cpp
++++ b/src/webserver_main.cpp
+@@ -169,6 +169,7 @@ static int run()
+
+ #ifdef BMCWEB_ENABLE_GRPC
+ absl::InitializeLog();
++
+ GRPCRedfishService grpc_service(app, io);
+
+ #ifdef BMCWEB_ENABLE_INSECURE_GRPC
+diff --git a/static/redfish/v1/$metadata/index.xml b/static/redfish/v1/$metadata/index.xml
+index deb0e302..413404b5 100644
+--- a/static/redfish/v1/$metadata/index.xml
++++ b/static/redfish/v1/$metadata/index.xml
+@@ -3088,4 +3088,12 @@
+ <edmx:Include Namespace="OpenBMCAccountService"/>
+ <edmx:Include Namespace="OpenBMCAccountService.v1_0_0"/>
+ </edmx:Reference>
++ <edmx:Reference Uri="/redfish/v1/schema/GoogleManagerDiagnosticData_v1.xml">
++ <edmx:Include Namespace="GoogleManagerDiagnosticData"/>
++ <edmx:Include Namespace="GoogleManagerDiagnosticData.v1_0_0"/>
++ </edmx:Reference>
++ <edmx:Reference Uri="/redfish/v1/schema/GooglegRPCStatistics_v1.xml">
++ <edmx:Include Namespace="GooglegRPCStatistics"/>
++ <edmx:Include Namespace="GooglegRPCStatistics.v1_0_0"/>
++ </edmx:Reference>
+ </edmx:Edmx>
+diff --git a/static/redfish/v1/JsonSchemas/GoogleManagerDiagnosticData/GooglegRPCStatistics.json b/static/redfish/v1/JsonSchemas/GoogleManagerDiagnosticData/GooglegRPCStatistics.json
+new file mode 100644
+index 00000000..3740d7ea
+--- /dev/null
++++ b/static/redfish/v1/JsonSchemas/GoogleManagerDiagnosticData/GooglegRPCStatistics.json
+@@ -0,0 +1,359 @@
++{
++ "$schema": "http://redfish.dmtf.org/schemas/v1/redfish-schema-v1.json",
++ "copyright": "Copyright 2014-2019 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright",
++ "definitions": {
++ "gRPCStatistics": {
++ "additionalProperties": false,
++ "description": "Google OEM Extension to ManagerDiagnosticData for gRPC Statistics.",
++ "longDescription": "This resource shall be used to represent statistics measured from the gRPC Redfish interface of this Redfsih service.",
++ "patternProperties": {
++ "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": {
++ "description": "This property shall specify a valid odata or Redfish property.",
++ "type": [
++ "array",
++ "boolean",
++ "integer",
++ "number",
++ "null",
++ "object",
++ "string"
++ ]
++ }
++ },
++ "properties": {
++ "@odata.context": {
++ "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/context"
++ },
++ "@odata.etag": {
++ "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/etag"
++ },
++ "@odata.id": {
++ "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/id"
++ },
++ "@odata.type": {
++ "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/type"
++ },
++ "AuthenticatedCount": {
++ "description": "A property indicating the total number of gRPC requested that were authenticated.",
++ "longDescription": "The value of this property shall be the total cumulative number of gRPC requests received to this gRPC service root that met authentication requirements.",
++ "readonly": true,
++ "type": [
++ "integer",
++ "null"
++ ]
++ },
++ "AuthenticatedFailCount": {
++ "description": "A property indicating the total number of gRPC requested that were authenticated.",
++ "longDescription": "The value of this property shall be the total cumulative number of gRPC requests received to this gRPC service root that met authentication requirements.",
++ "readonly": true,
++ "type": [
++ "integer",
++ "null"
++ ]
++ },
++ "AuthenticationLatencyMs": {
++ "description": "A property indicating the total time all requests spent queued.",
++ "longDescription": "The value of this property shall be the total cumulative time in milliseconds that any request was spent in queued.",
++ "readonly": true,
++ "type": [
++ "integer",
++ "null"
++ ]
++ },
++ "AuthorizationLatencyMs": {
++ "description": "A property indicating the total time take by all requests for authentication.",
++ "longDescription": "The value of this property shall be the total cumulative time in milliseconds that any request was spent authorizating.",
++.",
++ "readonly": true,
++ "type": [
++ "integer",
++ "null"
++ ]
++ },
++ "AuthorizedCount": {
++ "description": "A property indicating the total number of gRPC requested that were authorized.",
++ "longDescription": "The value of this property shall be the total cumulative number of gRPC requests received to this gRPC service root that met authorization requirements.",
++ "readonly": true,
++ "type": [
++ "integer",
++ "null"
++ ]
++ },
++ "AuthorizedFailCount": {
++ "description": "A property indicating the total number of gRPC requested that failed authorization.",
++ "longDescription": "The value of this property shall be the total cumulative number of gRPC requests received to this gRPC service root that did not met authorization requirements.",
++ "readonly": true,
++ "type": [
++ "integer",
++ "null"
++ ]
++ },
++ "Description": {
++ "anyOf": [
++ {
++ "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Description"
++ },
++ {
++ "type": "null"
++ }
++ ],
++ "readonly": true
++ },
++ "gRPCInitLatencyMs": {
++ "description": "A property indicating the total time taken by gRPC Service to initialize.",
++ "longDescription": "The value of this property shall be the total cumulative time in milliseconds spent by gRPC Server to initialize.",
++ "readonly": true,
++ "type": [
++ "integer",
++ "null"
++ ]
++ },
++ "gRPCResponseCodes": {
++ "description": "gRPC RPC statistics since last reset.",
++ "items": {
++ "anyOf": [
++ {
++ "$ref": "#/definitions/gRPCStatusCodeCount"
++ },
++ {
++ "type": "null"
++ }
++ ]
++ },
++ "longDescription": "The value of this property shall be the total cumulative number of gRPC response sent for each status code from this service root. gRPC status codes not present in the collection can assumed to have a count of zero.",
++ "readonly": true,
++ "type": "array"
++ },
++ "HTTPMethods": {
++ "description": "HTTP request statistics since last reset.",
++ "items": {
++ "anyOf": [
++ {
++ "$ref": "#/definitions/HTTPMethodCount"
++ },
++ {
++ "type": "null"
++ }
++ ]
++ },
++ "longDescription": "The value of this property shall be the total cumulative number of rpcs with each http method received from this service root. HTTP methods not present in the collection can assumed to have a count of zero.",
++ "readonly": true,
++ "type": "array"
++ },
++ "HTTPResponseCodes": {
++ "description": "HTTP request statistics since last reset.",
++ "items": {
++ "anyOf": [
++ {
++ "$ref": "#/definitions/HTTPStatusCodeCount"
++ },
++ {
++ "type": "null"
++ }
++ ]
++ },
++ "longDescription": "The value of this property shall be the total cumulative number of http responses sent for each return code from this service root. HTTP return codes not present in the collection can assumed to have a count of zero.",
++ "readonly": true,
++ "type": "array"
++ },
++ "ProcessingLatencyMs": {
++ "description": "A property indicating theperty shall be the total cumulative time in milliseconds that any request was sp.",
++ "longDescription": "The value of this property shall be the total cumulative time in milliseconds that any request was spent being processed.",
++ "readonly": true,
++ "type": [
++ "integer",
++ "null"
++ ]
++ },
++ "QueueLatencyMs": {
++ "description": "A property indicating the total time all requests spent queued.",
++ "longDescription": "The value of this property shall be the total cumulative time in milliseconds that any request was spent in queued.",
++.",
++ "readonly": true,
++ "type": [
++ "integer",
++ "null"
++ ]
++ },
++ "RequestLatencyMs": {
++ "description": "A property indicating the total time take by all requests to setup for processing.",
++ "longDescription": "The value of this property shall be the total cumulative time in milliseconds that any request was spent setup for processing..",
++.",
++ "readonly": true,
++ "type": [
++ "integer",
++ "null"
++ ]
++ },
++ "ResponseLatencyMs": {
++ "description": "A property indicating the total time spent by all requests sending responses.",
++ "longDescription": "The value of this property shall be the total cumulative time in milliseconds that any request was spent sending a response.",
++ "readonly": true,
++ "type": [
++ "integer",
++ "null"
++ ]
++ }
++ },
++ "required": [
++ "@odata.id",
++ "@odata.type",
++ "Id",
++ "Name"
++ ],
++ "type": "object"
++ },
++ "gRPCStatusCodeCount": {
++ "additionalProperties": false,
++ "description": "Number of responses sent organized by gRPC status codes.",
++ "longDescription": "Object describing the gRPC responses sent by gRPC return codes.",
++ "patternProperties": {
++ "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": {
++ "description": "This property shall specify a valid odata or Redfish property.",
++ "type": [
++ "array",
++ "boolean",
++ "integer",
++ "number",
++ "null",
++ "object",
++ "string"
++ ]
++ }
++ },
++ "properties": {
++ "Count": {
++ "description": "A counter indicating the total number responses sent with this status code.",
++ "longDescription": "The value of this property shall be the total cumulative number of rpcs resulting in status code since last reset.",
++ "readonly": true,
++ "type": [
++ "integer",
++ "null"
++ ]
++ },
++ "StatusCode": {
++ "description": "The gRPC status code from https://grpc.github.io/grpc/core/md_doc_statuscodes.html.",
++ "longDescription": "The value of this property shall be the gRPC status code (OK, INTERNAL) that this statistic represents.",
++ "readonly": true,
++ "type": [
++ "integer",
++ "null"
++ ]
++ }
++ },
++ "type": "object"
++ },
++ "HTTPMethodCount": {
++ "additionalProperties": false,
++ "description": "Number of requests organized by HTTP method.",
++ "longDescription": "Object describing the gRPC request by HTTP methods.",
++ "patternProperties": {
++ "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": {
++ "description": "This property shall specify a valid odata or Redfish property.",
++ "type": [
++ "array",
++ "boolean",
++ "integer",
++ "number",
++ "null",
++ "object",
++ "string"
++ ]
++ }
++ },
++ "properties": {
++ "Count": {
++ "description": "A counter indicating the total number of RPCs for this method.",
++ "longDescription": "The value of this property shall be the total cumulative number of rpcs for this HTTP method since last reset.",
++ "readonly": true,
++ "type": [
++ "integer",
++ "null"
++ ]
++ },
++ "Method": {
++ "description": "The HTTP methods from rf2616.",
++ "longDescription": "The value of this property shall be the HTTP method (get, patch, post, delete, put) that this statistic represents..",
++ "readonly": true,
++ "type": [
++ "integer",
++ "null"
++ ]
++ }
++ },
++ "type": "object"
++ },
++ "HTTPStatusCodeCount": {
++ "additionalProperties": false,
++ "description": "Number of responses sent organized by HTTP return codes.",
++ "longDescription": "Object describing the HTTP responses sent by HTTP return codes.",
++ "patternProperties": {
++ "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": {
++ "description": "This property shall specify a valid odata or Redfish property.",
++ "type": [
++ "array",
++ "boolean",
++ "integer",
++ "number",
++ "null",
++ "object",
++ "string"
++ ]
++ }
++ },
++ "properties": {
++ "Count": {
++ "description": "A counter indicating the total number responses sent with this return code.",
++ "longDescription": "The value of this property shall be the total cumulative number of responses sent with this return code since last reset.",
++ "readonly": true,
++ "type": [
++ "integer",
++ "null"
++ ]
++ },
++ "StatusCode": {
++ "description": "The HTTP return code from rfc9110.",
++ "longDescription": "The value of this property shall be the http return code (200, 201, 500) that this statistic represents.",
++ "readonly": true,
++ "type": [
++ "integer",
++ "null"
++ ]
++ }
++ },
++ "type": "object"
++ },
++ "Oem": {
++ "additionalProperties": true,
++ "description": "OemManagerDiagnosticData Oem properties.",
++ "patternProperties": {
++ "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
++ "description": "This property shall specify a valid odata or Redfish property.",
++ "type": [
++ "array",
++ "boolean",
++ "number",
++ "null",
++ "object",
++ "string"
++ ]
++ }
++ },
++ "properties": {
++ "Google": {
++ "anyOf": [
++ {
++ "$ref": "#/definitions/Google"
++ },
++ {
++ "type": "null"
++ }
++ ]
++ }
++ },
++ "type": "object"
++ }
++ },
++ "owningEntity": "Google",
++ "title": "#GoogleManagerDiagnosticData"
++}
+diff --git a/static/redfish/v1/schema/GoogleManagerDiagnosticData_v1.xml b/static/redfish/v1/schema/GoogleManagerDiagnosticData_v1.xml
+new file mode 100644
+index 00000000..4e43d183
+--- /dev/null
++++ b/static/redfish/v1/schema/GoogleManagerDiagnosticData_v1.xml
+@@ -0,0 +1,37 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
++
++ <edmx:Reference Uri="http://docs.oasis-open.org/odata/odata/v4.0/errata03/csd01/complete/vocabularies/Org.OData.Core.V1.xml">
++ <edmx:Include Namespace="Org.OData.Core.V1" Alias="OData"/>
++ </edmx:Reference>
++ <edmx:Reference Uri="http://docs.oasis-open.org/odata/odata/v4.0/errata03/csd01/complete/vocabularies/Org.OData.Measures.V1.xml">
++ <edmx:Include Namespace="Org.OData.Measures.V1" Alias="Measures"/>
++ </edmx:Reference>
++ <edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/RedfishExtensions_v1.xml">
++ <edmx:Include Namespace="RedfishExtensions.v1_0_0" Alias="Redfish"/>
++ </edmx:Reference>
++ <edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/Resource_v1.xml">
++ <edmx:Include Namespace="Resource"/>
++ <edmx:Include Namespace="Resource.v1_0_0"/>
++ </edmx:Reference>
++
++ <edmx:DataServices>
++
++ <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="GoogleManagerDiagnosticData">
++ <Annotation Term="Redfish.OwningEntity" String="Google"/>
++ <Annotation Term="OData.Description" String="Google extensions to the standard ManagerDiagnosticData"/>
++ </Schema>
++
++ <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="GoogleManagerDiagnosticData.v1_0_0">
++ <Annotation Term="Redfish.OwningEntity" String="Google"/>
++ <ComplexType Name="GoogleManagerDiagnosticData" BaseType="Resource.OemObject" Abstract="true">
++ <NavigationProperty Name="GooglegRPCStatistics" Type="GooglegRPCStatistics.GooglegRPCStatistics" Nullable="false">
++ <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
++ <Annotation Term="OData.Description" String="Link to Google gRPC Statistics."/>
++ <Annotation Term="OData.LongDescription" String="This property shall contain the link to a resource of type GooglegRCPStatistics"/>
++ <Annotation Term="OData.AutoExpandReferences"/>
++ </ComplexType>
++ </Schema>
++
++ </edmx:DataServices>
++</edmx:Edmx>
+diff --git a/static/redfish/v1/schema/GooglegRPCStatistics_v1.xml b/static/redfish/v1/schema/GooglegRPCStatistics_v1.xml
+new file mode 100644
+index 00000000..985db64a
+--- /dev/null
++++ b/static/redfish/v1/schema/GooglegRPCStatistics_v1.xml
+@@ -0,0 +1,177 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
++
++ <edmx:Reference Uri="http://docs.oasis-open.org/odata/odata/v4.0/errata03/csd01/complete/vocabularies/Org.OData.Core.V1.xml">
++ <edmx:Include Namespace="Org.OData.Core.V1" Alias="OData"/>
++ </edmx:Reference>
++ <edmx:Reference Uri="http://docs.oasis-open.org/odata/odata/v4.0/errata03/csd01/complete/vocabularies/Org.OData.Measures.V1.xml">
++ <edmx:Include Namespace="Org.OData.Measures.V1" Alias="Measures"/>
++ </edmx:Reference>
++ <edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/RedfishExtensions_v1.xml">
++ <edmx:Include Namespace="RedfishExtensions.v1_0_0" Alias="Redfish"/>
++ </edmx:Reference>
++ <edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/Resource_v1.xml">
++ <edmx:Include Namespace="Resource"/>
++ <edmx:Include Namespace="Resource.v1_0_0"/>
++ </edmx:Reference>
++
++ <edmx:DataServices>
++
++ <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="GooglegRPCStatistics">
++ <Annotation Term="Redfish.OwningEntity" String="Google"/>
++
++ <EntityType Name="GooglegRPCStatistics" BaseType="Resource.v1_0_0.Resource" Abstract="true">
++ <Annotation Term="OData.Description" String="Google OEM Extension to ManagerDiagnosticData for gRPC Statistics."/>
++ <Annotation Term="OData.LongDescription" String="This resource shall be used to represent statistics measured from the gRPC Redfish interface of this Redfsih service."/>
++ <Annotation Term="OData.AdditionalProperties" Bool="false"/>
++ <Annotation Term="Capabilities.InsertRestrictions">
++ <Record>
++ <PropertyValue Property="Insertable" Bool="false"/>
++ </Record>
++ </Annotation>
++ <Annotation Term="Capabilities.UpdateRestrictions">
++ <Record>
++ <PropertyValue Property="Updatable" Bool="false"/>
++ </Record>
++ </Annotation>
++ <Annotation Term="Capabilities.DeleteRestrictions">
++ <Record>
++ <PropertyValue Property="Deletable" Bool="false"/>
++ </Record>
++ </Annotation>
++ <Annotation Term="Redfish.Uris">
++ <Collection>
++ <String>/redfish/v1/Managers/{manager_id}/ManagerDiagnosticData/Oem/Google/GooglegRPCStatistics</String>
++ </Collection>
++ </Annotation>
++ </EntityType>
++ </Schema>
++
++ <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="GooglegRPCStatistics.v1_0_0">
++ <Annotation Term="Redfish.OwningEntity" String="Google"/>
++
++ <EntityType Name="GooglegRPCStatistics" BaseType="GooglegRPCStatistics.GooglegRPCStatistics">
++ <Property Name="gRPCInitLatencyMs" Type="Edm.Int64">
++ <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
++ <Annotation Term="OData.Description" String="A property indicating the total time taken by gRPC Service to initialize."/>
++ <Annotation Term="OData.LongDescription" String="The value of this property shall be the total cumulative time in milliseconds spent by gRPC Server to initialize."/>
++ </Property>
++ <Property Name="AuthenticationLatencyMs" Type="Edm.Int64">
++ <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
++ <Annotation Term="OData.Description" String="A property indicating the total time taken for all requests to authenicate."/>
++ <Annotation Term="OData.LongDescription" String="The value of this property shall be the total cumulative time in milliseconds that any request was spent authenticating"/>
++ </Property>
++ <Property Name="QueueLatencyMs" Type="Edm.Int64">
++ <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
++ <Annotation Term="OData.Description" String="A property indicating the total time all requests spent queued."/>
++ <Annotation Term="OData.LongDescription" String="The value of this property shall be the total cumulative time in milliseconds that any request was spent in queued."/>
++ </Property>
++ <Property Name="RequestLatencyMs" Type="Edm.Int64">
++ <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
++ <Annotation Term="OData.Description" String="A property indicating the total time take by all requests to setup for processing ."/>
++ <Annotation Term="OData.LongDescription" String="The value of this property shall be the total cumulative time in milliseconds that any request was spent setup for processing."/>
++ </Property>
++ <Property Name="AuthorizationLatencyMs" Type="Edm.Int64">
++ <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
++ <Annotation Term="OData.Description" String="A property indicating the total time take by all requests for authentication."/>
++ <Annotation Term="OData.LongDescription" String="The value of this property shall be the total cumulative time in milliseconds that any request was spent authorizating."/>
++ </Property>
++ <Property Name="ProcessingLatencyMs" Type="Edm.Int64">
++ <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
++ <Annotation Term="OData.Description" String="A property indicating the total time take by all requests for processing."/>
++ <Annotation Term="OData.LongDescription" String="The value of this property shall be the total cumulative time in milliseconds that any request was spent being processed."/>
++ </Property>
++ <Property Name="ResponseLatencyMs" Type="Edm.Int64">
++ <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
++ <Annotation Term="OData.Description" String="A property indicating the total time spent by all requests sending responses."/>
++ <Annotation Term="OData.LongDescription" String="The value of this property shall be the total cumulative time in milliseconds that any request was spent sending a response."/>
++ </Property>
++ <Property Name="AuthorizedCount" Type="Edm.Int64">
++ <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
++ <Annotation Term="OData.Description" String="A property indicating the total number of gRPC requested that were authorized."/>
++ <Annotation Term="OData.LongDescription" String="The value of this property shall be the total cumulative number of gRPC requests received to this gRPC service root that met authorization requirements."/>
++ </Property>
++ <Property Name="AuthorizedFailCount" Type="Edm.Int64">
++ <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
++ <Annotation Term="OData.Description" String="A property indicating the total number of gRPC requested that failed authorization."/>
++ <Annotation Term="OData.LongDescription" String="The value of this property shall be the total cumulative number of gRPC requests received to this gRPC service root that did not met authorization requirements."/>
++ </Property>
++ <Property Name="AuthenticatedCount" Type="Edm.Int64">
++ <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
++ <Annotation Term="OData.Description" String="A property indicating the total number of gRPC requested that were authenticated."/>
++ <Annotation Term="OData.LongDescription" String="The value of this property shall be the total cumulative number of gRPC requests received to this gRPC service root that met authentication requirements."/>
++ </Property>
++ <Property Name="AuthenticatedFailCount" Type="Edm.Int64">
++ <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
++ <Annotation Term="OData.Description" String="A property indicating the total number of gRPC requested that were failed authentication."/>
++ <Annotation Term="OData.LongDescription" String="The value of this property shall be the total cumulative number of gRPC requests received to this gRPC service root that met authentication requirements."/>
++ </Property>
++ <Property Name="HTTPMethods" Type="Collection(GooglegRPCStatistics.v1_0_0.HTTPMethodCount)">
++ <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
++ <Annotation Term="OData.Description" String="A property inidcating the total count of for each request method."/>
++ <Annotation Term="OData.LongDescription" String="The value of this property shall be the total cumulative number of http requests received for each method to this service root. Methods not present in the collection can assumed to have a count of zero."/>
++ </Property>
++ <Property Name="HTTPResponseCodes" Type="Collection(GooglegRPCStatistics.v1_0_0.HTTPStatusCodeCount)">
++ <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
++ <Annotation Term="OData.Description" String="A property indicating the total count for each return code."/>
++ <Annotation Term="OData.LongDescription" String="The value of this property shall be the total cumulative number of http responses sent for each return code from this service root. Return codes not present in the collection can assumed to have a count of zero."/>
++ </Property>
++ <Property Name="gRPCResponseCodes" Type="Collection(GooglegRPCStatistics.v1_0_0.gRPCStatusCodeCount)">
++ <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
++ <Annotation Term="OData.Description" String="A property indicating the total count for each return code."/>
++ <Annotation Term="OData.LongDescription" String="The value of this property shall be the total cumulative number of gRPC responses sent for each return code from this service root. Return codes not present in the collection can assumed to have a count of zero."/>
++ </Property>
++ </ComplexType>
++
++ <ComplexType Name="HTTPMethodCount">
++ <Annotation Term="OData.AdditionalProperties" Bool="false"/>
++ <Annotation Term="OData.Description" String="Number of requests received organized by HTTP method."/>
++ <Annotation Term="OData.LongDescription" String="Object describing the gRPC request received by HTTP methods."/>
++
++ <Property Name="Method" Type="Edm.Int64">
++ <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
++ <Annotation Term="OData.Description" String="The HTTP methods from rfc2616."/>
++ <Annotation Term="OData.LongDescription" String="The value of this property shall be the HTTP method (get, patch, post, delete, put) that this statistic represents."/>
++ </Property>
++ <Property Name="Count" Type="Edm.Int64">
++ <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
++ <Annotation Term="OData.Description" String="A counter indicating the total number of RPCs for this method."/>
++ <Annotation Term="OData.LongDescription" String="The value of this property shall be the total cumulative number of rpcs for this HTTP method since last reset."/>
++ </Property>
++ </ComplexType>
++ <ComplexType Name="HTTPStatusCodeCount">
++ <Annotation Term="OData.AdditionalProperties" Bool="false"/>
++ <Annotation Term="OData.Description" String="Number of responses sent organized by HTTP return codes."/>
++ <Annotation Term="OData.LongDescription" String="Object describing the HTTP responses sent by HTTP return codes."/>
++
++ <Property Name="StatusCode" Type="Edm.Int64">
++ <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
++ <Annotation Term="OData.Description" String="The HTTP return code from rfc9110."/>
++ <Annotation Term="OData.LongDescription" String="The value of this property shall be the http return code (200, 201, 500) that this statistic represents."/>
++ </Property>
++ <Property Name="Count" Type="Edm.Int64">
++ <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
++ <Annotation Term="OData.Description" String="A counter indicating the total number responses sent with this return code."/>
++ <Annotation Term="OData.LongDescription" String="The value of this property shall be the total cumulative number of responses sent with this return code since last reset."/>
++ </Property>
++ </ComplexType>
++ <ComplexType Name="gRPCStatusCodeCount">
++ <Annotation Term="OData.AdditionalProperties" Bool="false"/>
++ <Annotation Term="OData.Description" String="Number of responses sent organized by gRPC status codes."/>
++ <Annotation Term="OData.LongDescription" String="Object describing the gRPC responses sent by gRPC return codes."/>
++
++ <Property Name="StatusCode" Type="Edm.Int64">
++ <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
++ <Annotation Term="OData.Description" String="The gRPC status code from https://grpc.github.io/grpc/core/md_doc_statuscodes.html."/>
++ <Annotation Term="OData.LongDescription" String="The value of this property shall be the gRPC status code (OK, INTERNAL) that this statistic represents."/>
++ </Property>
++ <Property Name="Count" Type="Edm.Int64">
++ <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
++ <Annotation Term="OData.Description" String="A counter indicating the total number rpc with this status code."/>
++ <Annotation Term="OData.LongDescription" String="The value of this property shall be the total cumulative number of rpc resulting in this return code since last reset."/>
++ </Property>
++ </ComplexType>
++ </Schema>
++
++ </edmx:DataServices>
++</edmx:Edmx>
+--
+2.40.1.521.gf1e218fcd8-goog
+
diff --git a/recipes-phosphor/interfaces/bmcweb/0001-Manager-Add-read-routines-for-ManagerDiagnosticData-.patch b/recipes-phosphor/interfaces/bmcweb/0001-Manager-Add-read-routines-for-ManagerDiagnosticData-.patch
index 3ccf780..37b20fb 100644
--- a/recipes-phosphor/interfaces/bmcweb/0001-Manager-Add-read-routines-for-ManagerDiagnosticData-.patch
+++ b/recipes-phosphor/interfaces/bmcweb/0001-Manager-Add-read-routines-for-ManagerDiagnosticData-.patch
@@ -1,8 +1,8 @@
-From 5b72729f1642b74d82e224c7717f60a209a86828 Mon Sep 17 00:00:00 2001
+From 4825d135f039bc3e4fd659e681d261454037344d Mon Sep 17 00:00:00 2001
From: Sui Chen <suichen@google.com>
Date: Mon, 1 Nov 2021 16:08:32 -0700
-Subject: [PATCH] Manager: Add read routines for ManagerDiagnosticData, read
- CPU and Memory
+Subject: Manager: Add read routines for ManagerDiagnosticData, read CPU and
+ Memory
Reading diagnostic data involves the following 4 steps:
1. Find the BMC inventory item DBus object.
@@ -59,21 +59,23 @@
Signed-off-by: Sui Chen <suichen@google.com>
Change-Id: Ib77f343f881432e5a057e546f43faf0a80d80b9b
+
---
redfish-core/lib/manager_diagnostic_data.hpp | 285 +++++++++++++++++++
1 file changed, 285 insertions(+)
diff --git a/redfish-core/lib/manager_diagnostic_data.hpp b/redfish-core/lib/manager_diagnostic_data.hpp
-index 14b75fea..f4dcdfe8 100644
+index 7ae64e7e..cf3c0b79 100644
--- a/redfish-core/lib/manager_diagnostic_data.hpp
+++ b/redfish-core/lib/manager_diagnostic_data.hpp
-@@ -1,21 +1,302 @@
+@@ -1,22 +1,303 @@
+
#pragma once
#include "app.hpp"
#include "async_resp.hpp"
+#include "dbus_utility.hpp"
+ #include "grpc_statistics.h"
#include "http_request.hpp"
+#include "openbmc_dbus_rest.hpp"
#include "privileges.hpp"
@@ -370,9 +372,9 @@
inline void
afterGetManagerStartTime(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
const boost::system::error_code& ec,
-@@ -83,6 +364,10 @@ inline void handleManagerDiagnosticDataGet(
- asyncResp->res.jsonValue["Name"] = "Manager Diagnostic Data";
-
+@@ -91,6 +372,10 @@ inline void handleManagerDiagnosticDataGet(
+ "GooglegRPCStatistics";
+ #endif
managerGetServiceRootUptime(asyncResp);
+
+ // Start the first step of the 4-step process to populate
@@ -380,7 +382,7 @@
+ findBmcInventory(asyncResp);
}
- inline void requestRoutesManagerDiagnosticData(App& app)
+ #ifdef BMCWEB_ENABLE_REDFISH_OEM_GRPC_STATS
--
-2.40.0.348.gf938b09366-goog
+2.40.1.521.gf1e218fcd8-goog
diff --git a/recipes-phosphor/interfaces/bmcweb/0004-Add-Latency-Metrics-to-ManagerDiagnosticData.patch b/recipes-phosphor/interfaces/bmcweb/0004-Add-Latency-Metrics-to-ManagerDiagnosticData.patch
index 61c722e..bf53822 100644
--- a/recipes-phosphor/interfaces/bmcweb/0004-Add-Latency-Metrics-to-ManagerDiagnosticData.patch
+++ b/recipes-phosphor/interfaces/bmcweb/0004-Add-Latency-Metrics-to-ManagerDiagnosticData.patch
@@ -1,4 +1,4 @@
-From e55ac569ac30b771bb151f878505b19465aa63ce Mon Sep 17 00:00:00 2001
+From f41c8b0dc97c5ca339846a9b3fc8f8b429cb0e9c Mon Sep 17 00:00:00 2001
From: Edward Lee <edwarddl@google.com>
Date: Fri, 23 Dec 2022 00:56:44 +0000
Subject: [PATCH 4/4] Add Latency Metrics to ManagerDiagnosticData
@@ -91,15 +91,16 @@
The patch will have an upstream review once the daemon proposal is reviewed and is ready here (https://gerrit.openbmc.org/c/openbmc/docs/+/59284)
Signed-off-by: Edward Lee <edwarddl@google.com>
+
---
redfish-core/lib/manager_diagnostic_data.hpp | 24 ++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/redfish-core/lib/manager_diagnostic_data.hpp b/redfish-core/lib/manager_diagnostic_data.hpp
-index 04a34e83..1598c9ef 100644
+index 386a321c..f1c856d3 100644
--- a/redfish-core/lib/manager_diagnostic_data.hpp
+++ b/redfish-core/lib/manager_diagnostic_data.hpp
-@@ -390,6 +390,29 @@ void getDaemonInfo(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+@@ -391,6 +391,29 @@ void getDaemonInfo(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
});
}
@@ -129,14 +130,14 @@
inline void
afterGetManagerStartTime(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
const boost::system::error_code& ec,
-@@ -464,6 +487,7 @@ inline void handleManagerDiagnosticDataGet(
+@@ -471,6 +494,7 @@ inline void handleManagerDiagnosticDataGet(
findBmcInventory(asyncResp);
getBootInfo(asyncResp);
getDaemonInfo(asyncResp);
+ getLatencyInfo(asyncResp);
}
- inline void requestRoutesManagerDiagnosticData(App& app)
+ #ifdef BMCWEB_ENABLE_REDFISH_OEM_GRPC_STATS
--
-2.40.0.348.gf938b09366-goog
+2.40.1.521.gf1e218fcd8-goog
diff --git a/recipes-phosphor/interfaces/bmcweb_%.bbappend b/recipes-phosphor/interfaces/bmcweb_%.bbappend
index 9a789cd..df191dc 100644
--- a/recipes-phosphor/interfaces/bmcweb_%.bbappend
+++ b/recipes-phosphor/interfaces/bmcweb_%.bbappend
@@ -105,6 +105,7 @@
grpc_redfish_options = " \
-Dmtls-grpc=enabled \
-Dmtls-grpc-port=443 \
+ -Dredfish-oem-google-grpc-statistics=enabled \
"
grpc_redfish_depends = " \
grpc-redfish \
@@ -114,6 +115,7 @@
"
grpc_redfish_patches = " \
file://0023-gRPC-redfish.patch \
+ file://0001-Define-and-Implement-gRPC-Redfish-Statistics.patch \
"
SRC_URI:append:gbmc = " \