Linux 怎么查看 内存大小?
使用free命令
1 2 3 4 5 6 7 8 9 10 11 |
free --help root@deweb2 [~]# free --help 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 输出格式 比如 free -m =以兆显示 -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 |
常用显示方式
free -m
1 2 3 4 5 |
root@deweb2 [~]# free -m total used free shared buffers cached Mem: 32080 3239 28841 0 227 1817 -/+ buffers/cache: 1194 30885 Swap: 8031 0 8031 |
32G内存以G显示 通常会显示31G
这个是M G bit的历史遗留问题….