free 查看监控系统的内存的使用情况
[root@localhost ~]# free --h
free: invalid option -- -
usage: free [-b|-k|-m|-g] [-l] [-o] [-t] [-s delay] [-c count] [-V]
-b,-k,-m,-g show output in bytes, KB, MB, or GB
-l show detailed low and high memory statistics
-o use old format (no -/+buffers/cache line)
-t display total for RAM + swap
-s update every [delay] seconds
-c update [count] times
-V display version information and exit
[root@localhost ~]# free
total used free shared buffers cached
Mem: 89032 86476 2556 0 992 32048
-/+ buffers/cache: 53436 35596
Swap: 1081336 49636 1031700
//可以查看到swap
---------------
top 可以查看存储设备内存使用的情况
[root@localhost ~]# top --h
top: procps version 3.2.7
usage: top -hv | -bcisSHM -d delay -n iterations [-u user | -U user] -p pid [,pid ...]
[root@localhost ~]# top
top - 18:52:54 up 17 min, 3 users, load average: 2.03, 1.73, 0.82
Tasks: 113 total, 1 running, 112 sleeping, 0 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
Mem: 89032k total, 86616k used, 2416k free, 984k buffers
Swap: 1081336k total, 49636k used, 1031700k free, 32048k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 15 0 2064 536 512 S 0.0 0.6 0:09.71 init
2 root RT -5 0 0 0 S 0.0 0.0 0:00.00 migration/
----------------