Supports collection of process shared memory#719
Merged
SuperQ merged 1 commit intoprometheus:masterfrom Jul 3, 2025
Merged
Conversation
Contributor
SilenceAdele
commented
Apr 23, 2025
- 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.
cf3dae0 to
b1487ea
Compare
Contributor
Author
Contributor
Author
|
/cc @SuperQ |
SuperQ
reviewed
May 21, 2025
proc_statm.go
Outdated
|
|
||
| // - https://man7.org/linux/man-pages/man5/proc_pid_statm.5.html | ||
|
|
||
| // ProcStatm provides memory usage information for a process, measured in memory pages. |
Member
There was a problem hiding this comment.
Suggested change
| // ProcStatm provides memory usage information for a process, measured in memory pages. | |
| // ProcStatm Provides memory usage information for a process, measured in memory pages. |
Contributor
Author
There was a problem hiding this comment.
https://github.com/SilenceAdele/procfs/compare/b1487ea..72849ee
@SuperQ ok, I have been modified it. Thanks for your review.
Contributor
Author
There was a problem hiding this comment.
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>
kakkoyun
approved these changes
Jul 3, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.