diff --git a/fdbserver/fdbserver.actor.cpp b/fdbserver/fdbserver.actor.cpp index 7cff78ba53..996e9e6e62 100644 --- a/fdbserver/fdbserver.actor.cpp +++ b/fdbserver/fdbserver.actor.cpp @@ -509,9 +509,10 @@ void skipListTest(); Future startSystemMonitor(std::string dataFolder, Optional> dcId, Optional> zoneId, - Optional> machineId) { + Optional> machineId, + Optional> datahallId) { initializeSystemMonitorMachineState(SystemMonitorMachineState( - dataFolder, dcId, zoneId, machineId, g_network->getLocalAddress().ip, FDB_VT_VERSION)); + dataFolder, dcId, zoneId, machineId, datahallId, g_network->getLocalAddress().ip, FDB_VT_VERSION)); systemMonitor(); return recurring(&systemMonitor, SERVER_KNOBS->SYSTEM_MONITOR_FREQUENCY, TaskPriority::FlushTrace); @@ -2337,14 +2338,16 @@ int main(int argc, char* argv[]) { } else if (role == ServerRole::Test) { TraceEvent("NonSimulationTest").detail("TestFile", opts.testFile); setupRunLoopProfiler(); - auto m = startSystemMonitor(opts.dataFolder, opts.dcId, opts.zoneId, opts.zoneId); + auto m = + startSystemMonitor(opts.dataFolder, opts.dcId, opts.zoneId, opts.zoneId, opts.localities.dataHallId()); f = stopAfter(runTests( opts.connectionFile, TEST_TYPE_FROM_FILE, TEST_HERE, 1, opts.testFile, StringRef(), opts.localities)); g_network->run(); } else if (role == ServerRole::ConsistencyCheck) { setupRunLoopProfiler(); - auto m = startSystemMonitor(opts.dataFolder, opts.dcId, opts.zoneId, opts.zoneId); + auto m = + startSystemMonitor(opts.dataFolder, opts.dcId, opts.zoneId, opts.zoneId, opts.localities.dataHallId()); f = stopAfter(runTests(opts.connectionFile, TEST_TYPE_CONSISTENCY_CHECK, TEST_HERE, @@ -2355,7 +2358,8 @@ int main(int argc, char* argv[]) { g_network->run(); } else if (role == ServerRole::UnitTests) { setupRunLoopProfiler(); - auto m = startSystemMonitor(opts.dataFolder, opts.dcId, opts.zoneId, opts.zoneId); + auto m = + startSystemMonitor(opts.dataFolder, opts.dcId, opts.zoneId, opts.zoneId, opts.localities.dataHallId()); f = stopAfter(runTests(opts.connectionFile, TEST_TYPE_UNIT_TESTS, TEST_HERE, @@ -2400,7 +2404,8 @@ int main(int argc, char* argv[]) { // create the trace file with the correct process address openTraceFile( g_network->getLocalAddress(), opts.rollsize, opts.maxLogsSize, opts.logFolder, "trace", opts.logGroup); - auto m = startSystemMonitor(opts.dataFolder, opts.dcId, opts.zoneId, opts.zoneId); + auto m = + startSystemMonitor(opts.dataFolder, opts.dcId, opts.zoneId, opts.zoneId, opts.localities.dataHallId()); TraceEvent(SevDebug, "StartingFlowProcess").detail("FlowProcessName", opts.flowProcessName); #if defined(__linux__) prctl(PR_SET_PDEATHSIG, SIGTERM); diff --git a/fdbserver/worker.actor.cpp b/fdbserver/worker.actor.cpp index 059d01ef39..b8813ac947 100644 --- a/fdbserver/worker.actor.cpp +++ b/fdbserver/worker.actor.cpp @@ -1836,6 +1836,7 @@ ACTOR Future workerServer(Reference connRecord, locality.dcId(), locality.zoneId(), locality.machineId(), + locality.dataHallId(), g_network->getLocalAddress().ip, FDB_VT_VERSION)); diff --git a/flow/SystemMonitor.cpp b/flow/SystemMonitor.cpp index f4f152d357..d10895cf74 100644 --- a/flow/SystemMonitor.cpp +++ b/flow/SystemMonitor.cpp @@ -329,6 +329,7 @@ SystemStatistics customSystemMonitor(std::string const& eventName, StatisticsSta .detail("DCID", machineState.dcId) .detail("ZoneID", machineState.zoneId) .detail("MachineID", machineState.machineId) + .detail("DatahallID", machineState.datahallId) .trackLatest("MachineMetrics"); #ifdef __linux__ for (const auto& [k, v] : linux_os::reportCGroupCpuStat()) { @@ -463,4 +464,4 @@ Future startMemoryUsageMonitor(uint64_t memLimit) { } }; return recurring(checkMemoryUsage, FLOW_KNOBS->MEMORY_USAGE_CHECK_INTERVAL); -} \ No newline at end of file +} diff --git a/flow/include/flow/SystemMonitor.h b/flow/include/flow/SystemMonitor.h index 5dff631197..01ab39477b 100644 --- a/flow/include/flow/SystemMonitor.h +++ b/flow/include/flow/SystemMonitor.h @@ -30,6 +30,7 @@ struct SystemMonitorMachineState { Optional> dcId; Optional> zoneId; Optional> machineId; + Optional> datahallId; Optional ip; Optional fdbVersion; @@ -41,10 +42,11 @@ struct SystemMonitorMachineState { Optional> const& dcId, Optional> const& zoneId, Optional> const& machineId, + Optional> const& datahallId, IPAddress const& ip, std::string const& fdbVersion) - : folder(folder), dcId(dcId), zoneId(zoneId), machineId(machineId), ip(ip), monitorStartTime(0), - fdbVersion(fdbVersion) {} + : folder(folder), dcId(dcId), zoneId(zoneId), machineId(machineId), datahallId(datahallId), ip(ip), + monitorStartTime(0), fdbVersion(fdbVersion) {} }; void initializeSystemMonitorMachineState(SystemMonitorMachineState machineState);