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

Support TASK_IDLE process status. Include IDLE process in UNINTERRUPTIBLE metric for backward compatibility. Add new option to separate out metric if desired #66

Merged
merged 1 commit into from
May 3, 2018

Conversation

awangptc
Copy link
Contributor

@awangptc awangptc commented May 2, 2018

Pull Request Checklist

Is this in reference to an existing issue?
#65

General

  • Update Changelog following the conventions laid out here

  • [N/A] Update README with any necessary configuration snippets

  • [N/A] Binstubs are created if needed

  • RuboCop passes

  • Existing tests pass

New Plugins

  • Tests

  • Add the plugin to the README

  • Does it have a complete header as outlined here

Purpose

Support new changes to process state in kernel 4.14+

Known Compatibility Issues

 - default behavior counts I in the same bucket as D (uninterruptible)

Add --idle-state, -I option to split out TASK_IDLE processes into
a .idle metric
@awangptc awangptc changed the title Support for new 'I' (TASK_IDLE) state introduced in kernel 4.14 Support TASK_IDLE process status. Include IDLE process in UNINTERRUPTIBLE metric for backward compatibility. Add new option to separate out metric if desired May 2, 2018
@awangptc
Copy link
Contributor Author

awangptc commented May 2, 2018

Automated spec tests were added but also ran some manual tests to confirm:

$ /opt/sensu/embedded/bin/metrics-processes-threads-count.rb -t -S
host.system.process_count 89 1525299474
host.system.thread_count 244 1525299474
host.system.sleeping 61 1525299474
host.system.running 1 1525299474
host.system.ininterruptible_sleep 27 1525299474   <--- 27 uninterruptible sleep processes
host.system.stopped 0 1525299474
host.system.stopped_by_debugger 0 1525299474
host.system.dead 0 1525299474
host.system.zombie 0 1525299474

$ /opt/sensu/embedded/bin/metrics-processes-threads-count.rb -t -S -I
host.system.process_count 89 1525299481
host.system.thread_count 244 1525299481
host.system.sleeping 61 1525299481
host.system.running 1 1525299481
host.system.ininterruptible_sleep 0 1525299481 <--- 0 uninterruptible sleep processes
host.system.stopped 0 1525299481
host.system.stopped_by_debugger 0 1525299481
host.system.dead 0 1525299481
host.system.zombie 0 1525299481
host.system.idle 27 1525299481 <--- 27 idle processes

Both results were to be expected since there are no uninterruptible sleeping processes

Copy link
Member

@majormoses majormoses left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks for taking the time to talk this out on slack.

@majormoses majormoses merged commit 745000b into sensu-plugins:master May 3, 2018
@majormoses
Copy link
Member

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