This topic describes monitoring metrics related to process resident memory on a host.
Details
Item |
Description |
|---|---|
| OCP Display Name | Process Resident Memory |
| Raw Metric | process_memory_rss_bytes |
| Collection API | proc.MemoryInfo().RSS |
| Linux Data Source | VmRSS from /proc/<pid>/status, or the second column of /proc/<pid>/statm multiplied by the page size |
| Meaning | The actual physical memory occupied by the process (Resident Set Size), excluding swap and unmapped virtual memory. |
| Unit | bytes |
| OCP Aggregation | sum(process_memory_rss_bytes{name="observer"}) |
| Characteristics | Instantaneous value: a snapshot at the time of each collection, not an average over time. |
Handling Multiple Processes with the Same Name
When multiple processes have the same name (for example, during a brief dual-process state of the arbitration observer), the maximum value (math.Max()) is used.
observer
Description
Metric |
Metric name |
Unit |
|---|---|---|
| observer | observer_rss_memory | Byte |
Calculation expression
sum(process_memory_rss_bytes{name="observer",@LABELS}) by (@GBLABELS)
Verification command
PID=$(pidof observer)
# Method 1: status
grep VmRSS /proc/$PID/status
# Output example: VmRSS: 52428800 kB
# Method 2: ps (unit: KB)
ps -o pid,rss,comm -p $PID
# Method 3: Use Gopsutil semantics consistent with agents
cat /proc/$PID/statm | awk '{print "RSS pages:", $2, " bytes≈", $2*4096}'
obproxy
Description
Metric |
Metric name |
Unit |
|---|---|---|
| obproxy | obproxy_rss_memory | Byte |
Calculation expression
sum(process_memory_rss_bytes{name="obproxy",@LABELS}) by (@GBLABELS)
monagent
Description
Metric |
Metric name |
Unit |
|---|---|---|
| monagent | monagent_resident_memory | Byte |
Calculation expression
sum(process_memory_rss_bytes{name="ocp_monagent",@LABELS}) by (@GBLABELS)
mgragent
Description
Metric |
Metric name |
Unit |
|---|---|---|
| mgragent | mgragent_resident_memory | Byte |
Calculation expression
sum(process_memory_rss_bytes{name="ocp_mgragent",@LABELS}) by (@GBLABELS)
