blob: 3b213cc3d5e170c9ca713c69bf8b5bf44943663d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
diff --git a/src/mongo/util/processinfo_linux2.cpp b/src/mongo/util/processinfo_linux2.cpp
index d1ed23a..0c1011e 100644
--- a/src/mongo/util/processinfo_linux2.cpp
+++ b/src/mongo/util/processinfo_linux2.cpp
@@ -335,6 +335,7 @@ public:
paths.push_back("/etc/debian_release");
paths.push_back("/etc/slackware-version");
paths.push_back("/etc/centos-release");
+ paths.push_back("/etc/alpine-release");
paths.push_back("/etc/os-release");
for (i = paths.begin(); i != paths.end(); ++i) {
@@ -421,10 +422,10 @@ double ProcessInfo::getSystemMemoryPressurePercentage() {
void ProcessInfo::getExtraInfo(BSONObjBuilder& info) {
// [dm] i don't think mallinfo works. (64 bit.) ??
- struct mallinfo malloc_info =
- mallinfo(); // structure has same name as function that returns it. (see malloc.h)
- info.append("heap_usage_bytes",
- malloc_info.uordblks /*main arena*/ + malloc_info.hblkhd /*mmap blocks*/);
+ //struct mallinfo malloc_info =
+ // mallinfo(); // structure has same name as function that returns it. (see malloc.h)
+ // TODO: Fix for TC_malloc instance().getStats()
+ info.append("heap_usage_bytes", 0);
// docs claim hblkhd is included in uordblks but it isn't
LinuxProc p(_pid);
diff --git a/src/mongo/util/processinfo_linux2.cpp b/src/mongo/util/processinfo_linux2.cpp
index 0c1011e..755a2cc 100644
--- a/src/mongo/util/processinfo_linux2.cpp
+++ b/src/mongo/util/processinfo_linux2.cpp
@@ -34,7 +34,11 @@
#include <stdio.h>
#include <unistd.h>
#include <sys/mman.h>
-#include <gnu/libc-version.h>
+#ifdef __GLIBC__
+# include <gnu/libc-version.h>
+#else
+# define gnu_get_libc_version(x) "unknown"
+#endif
#include <sys/utsname.h>
#include "processinfo.h"
|