-
-
Notifications
You must be signed in to change notification settings - Fork 439
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
mpstat does not display stats of hotplugged CPUs when run with an interval inside VM #327
Comments
Curious. I'm running
|
Sorry for the incomplete info earlier. @stevekay |
Running mpstat with an interval (without count parameter (say) ), does not display hotplugged CPU(s) stats, unless we re-run the command after getting out of the loop.
mpstat -P ALL <interval>
Someone/Something running the command with an interval and no count will not be able to see the statistics of all CPUs and it will require getting out of the loop.
Suggestion 1 : We can add an option like "--hotplug" that will keep an eye on number of cpu/cpu hotplug (by checking get_cpu_nr() for example) after each iteration and display stats of all CPUs including the hotplugged ones in the next iteration.
OR
Suggestion 2 : Without introducing a new option and fix this in main loop code to cover all cases.
I would like to get suggestions and comments if this will be a good feature before proceeding with this.
All comments and suggestions will be greatly appreciated.
#######################################################
[root@localhost ~]# mpstat -P ALL 5
<snipped 1 line>
07:47:47 AM CPU %usr %nice %sys %iowait %irq %soft %steal
%guest %gnice %idle
07:47:52 AM all 0.00 0.00 0.20 0.80 0.00 0.20 0.00
0.00 0.00 98.80
07:47:52 AM 0 0.00 0.00 0.20 0.80 0.00 0.20 0.00
0.00 0.00 98.80
07:47:52 AM CPU %usr %nice %sys %iowait %irq %soft %steal
%guest %gnice %idle
07:47:57 AM all 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 100.00
07:47:57 AM 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 100.00
07:47:57 AM CPU %usr %nice %sys %iowait %irq %soft %steal
%guest %gnice %idle
07:48:02 AM all 0.00 0.00 0.00 0.00 0.20 0.00 0.00
0.00 0.00 99.80
07:48:02 AM 0 0.00 0.00 0.00 0.00 0.20 0.00 0.00
0.00 0.00 99.80
07:48:02 AM CPU %usr %nice %sys %iowait %irq %soft %steal
%guest %gnice %idle
07:48:07 AM all 0.00 0.00 0.00 0.00 0.00 0.20 0.00
0.00 0.00 99.80
07:48:07 AM 0 0.00 0.00 0.00 0.00 0.00 0.20 0.00
0.00 0.00 99.80
#######################################################
[root@localhost ~]# mpstat -P ALL 5
<snipped 1 line>
07:50:52 AM CPU %usr %nice %sys %iowait %irq %soft %steal
%guest %gnice %idle
07:50:57 AM all 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 100.00
07:50:57 AM 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 100.00
07:50:57 AM 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 100.00
^C
Average: CPU %usr %nice %sys %iowait %irq %soft %steal
%guest %gnice %idle
Average: all 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 100.00
Average: 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 100.00
Average: 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 100.00
#######################################################
The text was updated successfully, but these errors were encountered: