Linux CPU?????????mpstat????
???????????? ???????[ 2014/11/25 13:00:56 ] ????????Linux ?????? CPU
????4????κ???????
???????????
????CPU??Processor number. The keyword all indicates that statistics are calculated as averages among all processors.
????%user??Show the percentage of CPU utilization that occurred while executing at the user level (application).
????%nice??Show the percentage of CPU utilization that occurred while executing at the user level with nice priority.
????%sys??Show the percentage of CPU utilization that occurred while executing at the system level (kernel). Note that
????this does not include time spent servicing interrupts or softirqs.
????%iowait??Show the percentage of time that the CPU or CPUs were idle during which the system had an outstanding disk I/O request.
????%irq??Show the percentage of time spent by the CPU or CPUs to service interrupts.
????%soft??Show the percentage of time spent by the CPU or CPUs to service softirqs. A softirq (software interrupt) is
????one of up to 32 enumerated software interrupts which can run on multiple CPUs at once.
????%steal??Show the percentage of time spent in involuntary wait by the virtual CPU or CPUs while the hypervisor was ser-vicing another virtual processor.
????%idle??Show the percentage of time that the CPU or CPUs were idle and the system did not have an outstanding disk I/O request.
????intr/s??Show the total number of interrupts received per second by the CPU or CPUs.
???????????? ??/proc/stat???????
????CPU ?????? ID
????user ??internal????????????CPU???%?????????? nice???? ???? (usr/total)*100
????nice ??internal??????nice?????????CPU???%?? (nice/total)*100
????system ??internal?????????????%?? (system/total)*100
????iowait ??internal?????????IO??????%?? (iowait/total)*100
????irq ??internal????????ж????%?? (irq/total)*100
????soft ??internal?????????ж????%?? (softirq/total)*100
????idle ??internal??????CPU??????????IO???????????κ????????е???????????%??(idle/total)*100
????intr/s ??internal?????????CPU??????ж?????intr/total)*100
????CPU?????????=total_cur=user+system+nice+idle+iowait+irq+softirq
????total_pre=pre_user+ pre_system+ pre_nice+ pre_idle+ pre_iowait+ pre_irq+ pre_softirq
????user=user_cur – user_pre
????total=total_cur-total_pre
????????_cur ?????????_pre???interval?????????????е?????????????λС????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11