Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vmem: add metrics start with "pgscan_" in Kernel Linux #4093

Merged
merged 3 commits into from
Mar 26, 2023
Merged

vmem: add metrics start with "pgscan_" in Kernel Linux #4093

merged 3 commits into from
Mar 26, 2023

Conversation

zzzyhtheonly
Copy link
Member

@zzzyhtheonly zzzyhtheonly commented Mar 1, 2023

ChangeLog: Vmem plugin: A feature supporting metrics start with "pgscan_" in Kernel Linux was added.

Some Linux Kernel versions have metrics start with "pgscan_" in /proc/vmstat, for instance:

cat /proc/vmstat | grep pgscan
pgscan_kswapd 0
pgscan_direct 0
pgscan_direct_throttle 0

Some Linux Kernel versions have metrics start with "pgscan_"
in /proc/vmstat, for instance:
```
cat /proc/vmstat | grep pgscan
pgscan_kswapd 0
pgscan_direct 0
pgscan_direct_throttle 0
```

Signed-off-by: tiozhang <zyhtheonly@yeah.net>
Signed-off-by: luffysong <zsfz_one@163.com>
Co-authored-by: luffysong <zsfz_one@163.com>
@zzzyhtheonly zzzyhtheonly requested a review from a team as a code owner March 1, 2023 06:36
src/vmem.c Show resolved Hide resolved
add "pgscan_" when "pgscan_kswapd_" or "pgscan_direct_" is not exist
@eero-t
Copy link
Contributor

eero-t commented Mar 20, 2023

The new pgscan_ check covers previous pgscan_kswapd_ and pgscan_direct_ cases, so patch should remove those two.

@mrunge Looking at man proc, apparently earlier only the latter ones were provided, so I do not think omitting rest of pgscan_ items was deliberate decision from @octo. I.e. after above change, PR should be fine.

replace "pgscan_kswapd_" and "pgscan_direct_" with "pgscan_" according to `man proc`
@eero-t
Copy link
Contributor

eero-t commented Mar 20, 2023

Thanks for the update, it looks good now.

Copy link
Member

@mrunge mrunge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you

@mrunge mrunge merged commit 21ffe63 into collectd:main Mar 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants