If you are using SMP (Multiple CPU) system, use mpstat command to display the utilization of each CPU individually.
mpstat Report processors related statistics which includes Collecting and displays performance statistics for all logical processors in the system.. This display CPU statistics of individual CPU (or) Core.
How to install mpstat?
1. Ensure you are logged in as ‘root’
‘mpstat’ and ‘vmstat’ are apart of the ‘sysstat’ package and should be installed by default
2. Verify installation :
# rpm -qa | grep -i sysstat
3. Installation, if needed :
# rpm -ivh <name>
4. If you have connectivity to RHN or a Satellite Server:
# yum install sysstat
5. If you are using Ubantu:
# apt-get install sysstat
1. Using mpstat command without any option, will display the Global Average Activities by All CPUs.
2. Using mpstat with option ‘-P’ (Indicate Processor Number) and ‘ALL’, will display statistics about all CPUs one by one starting from 0. 0 will the first one.
$ mpstat -P ALL
3. To display the statistics for N number of iterations after n seconds interval with average of each cpu use the following command.
$ mpstat -P ALL 2 5
4. The option ‘I’ will print total number of interrupt statistics about per processor.
$ mpstat -I
5. Get all the above information in one command i.e. equivalent to “-u -I ALL -p ALL”.
$ mpstat -A
Latest posts by Rajesh Kumar (see all)
- Popular SAST, DAST and RASP for DevSecOps - April 8, 2020
- Delhi-NCR(DCP) – AWSAssociate – Ansible(EX407) – Azure DevOps – Bittu – Vijay – Rakesh - April 4, 2020
- Hyderabad(DCP) – AWSAssociate – AWSDevOps – Vikas – Anil - April 4, 2020
Total Page Visits: 408 - Today Page Visits: 1