常用的系统性能查询命令

1.查看cpu

[root@m01 ~]# lscpu 
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                1
On-line CPU(s) list:   0
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
…………

2.查看cpu负载

简单的命令

[root@m01 ~]# uptime
 18:54:54 up 16:22,  2 users,  load average: 0.00, 0.02, 0.05

top工具(实时动态查看系统负载 快捷键 z 加颜色  x 高亮显示排序区域  < > 向左,向右切换)

htop工具(需要epel源yum下载)

 3.查询内存free命令

[root@m01 ~]# free -h
              total        used        free      shared  buff/cache   available
Mem:           1.8G        442M        654M        9.6M        726M        1.2G
Swap:          1.0G          0B        1.0G

vmstat命令

[root@m01 ~]# vmstat 
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 2  0      0 670488   4136 739780    0    0     5   144  170  198  1  1 97  1  0

4.磁盘相关

查看磁盘空间

[root@m01 ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3        18G  1.8G   17G  10% /
devtmpfs        903M     0  903M   0% /dev
tmpfs           912M     0  912M   0% /dev/shm
tmpfs           912M  8.7M  904M   1% /run
tmpfs           912M     0  912M   0% /sys/fs/cgroup
/dev/sda1      1014M  135M  880M  14% /boot
tmpfs           183M     0  183M   0% /run/user/0

查看磁盘IO

5.网络相关

查询网卡流量iftop

        查看某一块网卡:iftop -i eth1

查看进程的网络占用nethogs

原文地址:https://www.cnblogs.com/ExzaiTin/p/7874935.html