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

Issue with process.Percent Data: Erroneous Inclusion of iowait in CPU Utilization Calculation #1690

Closed
TheBestLL opened this issue Aug 13, 2024 · 4 comments

Comments

@TheBestLL
Copy link
Contributor

TheBestLL commented Aug 13, 2024

Based on the operational logic defined in psutil, iowait should not be considered in the calculations for CPU utilization. However, it appears that process.Percent is still incorporating iowait, leading to potentially inaccurate assessments of CPU activity. This could affect performance monitoring and analysis where precise CPU usage metrics are critical. It's crucial to ensure that process.Percent reflects only the active CPU usage, excluding any idle/wait times associated with IO operations.

Could we examine the implementation to confirm if iowait is mistakenly included in the CPU usage calculation and rectify this if necessary? This adjustment would align with the intended functionality of accurately reflecting CPU usage metrics, essential for system performance evaluations.
https://github.com/shirou/gopsutil/blob/master/process/process.go#L324

@TheBestLL
Copy link
Contributor Author

#902

@TheBestLL
Copy link
Contributor Author

https://github1s.com/giampaolo/psutil/blob/c034e6692cf736b5e87d14418a8153bb03f6cf42/psutil/__init__.py#L994

@TheBestLL
Copy link
Contributor Author

The processing logic updates with the implementation logic of psutil

@Lomanic
Copy link
Collaborator

Lomanic commented Sep 7, 2024

Fixed in #1692 it looks like

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants