CPU
over all check commands - sar, vmstat, top
Detailed check - mpstat
Points
CPU usage - 哪些进程占用CPU
CPU过载 - 需求的CPU 大于实际CPU数目
CPU 本身故障
Granter CPU info
cat /proc/cpuinfo | grep processor
lscpu
Troubleshooting steps
#top show overall views and 1 show all cpus status
top + 1
# vmstat check r and b
vmstat 2
# refreah in 2 seconds, check cpus
sar -u 2
# mpstat check all or each cpu status
mpstat -P ALL 2
mpstat -P 2 2 # check processor 2 statusTop
默认进入top 是按照CPU 排序的
按下数字“1”,显示所有CPU 状况
shift + p list highest cpu pid
top -Hp pid # -H threads
top -u userid
Sar
sar -u 2
useful command
sar -u 2
sar -u -f /va/log/sa/sa17
Vmstat
overall to check CPU status
关注几点 r, b
mpstat - Multiprocessor Statistics
Check more info of CPU
Useful command:
mpstat -P ALL 2
mpstat -P 2 2 # check cpu 2 status, refresh every 2 seconds
Last updated
Was this helpful?