ncabatoff / process-exporter

Prometheus exporter that mines /proc to report on selected processes
MIT License
1.72k stars 270 forks source link

Can we monitor /proc/<pid>/maps count #200

Open angelincb opened 3 years ago

angelincb commented 3 years ago

can we mine the count of /proc//maps for a specific process with process-exporter? I have checked the current version. it's not available. Any plans of including this metric?

ncabatoff commented 3 years ago

Hi @angelincb,

I have no plans at this point - can you explain your use case?

xjtuwjp commented 11 months ago

I'm interested in this feature too. Our use case is we sometime hit vm.max_map_count, which lead to process crash due to reaching the limit.

If we have the count of /proc/pid/maps, we can create alert and adjust the limit to avoid the crash of the process.

donatelloOo commented 1 month ago

The interesting value is the count of /proc/pid/maps (basically the number of lines), like /proc/<pid>/maps | wc -l. As explained, some process can reach the vm.max_map_count in some cases that would lead to a crash. Thus, this metric is interesting to associate with /proc/sys/vm/max_map_count (that is more stable though).