1.top命令
然后按1,可以察看每个CPU的情况。
top - 10:32:50 up 23 min, 2 users, load average: 1.52, 1.20, 0.83
Tasks: 194 total, 2 running, 191 sleeping, 0 stopped, 1 zombie
Cpu(s): 46.1%us, 5.7%sy, 0.0%ni, 47.6%id, 0.0%wa, 0.0%hi, 0.7%si, 0.0%st
Mem: 4056880k total, 1410256k used, 2646624k free, 60432k buffers
Swap: 3212284k total, 0k used, 3212284k free, 710676k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2259 xwp 20 0 577m 78m 50m R 54 2.0 8:33.42 chrome
2729 xwp 20 0 450m 152m 19m S 30 3.8 1:14.64 chrome
2310 xwp 20 0 437m 151m 37m S 6 3.8 1:28.98 chrome
2293 xwp 20 0 512m 100m 27m S 5 2.5 0:48.60 chrome
1103 root 20 0 52856 14m 5844 S 3 0.4 0:27.12 Xorg
2416 xwp 20 0 105m 17m 12m S 3 0.4 0:04.14 gnome-terminal
1909 xwp 20 0 89668 16m 11m S 1 0.4 0:09.92 indicator-apple
1911 xwp 20 0 100m 24m 15m S 1 0.6 0:03.62 python
10 root 20 0 0 0 0 S 0 0.0 0:02.62 rcu_sched
13 root 20 0 0 0 0 S 0 0.0 0:01.11 ksoftirqd/1
1232 root 20 0 2148 264 188 S 0 0.0 0:00.16 thinkfan
1906 xwp 20 0 37908 3548 2680 S 0 0.1 0:04.88 ibus-daemon
2881 xwp 20 0 269m 57m 31m S 0 1.5 0:03.51 chrome
2940 xwp 20 0 2852 1204 888 R 0 0.0 0:00.05 top
1 root 20 0 3636 2092 1316 S 0 0.1 0:01.06 init
2 root 20 0 0 0 0 S 0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0 0.0 0:01.25 ksoftirqd/0
5 root 0 -20 0 0 0 S 0 0.0 0:00.00 kworker/0:0H
7 root 0 -20 0 0 0 S 0 0.0 0:00.00 kworker/u:0H
8 root RT 0 0 0 0 S 0 0.0 0:00.00 migration/0
9 root 20 0 0 0 0 S 0 0.0 0:00.00 rcu_bh
11 root RT 0 0 0 0 S 0 0.0 0:00.00 watchdog/0
12 root RT 0 0 0 0 S 0 0.0 0:00.00 watchdog/1
14 root RT 0 0 0 0 S 0 0.0 0:00.00 migration/1
15 root 20 0 0 0 0 S 0 0.0 0:01.33 kworker/1:0
16 root 0 -20 0 0 0 S 0 0.0 0:00.00 kworker/1:0H
17 root 0 -20 0 0 0 S 0 0.0 0:00.00 cpuset
18 root 0 -20 0 0 0 S 0 0.0 0:00.00 khelper
2.cat /proc/stat
xwp@xwp:~$ cat /proc/stat
cpu 54234 9986 10308 160701 21714 17 1220 0 0 0
cpu0 27068 4457 5188 77917 13392 7 1068 0 0 0
cpu1 27166 5528 5119 82783 8321 9 152 0 0 0
intr 1877021 509654 2604 0 0 0 0 0 0 1 10379 0 0 39957 0 37630 0 0 2 0 0 30 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 638 49836 236559 410 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ctxt 4517470
btime 1418090941
processes 2854
procs_running 6
procs_blocked 0
softirq 1086426 0 360192 18 1642 37701 0 247083 66695 717 372378
3.free
free -m
xwp@xwp:~$ free -m
total used free shared buffers cached
Mem: 3961 1374 2586 0 59 692
-/+ buffers/cache: 623 3338
Swap: 3136 0 3136
4.uptime
xwp@xwp:~$ uptime
10:34:53 up 25 min, 2 users, load average: 2.62, 1.70, 1.06