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

client/API/docker_wrapper: get CPU and mem usage of Docker apps #5870

Merged
merged 5 commits into from
Oct 30, 2024

Conversation

davidpanderson
Copy link
Contributor

Mem usage (WSS):
The easiest way to get the WSS of a Docker contaier is to ask Docker
using the "docker stats" command.
So I have docker_wrapper do this periodically (10 sec... it's a bit slow).

But how to get this back to the client?
Currently there's no provision for an app to reports its own WSS.
So I added one, by adding an optional field to the app status messages
sent from app to client in shared mem.
If this is present, the client uses it instead of procinfo.

CPU time: "docker stats" reports CPU fraction
(averaged over what period?)
We multiply that by the stats poll.
Not exactly the same as CPU time, but close enough.

Mem usage (WSS):
The easiest way to get the WSS of a Docker contaier is to ask Docker
using the "docker stats" command.
So I have docker_wrapper do this periodically (10 sec... it's a bit slow).

But how to get this back to the client?
Currently there's no provision for an app to reports its own WSS.
So I added one, by adding an optional field to the app status messages
sent from app to client in shared mem.
If this is present, the client uses it instead of procinfo.

CPU time: "docker stats" reports CPU fraction
(averaged over what period?)
We multiply that by the stats poll.
Not exactly the same as CPU time, but close enough.
Copy link

codecov bot commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 10.75%. Comparing base (96370db) to head (984d0ab).
Report is 11 commits behind head on master.

Files with missing lines Patch % Lines
api/boinc_api.cpp 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5870      +/-   ##
============================================
- Coverage     10.75%   10.75%   -0.01%     
  Complexity     1068     1068              
============================================
  Files           280      280              
  Lines         36552    36555       +3     
  Branches       8471     8472       +1     
============================================
  Hits           3930     3930              
- Misses        32233    32236       +3     
  Partials        389      389              
Files with missing lines Coverage Δ
api/boinc_api.h 0.00% <ø> (ø)
api/boinc_api.cpp 0.00% <0.00%> (ø)

@AenBleidd AenBleidd merged commit 26bc981 into master Oct 30, 2024
146 of 147 checks passed
@AenBleidd AenBleidd deleted the dpa_docker_rsc branch October 30, 2024 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

2 participants