CPU
vmstat 1
mpstat #查看所有CPU 信息
top
pidstat #每个进程CPU使用量
sar -u 2 2
perf #可以跟着到进程内部具体函数耗时情况,并且可以指定内核函数进行统计
sudo yum install perf gawk (on centos install perf if no)
perf-tools
cd
git clone --depth 1 https://github.com/brendangregg/perf-tools
cd perf-tools[root@sf-vm-1 perf-tools]# sudo ./iolatency
Tracing block I/O. Output every 1 seconds. Ctrl-C to end.
>=(ms) .. <(ms) : I/O |Distribution |
0 -> 1 : 0 | |
>=(ms) .. <(ms) : I/O |Distribution |
0 -> 1 : 0 | |
>=(ms) .. <(ms) : I/O |Distribution |
0 -> 1 : 0 | |
>=(ms) .. <(ms) : I/O |Distribution |
0 -> 1 : 0 | |
>=(ms) .. <(ms) : I/O |Distribution |
0 -> 1 : 3 |######################################|Last updated
Was this helpful?