1.查看硬盤
[mushme@investide ~]$ df -ah
文件系統 容量 已用 可用 已用% 掛載點
/dev/cciss/c0d0p1 123G 63G 55G 54% /
proc 0 0 0 - /proc
sysfs 0 0 0 - /sys
devpts 0 0 0 - /dev/pts
tmpfs 2.0G 0 2.0G 0% /dev/shm
none 0 0 0 - /proc/sys/fs/binfmt_misc
sunrpc 0 0 0 - /var/lib/nfs/rpc_pipefs
nfsd 0 0 0 - /proc/fs/nfsd
查看目錄大小
du -sh /project
2.查看內存
[mushme@investide ~]$ free -m
total used free shared buffers cached
Mem: 3916 3281 634 0 135 1858
-/+ buffers/cache: 1287 2628
Swap: 10000 235 9765
或者用下面這個命令
cat /proc/meminfo
3.查看cpu
[mushme@investide ~]$ cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
8 Intel(R) Xeon(R) CPU E5506 @ 2.13GHz
說明是8個邏輯cpu
[mushme@investide ~]$ cat /proc/cpuinfo | grep physical | uniq -c
4 physical id : 0
4 physical id : 1
實際是2個cpu
[mushme@investide ~]$ getconf LONG_BIT
32
當前cpu運行在32位下
[mushme@investide ~]$ cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l
8
(結果大於0, 說明支持64bit計算. lm指long mode, 支持lm則是64bit)
再完整看cpu詳細信息, 不過大部分我們都不關心而已.
# dmidecode | grep 'Processor Information'
# dmidecode | grep 'Processor Information'
4.查看當前操作系統內核信息
[mushme@investide ~]$ uname -a
Linux investide.cn 2.6.18-238.9.1.el5PAE #1 SMP Tue Apr 12 18:52:55 EDT 2011 i686 i686 i386 GNU/Linux
5.查看網卡信息
# dmesg | grep -i eth
6.查看系統
cat /etc/issue