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

Cherry-pick #6224 to 6.2: Fix system process metricset for kernel processes #6696

Merged
merged 1 commit into from
Mar 29, 2018

Conversation

andrewkroh
Copy link
Member

Cherry-pick of PR #6224 to 6.2 branch. Original message:

On Linux, kernel processes don't have an exe on disk so the /proc/[PID]/exe symlink is broken. When Metricbeat tries to read the symlink it gets an error and it skips the whole process. This adds a check for ENOENT and ignores the error which allows kernel processes to be reported by Metricbeat. This is the error that it fixes.

2018-01-30T20:31:02.512Z	DEBUG	[processes]	process/process.go:443	Skip process pid=12113: error getting process exe for pid=12113: readlink /proc/12113/exe: no such file or directory

Fixes #5700

- Fix process cgroup memory metrics for memsw, kmem, and kmem_tcp. {issue}6033[6033]
- Fix kafka OffsetFetch request missing topic and partition parameters. {pull}5880[5880]
- Change kubernetes.node.cpu.allocatable.cores to float. {pull}6130[6130]
- Fix system process metricset for kernel processes. {issue}5700[5700]
Copy link
Member

Choose a reason for hiding this comment

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

There seems to be lots of unrelated things here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like some manual cleanup is required. Will fix.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

On Linux, kernel processes don't have an exe on disk so the `/proc/[PID]/exe` symlink is broken. When Metricbeat tries to read the symlink it gets an error and it skips the whole process. This adds a check for ENOENT and ignores the error which allows kernel processes to be reported by Metricbeat. This is the error that it fixes.

    2018-01-30T20:31:02.512Z	DEBUG	[processes]	process/process.go:443	Skip process pid=12113: error getting process exe for pid=12113: readlink /proc/12113/exe: no such file or directory

Fixes elastic#5700

(cherry picked from commit 6bde7d8)
@jsoriano jsoriano merged commit e1656cb into elastic:6.2 Mar 29, 2018
@andrewkroh andrewkroh deleted the backport_6224_6.2 branch April 19, 2018 23:39
@ppf2 ppf2 added the v6.2.4 label May 22, 2018
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
Cherry-pick elastic#6224 to 6.2: Fix system process metricset for kernel processes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants