Linux命令:free & df & du !


free:查看内存使用情况。
-m:显示的单位是以MB来显示。

-t:在输出的最终结果中显示物理内存与swap的总量。

  1. [root@db ~]# free -m  
  2.              total       used       free     shared    buffers     cached  
  3. Mem:           503        195        307          0         13        149  
  4. -/+ buffers/cache:         33        469  
  5. Swap:         1027          0       1027  
  6.   
  7. [root@db ~]# free -mt  
  8.              total       used       free     shared    buffers     cached  
  9. Mem:           503        195        307          0         13        149  
  10. -/+ buffers/cache:         33        469  
  11. Swap:         1027          0       1027  
  12. Total:        1530        195       1335  
说明:
Mem:物理内存。
Swap:虚拟内存。
total:总量。
used:已经使用的量。
free:剩余可用的量。
shared:共享内存。
buffers:用于缓冲存储器。
cache:用于高速缓存。
-------------------------------------------------------------------------
df:列出文件系统的整体磁盘使用量。
  1. [root@linux ~]# df -h  
  2. 文件系统              容量  已用 可用 已用% 挂载点  
  3. /dev/sda3              19G   11G  6.6G  63% /  
  4. /dev/sda1              99M   12M   83M  12% /boot  
  5. tmpfs                 252M     0  252M   0% /dev/shm  
-------------------------------------------------------------------------
du:评估文件系统的磁盘使用量(常用于评估目录所占容量)。
  1. [root@linux Oracle]# du -hs flash_recovery_area/  
  2. 392M    flash_recovery_area/  
  3. [root@linux oracle]# du -h flash_recovery_area/  
  4. 4.0K    flash_recovery_area/ORCL/onlinelog  
  5. 294M    flash_recovery_area/ORCL/archivelog/2011_11_18  
  6. 98M     flash_recovery_area/ORCL/archivelog/2011_11_19  
  7. 392M    flash_recovery_area/ORCL/archivelog  
  8. 392M    flash_recovery_area/ORCL  
  9. 392M    flash_recovery_area/  

相关内容