Linux性能监控

vmstat

  • in:每秒的中断数,包括时钟中断。
  • cs:每秒上下文切换的次数
  • r:等待运行的进程数
  • b:阻塞中的进程

iostat

top、htpop

通过top -Hp 23344可以查看该进程下各个线程的cpu

iotop

iftop、ifstat

ss

1
2
3
4
5
# ss -tnap
# ss -tnap6
# ss -tnap
# ss -s
# ss -tn -o state established -p

lsof

sar

sar命令

iperf

1
2
3
4
yum install iperf -y
iperf -s
iperf -s -u
iperf -c 198.51.100.5

参考文档

mtr

slabtop

sync && echo 2 > /proc/sys/vm/drop_caches

slabinfo

linux-fincore

1
2
3
4
5
6
7
8
yum install automake autoconf -y
git clone https://github.com/waleedmazhar/linux-ftools
cd linux-ftools/

aclocal && autoconf && automake && automake --add-missing
./configure && make && make install

linux-fincore --pages=false --summarize --only-cached *

Linux Page Cache调优在Kafka中的应用