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

Incorporate Zeusd for CPU and DRAM monitoring in ZeusMonitor #150

Conversation

michahn01
Copy link
Collaborator

This PR addresses this issue: #146

Overview of changes:

  • Add class ZeusdRAPLCPU to zeus/device/cpu/rapl.py; ZeusdRAPLCPU communicates with Zeusd to interface with RAPL indirectly, removing the need for root privileges
  • Modify RAPLCPUs in zeus/device/cpu/rapl.py to utilize ZeusdRAPLCPU rather than RAPLCPU if Zeusd is found on the expected socket
  • Added an endpoint in zeusd/src/routes/cpu.rs for checking if DRAM energy monitoring is available
  • Made some small changes to zeusd/src/devices/cpu/mod.rs to support the above endpoint.
  • Added a test in zeusd/tests/cpu.rs to verify the endpoint works properly.

@jaywonchung
Copy link
Member

@michahn01 Thanks for your work! CI is failing; please look into the CI logs and get them to pass. You can also check the exact command being run for each workflow file in .github/workflows/.

@jaywonchung jaywonchung linked an issue Jan 26, 2025 that may be closed by this pull request
@michahn01
Copy link
Collaborator Author

@michahn01 Thanks for your work! CI is failing; please look into the CI logs and get them to pass. You can also check the exact command being run for each workflow file in .github/workflows/.

Got it! The issues were fixed, I believe CI should pass now.

Copy link
Member

@jaywonchung jaywonchung left a comment

Choose a reason for hiding this comment

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

Thanks for your work! You nailed most parts on your first contribution, too! I think it's good to go after some minor changes.

@wbjin Could you take a look at this PR as well?

zeus/device/cpu/rapl.py Show resolved Hide resolved
zeus/device/cpu/rapl.py Outdated Show resolved Hide resolved
zeus/device/cpu/rapl.py Outdated Show resolved Hide resolved
zeusd/src/devices/cpu/mod.rs Outdated Show resolved Hide resolved
zeusd/src/devices/cpu/mod.rs Outdated Show resolved Hide resolved
zeusd/src/routes/cpu.rs Outdated Show resolved Hide resolved
@michahn01 michahn01 force-pushed the Incorporate_Zeusd_for_CPU_and_DRAM_Monitoring_in_ZeusMonitor branch from c2886de to 4cbe58f Compare February 2, 2025 22:17
@michahn01 michahn01 requested a review from jaywonchung February 2, 2025 23:53
Copy link
Member

@jaywonchung jaywonchung 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 a lot for you awesome work!

@jaywonchung jaywonchung merged commit 20b9a2d into ml-energy:master Feb 3, 2025
3 checks passed
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.

Incorporate Zeusd for CPU and DRAM monitoring in ZeusMonitor
3 participants