You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
By using glances to get the cpu utilization of a process, and then using the cpu utilization obtained by the top command or the htop command to verify the results of glances, it is found that the results calculated by glances are completely inconsistent.
Detail
htop command: 2.4%
glances:0.1%
The text was updated successfully, but these errors were encountered:
nicolargo
changed the title
【macOS] Using galnces to obtain the cpu utilization of a specified process in macOS is inaccurate
【macOS] Using Glances to obtain the cpu utilization of a specified process in macOS is inaccurate
Apr 23, 2024
Glances has a different sampling period than Htop. Htop refresh stats every second. Glances every 2 seconds. As the CPU consumption is very variant, you may have some difference.
Under the wood, Glances uses PsUtil to get the processes information. You may find additional information concerning the algorithm used to compute the CPU consumption here: https://psutil.readthedocs.io/en/latest/#psutil.cpu_times
Environment
OS:macOS 13.6.5 (22G621)
Architecture: ARM64
Psutil version: 5.9.8
Python version: 5.7.7
Type: core, CPU
Description
By using glances to get the cpu utilization of a process, and then using the cpu utilization obtained by the top command or the htop command to verify the results of glances, it is found that the results calculated by glances are completely inconsistent.
Detail
htop command: 2.4%
glances:0.1%
The text was updated successfully, but these errors were encountered: