-
Notifications
You must be signed in to change notification settings - Fork 814
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
Rudy/psutilcpu #1042
Rudy/psutilcpu #1042
Conversation
@@ -1,4 +1,5 @@ | |||
from checks import Check | |||
import psutil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you take the opportunity to reorganize the import the same way i did ? 737f396
Thanks!
Thanks! |
Do you mean to compute an average over the timespan between each run of each checks? That would probably be better indeed. |
Actually it won't work easily because the old check interface can't compute negative rates so forget about it. Small other remark: |
Why would there be a negative rate? The cpu_times would be strictly growing and we would need to do a computation to get percents anyway, in order to provide the same metric. Regarding the interval, the data is sampled by windows but the interval is not exposed. |
Ah yeah you're right. |
Use Psutil to fix #653
Keep on using the wmi connection to get the system.cpu.interrupted metric, which is not available via psutil. I don't know if anyone is really using that metric, given that it's not part of the standard dashboard but I left it there to preserve existing behaviour.
Reason for the >100 peak:
if cpu_user
to check that a value was there resulted in metrics not being sent when they were ==0, which lead to missing values on the graph and aggregation artifacts showing huge peak