summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--synapse/metrics/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/metrics/__init__.py b/synapse/metrics/__init__.py
index 13be0b9b96..dee12cbc49 100644
--- a/synapse/metrics/__init__.py
+++ b/synapse/metrics/__init__.py
@@ -615,8 +615,8 @@ def _setup_jemalloc_stats():
     regex = re.compile(r"/\S+/libjemalloc.*$")
 
     jemalloc_path = None
-    with open(f"/proc/{pid}/maps") as f:
-        for line in f.readlines():
+    with open("/proc/self/maps") as f:
+        for line in f:
             match = regex.search(line.strip())
             if match:
                 jemalloc_path = match.group()
@@ -709,7 +709,7 @@ def _setup_jemalloc_stats():
             _jemalloc_refresh_stats()
 
             g = GaugeMetricFamily(
-                "jemalloc_stats_app_memory",
+                "jemalloc_stats_app_memory_bytes",
                 "The stats reported by jemalloc",
                 labels=["type"],
             )