-
-
Notifications
You must be signed in to change notification settings - Fork 438
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
How pidstat calculates CPU usage on each core and in total? #335
Comments
3. In combination with mpstat, there is another rather strange phenomenon. adb shell "/data/local/tmp/sysstat/mpstat 1 -P ALL" > mpstat.txt
|
This maybe helpful, for the 1st question. #344 (comment) |
Hi everyone,
I've been using pidstat recently, but I'm having some problems with the interpretation of the data, I'd like to get some answers, thanks!
1. What is the method about calculating the total CPU usage? I added up the usage on each core and found that it is not equal to the total usage shown by pidstat?
The table below:
The total %usr of pidstat is 43.14, but the %usr of each core adds up to 45.09
pidstat total %system is 15.69, but %system per core adds up to 15.68
pidstat total %CPU is 58.82, but %CPU per core adds up to 60.77
adb shell '/data/local/tmp/sysstat/pidstat 1 -p
pidof -s %perf_proc_name%
-r -d -t -u' > pidstat.txtLinux 5.10.81-gki-g5cc049ba3e0a (localhost) 09/07/22 aarch64 (8 CPU)
2. What does the CPU id represent in the line of data about total usage (CPU 6 as shown below)? I'm guessing it doesn't mean the process is executing on this core.
The text was updated successfully, but these errors were encountered: