[[email protected] ~]# w
17:52:51 up 2 days, 1:23, 1 user, load average: 0.00, 0.00, 0.00
时间 运行了几天几小时 几个用户 1分钟负载 5分钟负载 15分钟负载
USER TTY FROM [email protected] IDLE JCPU PCPU WHAT
root pts/0 192.168.100.5 17:50 1.00s 0.86s 0.67s w
负载的解释1/5/15分钟之内有几个进程使用CPU
[[email protected] ~]# uptime
18:08:00 up 2 days, 1:38, 1 user, load average: 0.00, 0.00, 0.00
[[email protected] ~]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz
stepping : 7
cpu MHz : 2494.389
cache size : 3072 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
top
top -bn1 静态显示
[[email protected] ~]# vmstat
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----
交换中 空闲 写入磁盘 缓存
运行阻塞 缓冲区
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 0 108040 119152 682536 0 0 4 4 13 13 0 0 100 0 0
vmstat 1 每隔一秒显示一次
vmstat 1 10 每隔一秒显示一次,总共显示10次
iotop
[[email protected] ~]# iotop
Total DISK READ: 0.00 B/s | Total DISK WRITE: 0.00 B/s
TID PRIO USER DISK READ DISK WRITE SWAPIN IO> COMMAND
1 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % init
2 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kthreadd]
3 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [migration/0]
4 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ksoftirqd/0]
5 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [migration/0]
6 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [watchdog/0]
7 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [events/0]
8 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [cgroup]
9 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [khelper]
iostat
[[email protected] ~]# iostat
Linux 2.6.32-431.el6.i686 (bogon) 2017年01月05日 _i686_ (1 CPU)
avg-cpu: %user %nice %system %iowait %steal %idle
0.03 0.02 0.11 0.17 0.00 99.67
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 0.41 8.35 8.57 1527132 1567892
scd0 0.00 0.00 0.00 400 0
sar -n DEV 1 10 显示10次网卡流量
sar -b 1 10 查看磁盘IO
sar -q -f /var/log/sa/sa04 查看4号的日志
ps -eo pid,grgs,psr 查看哪个进程运行在哪个CPU上