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

DEAD (X) State Process #2501

Merged
merged 8 commits into from Mar 9, 2017
Merged

Conversation

jeremydenoun
Copy link
Contributor

@jeremydenoun jeremydenoun commented Mar 7, 2017

Following https://github.com/torvalds/linux/blob/master/fs/proc/array.c#L126 telegraf plugin should handle DEAD state process and possibility to see it (http://unix.stackexchange.com/questions/126101/possible-to-see-dead-proccesses) specially in Docker context, the X state should be handle (I think this should be process like zombies but if you consider another metrics is necessary I can add it to interface)

Required for all PRs:

  • CHANGELOG.md updated (we recommend not updating this until the PR has been approved by a maintainer)
  • Sign CLA (if not already signed)

Following https://github.com/torvalds/linux/blob/master/fs/proc/array.c#L126 telegraf plugin should handle DEAD state process and possibility to see it (http://unix.stackexchange.com/questions/126101/possible-to-see-dead-proccesses) specially in Docker context, the X state should be handle (I think this should be process like zombies but if you consider another metrics is necessary I can add it to interface)
@danielnelson danielnelson added this to the 1.3.0 milestone Mar 8, 2017
@danielnelson
Copy link
Contributor

Looks good, go ahead and update CHANGELOG.md.

add reference in change log to issue/pr
@jeremydenoun
Copy link
Contributor Author

Done

@sparrc
Copy link
Contributor

sparrc commented Mar 8, 2017

Shouldn't this be a separate counter? Zombies aren't dead, they're undead!! ;)

(seriously though, I think it should be a separate "dead" counter)

@jeremydenoun
Copy link
Contributor Author

^^ the man page report "(should never be seen)" but from my experience process with short time life especially in container context can appear with X state... and their behavior is near than zombie... but you have right we should be able to monitor dead counter and zombie counter independently

@jeremydenoun
Copy link
Contributor Author

done

@danielnelson
Copy link
Contributor

@jeremydenoun
Copy link
Contributor Author

thanks for pointer this is update

@@ -39,6 +40,7 @@ Linux FreeBSD Darwin meaning
R R R running
S S S sleeping
Z Z Z zombie
X X X dead
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this correct? I think it should be X none none based on manpages I've found online.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I read https://www.freebsd.org/cgi/man.cgi?ps(1)

X The process is being traced or debugged.

similar on http://www.manpages.info/macosx/ps.1.html

Copy link
Contributor

Choose a reason for hiding this comment

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

This switch is only over the first character though, and as I read it X cannot be the first char on these other platforms.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you have right

No really Dead state on this platform
@@ -66,6 +66,7 @@ func getEmptyFields() map[string]interface{} {
fields := map[string]interface{}{
"blocked": int64(0),
"zombies": int64(0),
"dead": int64(0),
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets put this below in the linux case

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@danielnelson danielnelson merged commit 13f314a into influxdata:master Mar 9, 2017
ssorathia pushed a commit to ssorathia/telegraf that referenced this pull request Mar 25, 2017
Report count of processes in dead (X) process state from the processes input.  This process state is only valid on Linux.
calerogers pushed a commit to calerogers/telegraf that referenced this pull request Apr 5, 2017
Report count of processes in dead (X) process state from the processes input.  This process state is only valid on Linux.
vlamug pushed a commit to vlamug/telegraf that referenced this pull request May 30, 2017
Report count of processes in dead (X) process state from the processes input.  This process state is only valid on Linux.
maxunt pushed a commit that referenced this pull request Jun 26, 2018
Report count of processes in dead (X) process state from the processes input.  This process state is only valid on Linux.
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

3 participants