free 可以查看使用状态
total used free shared buffers cached
Mem: 2022636 1988760 33876 0 111384 515664
-/+ buffers/cache: 1361712 660924
Swap: 7905272 20500 7884772
top可以动态查看内存和cpu的使用状态。
Mem: 2022636k total, 1993728k used, 28908k free, 111424k buffers
Swap: 7905272k total, 20500k used, 7884772k free, 516716k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
939 root 20 0 171m 38m 15m S 2 2.0 22:32.29 Xorg
1580 archer 20 0 927m 156m 30m S 2 7.9 20:05.28 firefox
1 root 20 0 23696 1800 1236 S 0 0.1 0:00.44 init
2 root 20 0 0 0 0 S 0 0.0 0:00.00 kthreadd
3 root RT 0 0 0 0 S 0 0.0 0:00.01 migration/0
4 root 20 0 0 0 0 S 0 0.0 0:00.29 ksoftirqd/0
5 root RT 0 0 0 0 S 0 0.0 0:00.00 watchdog/0
6 root RT 0 0 0 0 S 0 0.0 0:00.01 migration/1
7 root 20 0 0 0 0 S 0 0.0 0:00.37 ksoftirqd/1
8 root RT 0 0 0 0 S 0 0.0 0:00.00 watchdog/1
9 root 20 0 0 0 0 S 0 0.0 0:00.35 events/0
10 root 20 0 0 0 0 S 0 0.0 0:00.58 events/1
11 root 20 0 0 0 0 S 0 0.0 0:00.00 cpuset
12 root 20 0 0 0 0 S 0 0.0 0:00.00 khelper
13 root 20 0 0 0 0 S 0 0.0 0:00.00 netns
14 root 20 0 0 0 0 S 0 0.0 0:00.00 async/mgr
15 root 20 0 0 0 0 S 0 0.0 0:00.00 pm