Skip to content

Add Process State API#53

Merged
fearful-symmetry merged 2 commits intoelastic:mainfrom
fearful-symmetry:process-add-state-report
Sep 27, 2022
Merged

Add Process State API#53
fearful-symmetry merged 2 commits intoelastic:mainfrom
fearful-symmetry:process-add-state-report

Conversation

@fearful-symmetry
Copy link
Copy Markdown
Contributor

What does this PR do?

This is part of elastic/beats#33169

Specifically, This adds a public API that reports the state of a given PID, and a special error if a given process does not exist.

This is a bit of an awkward fix, since there's no "good" place for this API to go; This library is mainly for handling the complexities of the system/process dataset, but it's only the library we have that reports process state. go-sysinfo might be a better fit for this, but there's no code for fetching process state there. So, for now, this is kind of the best we can do.

Why is it important?

This is needed by elastic/beats#33169 so we can distinguish between zombie processes and other process types.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.md

@fearful-symmetry fearful-symmetry added bug Something isn't working Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team labels Sep 26, 2022
@fearful-symmetry fearful-symmetry self-assigned this Sep 26, 2022
@fearful-symmetry fearful-symmetry requested a review from a team as a code owner September 26, 2022 20:06
@fearful-symmetry fearful-symmetry requested review from belimawr and leehinman and removed request for a team September 26, 2022 20:06
@elasticmachine
Copy link
Copy Markdown
Collaborator

elasticmachine commented Sep 26, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-09-27T15:33:13.506+0000

  • Duration: 11 min 5 sec

Test stats 🧪

Test Results
Failed 0
Passed 176
Skipped 3
Total 179

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

Copy link
Copy Markdown
Contributor

@leehinman leehinman left a comment

Choose a reason for hiding this comment

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

LGTM. couple spelling and capitalization suggestions

@fearful-symmetry fearful-symmetry merged commit 9d49d2f into elastic:main Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants