![]() ![]() If you have quadcore CPU, each processor core will be referred as cpu0, cpu1, cpu2, and cpu3.How to measure the average CPU utilization of a Linux process Please note that processor core number will start from 0(zero). This would be helpful if you have a multi-core CPU. To display the second core, run: $ mpstat -P 1 ![]() If you want to view the CPU usage of a specific processor core, for example the first processor core, run: $ mpstat -P 0 %idle - Displays the percentage of time that the CPU or CPUs were idle and the system did not have an outstanding disk I/O request.Īs I already mentioned in the introductory section, the mpstat command will display the all processor cores activities.%gnice - Displays the percentage of time spent by the CPU or CPUs to run a niced guest.%guest - Displays the percentage of time spent by the CPU or CPUs to run a virtual processor.%steal - Displays the percentage of time spent in involuntary wait by the virtual CPU or CPUs while the hypervisor was servicing another virtual processor.%soft - Displays the percentage of time spent by the CPU or CPUs to service software interrupts.%irq - Displays the percentage of time spent by the CPU or CPUs to service hardware interrupts.%iowait - Displays the percentage of time that the CPU or CPUs were idle during which the system had an outstanding disk I/O request.%sys - Displays the percentage of CPU utilization that occurred while executing at the system level (kernel). ![]() %nice - Displays the percentage of CPU utilization that occurred while executing at the user level with nice priority.%usr - Displays the percentage of CPU utilization that occurred while executing at the user level (application).all - Indicates that statistics are calculated as averages among all processors.02:18:23 - The time when you run mpstat.Let me break down the above output and tell you what each option does. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |