linux监控命令

cpu监控命令

一、top

[root@matomo72~]#top
top - 16:08:59 up  5:29,  3 users,  load average: 0.02, 0.02, 0.05
Tasks:  98 total,   2 running,  95 sleeping,   1 stopped,   0 zombie
%Cpu(s):  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem :  2030148 total,  1283756 free,   273464 used,   472928 buff/cache
KiB Swap:  2097148 total,  2097148 free,        0 used.  1553932 avail Mem 

   PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND                                           
  1234 root      20   0  421840  44472  15372 S  0.3  2.2   0:06.60 containerd                                        
     1 root      20   0   43936   4328   2580 S  0.0  0.2   0:01.34 systemd                                           
     2 root      20   0       0      0      0 S  0.0  0.0   0:00.00 kthreadd                                          
     3 root      20   0       0      0      0 S  0.0  0.0   0:00.23 ksoftirqd/0                                       
     5 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 kworker/0:0H                                      
     7 root      rt   0       0      0      0 S  0.0  0.0   0:00.00 migration/0                                       
     8 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcu_bh                                            
     9 root      20   0       0      0      0 S  0.0  0.0   0:00.48 rcu_sched                                         
    10 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 lru-add-drain                                     
    11 root      rt   0       0      0      0 S  0.0  0.0   0:00.11 watchdog/0  

二、htop

yum install htop -y

三、uptime

[root@matomo72~]#uptime
 16:15:30 up  5:36,  3 users,  load average: 0.00, 0.01, 0.05

四、vmstat

[root@matomo72~]#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 1283008   2076 471772    0    0    20     2   91  130  0  0 100  0  0

内存监控命令

free

[root@matomo72~]#free
              total        used        free      shared  buff/cache   available
Mem:        2030148      266892     1289652        9892      473604     1560400
Swap:       2097148           0     2097148

磁盘监控命令

df

[root@matomo72~]#df
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/sda3       18658304 2663764  15994540  15% /
devtmpfs         1004096       0   1004096   0% /dev
tmpfs            1015072       0   1015072   0% /dev/shm
tmpfs            1015072    9748   1005324   1% /run
tmpfs            1015072       0   1015072   0% /sys/fs/cgroup
/dev/sda1         201380  104156     97224  52% /boot
tmpfs             203016       0    203016   0% /run/user/0

iotop

网卡监控命令

iftop

nethogs

系统进程监控命令

ps

[root@matomo72~]#ps
   PID TTY          TIME CMD
  6223 pts/1    00:00:00 bash
  6404 pts/1    00:00:00 ps

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值