Supports collection of process shared memory by SilenceAdele · Pull Request #719 · prometheus/procfs (original) (raw)
- Parse process memory usage from /proc/[pid]/statm into ProcStatm struct.
- Add unit tests for proc_statm.
- Add /proc/26231/statm test data to fixtures.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
| // - https://man7.org/linux/man-pages/man5/proc\_pid\_statm.5.html |
| // ProcStatm provides memory usage information for a process, measured in memory pages. |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // ProcStatm provides memory usage information for a process, measured in memory pages. |
|---|
| // ProcStatm Provides memory usage information for a process, measured in memory pages. |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @SuperQ @ncabatoff Would it be possible to merge this PR? I'm planning to reference procfs in process-exporter to implement process shared memory metrics, and this PR provides the necessary support for that.
- Parse process memory usage from /proc/[pid]/statm into ProcStatm struct.
- Add unit tests for proc_statm.
- Add /proc/26231/statm test data to fixtures.
Signed-off-by: zhiyuan.zhou zhiyuan.zhou@easystack.cn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})