summaryrefslogtreecommitdiff
path: root/src/mongo/util/processinfo_osx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/util/processinfo_osx.cpp')
-rw-r--r--src/mongo/util/processinfo_osx.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mongo/util/processinfo_osx.cpp b/src/mongo/util/processinfo_osx.cpp
index 0cd0cbb4cf6..cb42b570513 100644
--- a/src/mongo/util/processinfo_osx.cpp
+++ b/src/mongo/util/processinfo_osx.cpp
@@ -182,11 +182,9 @@ void ProcessInfo::SystemInfo::collectSystemInfo() {
memSize = getSysctlByName<NumberVal>("hw.memsize");
memLimit = memSize;
numCores = getSysctlByName<NumberVal>("hw.ncpu"); // includes hyperthreading cores
- numPhysicalCores = getSysctlByName<NumberVal>("machdep.cpu.core_count");
- numCpuSockets = getSysctlByName<NumberVal>("hw.packages");
pageSize = static_cast<unsigned long long>(sysconf(_SC_PAGESIZE));
cpuArch = getSysctlByName<std::string>("hw.machine");
- hasNuma = false;
+ hasNuma = checkNumaEnabled();
BSONObjBuilder bExtra;
bExtra.append("versionString", getSysctlByName<std::string>("kern.version"));
@@ -196,6 +194,8 @@ void ProcessInfo::SystemInfo::collectSystemInfo() {
"nfsAsync",
static_cast<int>(getSysctlByName<NumberVal>("vfs.generic.nfs.client.allow_async")));
bExtra.append("model", getSysctlByName<std::string>("hw.model"));
+ bExtra.append("physicalCores",
+ static_cast<int>(getSysctlByName<NumberVal>("machdep.cpu.core_count")));
bExtra.append(
"cpuFrequencyMHz",
static_cast<int>((getSysctlByName<NumberVal>("hw.cpufrequency") / (1000 * 1000))));
@@ -206,4 +206,8 @@ void ProcessInfo::SystemInfo::collectSystemInfo() {
_extraStats = bExtra.obj();
}
+bool ProcessInfo::checkNumaEnabled() {
+ return false;
+}
+
} // namespace mongo