天天看点

linux性能分析

linux 性能查看

一、服务器配置查看

cpu:

物理cpu个数:

[root@localhost ~]# cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l

每个物理cpu中core的个数(即核数)

[root@localhost ~]# cat /proc/cpuinfo | grep "cpu cores" | uniq

内存:

free -m

服务器磁盘

查看硬盘分区情况  fdisk -l

查看当前硬盘使用情况 df -h

查看硬盘性能  # iostat -x 1 10

1、IO负载

top命令:

12.6% wa    IO等待所占用的CPU时间的百分比,高过30%时IO压力高

iostat -x 1 10

继续阅读