Support extra metrics in the RDC

Remove the * in the rdci stats
When a group is created, the GPUs can be added in the same command.
Add the support to the memory temperature.
Add the support to the memory clock.
Add the support to report the ECC errors.
Add the support to report the PCIe bandwidth throughput.

Since the RX/TX throughput may take 1 second to retreive, an async fetch is implemented
in the RdcMetricFetcherImpl.

Change-Id: If04f602fe1f2d14dbf7c2fb189549fd030523f9a
This commit is contained in:
Bill(Shuzhou) Liu
2020-04-29 10:32:50 -04:00
committed by Chris Freehill
parent 096dc2dadb
commit f4a3fd4dda
20 changed files with 601 additions and 62 deletions
+11 -2
View File
@@ -278,10 +278,19 @@ void RdciDmonSubSystem::create_temp_field_group() {
void RdciDmonSubSystem::show_field_usage() const {
std::cout << "Supported fields Ids:\n";
std::cout << "100 RDC_FI_GPU_SM_CLOCK: Current GPU clock frequencies.\n";
std::cout << "101 RDC_FI_MEM_CLOCK: Current Memory clock frequencies.\n";
std::cout << "140 RDC_FI_MEMORY_TEMP: Memory "
<< "temperature in millidegrees Celsius.\n";
std::cout << "150 RDC_FI_GPU_TEMP: GPU "
<< "temperature in millidegrees Celcius.\n";
<< "temperature in millidegrees Celsius.\n";
std::cout << "155 RDC_FI_POWER_USAGE: Power usage in microwatts.\n";
std::cout << "200 RDC_FI_PCIE_TX: PCIe Tx utilization in bytes/second.\n";
std::cout << "201 RDC_FI_PCIE_RX: PCIe Rx utilization in bytes/second.\n";
std::cout << "203 RDC_FI_GPU_UTIL: GPU busy percentage.\n";
std::cout << "312 RDC_FI_ECC_CORRECT_TOTAL: Accumulated "
<< "correctable ECC errors.\n";
std::cout << "313 RDC_FI_ECC_UNCORRECT_TOTAL: Accumulated "
<< "uncorrectable ECC errors.\n";
std::cout << "525 RDC_FI_GPU_MEMORY_USAGE: Memory usage of the GPU "
<< "instance in bytes.\n";
}
@@ -361,7 +370,7 @@ void RdciDmonSubSystem::process() {
group_info.entity_ids[gindex],
field_info.field_ids[findex], &value);
if (result != RDC_ST_OK) {
std::cout << std::left << std::setw(20) << "error";
std::cout << std::left << std::setw(20) << "N/A";
} else {
if (value.type == INTEGER) {
std::cout << std::left << std::setw(20)