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 #8275 to 6.x: Added function to return pretty names on "system" module "process summary" metricset #8312

Merged
merged 2 commits into from
Sep 19, 2018

Conversation

sayden
Copy link
Contributor

@sayden sayden commented Sep 14, 2018

Cherry-pick of PR #8275 to 6.x branch. Original message:

Following this discuss https://discuss.elastic.co/t/errors-in-metric-beat-log/147918/3 It's true that I found that the error message was a bit cryptic.

According to this http://thelinuxstuff.blogspot.com/2012/08/process-state-codes-in-ps-output.html the state 88, which corresponds to X state in a linux process corresponds to dead state.

I thought it could be nice to have a bit more descriptive error message in such case to help user debugging his own problems:

So, in the case of the discuss issue where the message had this format:

Unknown state <88> for process with pid 30794

It will become this:

Unknown or unexpected state <X> (dead) for process with pid 30794

BTW, I couldn't manage to compile any test, system was complaining about some redefined variables:

GOROOT=/usr/lib/go #gosetup
GOPATH=/home/caster/go #gosetup
/usr/lib/go/bin/go test -c -i -tags "darwin freebsd linux windows" -o /tmp/___TestFetch_in_github_com_elastic_beats_metricbeat_module_system_process_summary github.com/elastic/beats/metricbeat/module/system/process_summary #gosetup
# runtime
/usr/lib/go/src/runtime/lock_sema.go:30:20: active_spin redeclared in this block
	previous declaration at /usr/lib/go/src/runtime/lock_futex.go:30:20
/usr/lib/go/src/runtime/lock_sema.go:31:20: active_spin_cnt redeclared in this block
	previous declaration at /usr/lib/go/src/runtime/lock_futex.go:31:20
/usr/lib/go/src/runtime/lock_sema.go:32:20: passive_spin redeclared in this block
	previous declaration at /usr/lib/go/src/runtime/lock_futex.go:32:20
/usr/lib/go/src/runtime/lock_sema.go:35:14: lock redeclared in this block
	previous declaration at /usr/lib/go/src/runtime/lock_futex.go:46:14
/usr/lib/go/src/runtime/lock_sema.go:94:16: unlock redeclared in this block
	previous declaration at /usr/lib/go/src/runtime/lock_futex.go:106:16
/usr/lib/go/src/runtime/lock_sema.go:124:19: noteclear redeclared in this block
	previous declaration at /usr/lib/go/src/runtime/lock_futex.go:126:19
/usr/lib/go/src/runtime/lock_sema.go:128:20: notewakeup redeclared in this block
	previous declaration at /usr/lib/go/src/runtime/lock_futex.go:130:20
/usr/lib/go/src/runtime/lock_sema.go:151:19: notesleep redeclared in this block
	previous declaration at /usr/lib/go/src/runtime/lock_futex.go:139:19
/usr/lib/go/src/runtime/lock_sema.go:180:68: notetsleep_internal redeclared in this block
	previous declaration at /usr/lib/go/src/runtime/lock_futex.go:164:45
/usr/lib/go/src/runtime/lock_sema.go:263:36: notetsleep redeclared in this block
	previous declaration at /usr/lib/go/src/runtime/lock_futex.go:210:36
/usr/lib/go/src/runtime/lock_sema.go:263:36: too many errors

…mary" metricset (elastic#8275)

Added function to return pretty names on "system" module "process summary" metricset

(cherry picked from commit 457a784)
Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

LGTM, failures on tests seem unrelated

@sayden sayden merged commit c5dba9d into elastic:6.x Sep 19, 2018
@sayden sayden deleted the backport_8275_6.x branch October 19, 2018 11:34
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.

2 participants