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

Proof of concept of delegating monitoring to prmon #6

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

graeme-a-stewart
Copy link
Contributor

Show how prmon can be used as an external resource monitor for jMonitor

  • prmon is invoked after the main process is spawned and monitors it
    and all of its children
  • the prmon "snapshot" file is read on each monitoring cycle to read
    current resource values
  • these values are pushed into the current jMonitor VirtMonitor classes
    (using a new method, push())

This only a proof of concept to show the idea, I wouldn't use this code
in its current form.

The content of the current prmon snapshot file isn't quite a match to
what jMonitor uses, but it could rather easily be ammended (the final
prmon txt file does contain everything needed, but it's much more
awkward to parse on the fly).

In particular:

  • prmon doesn't measure CPU rate, but instead measures cummulative
    consuption time (user + system) so for now this has been used as a
    proxy in the CPURate monitor.
  • the VMEM and RSS values are strictly the Max values at the moment,
    so they are monotonic increasing; prmon could easily output the
    correct snapshot values if needed

BEGINRELEASENOTES

  • Thank you for writing the text to appear in the release notes. It will show up
    exactly as it appears between the two bold lines
  • ...

ENDRELEASENOTES

Show how prmon can be used as an external resource monitor for
jMonitor
- prmon is invoked after the main process is spawned and monitors it
  and all of its children
- the prmon "snapshot" file is read on each monitoring cycle to read
  current resource values
- these values are pushed into the current jMonitor VirtMonitor classes
  (using a new method, push())

This only a proof of concept to show the idea, I wouldn't use this code
in its current form.

The content of the current prmon snapshot file isn't quite a match to
what jMonitor uses, but it could rather easily be ammended (the final
prmon txt file does contain everything needed, but it's much more
awkward to parse on the fly).

In particular:
- prmon doesn't measure CPU rate, but instead measures cummulative
  consuption time (user + system) so for now this has been used as a
  proxy in the CPURate monitor.
- the VMEM and RSS values are strictly the Max values at the moment,
  so they are monotonic increasing; prmon could easily output the
  correct snapshot values if needed
@graeme-a-stewart graeme-a-stewart added the work in progress Action: This is a WIP and should not be merged yet label Feb 1, 2022
@graeme-a-stewart graeme-a-stewart marked this pull request as draft February 1, 2022 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
work in progress Action: This is a WIP and should not be merged yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant