如何檢視centos系統cpu/記憶體使用情況
1.檢視硬碟
[[email protected] ~]$ 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.檢視記憶體
[[email protected] ~]$ 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
[[email protected] ~]$ cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
8 Intel(R) Xeon(R) CPU E5506 @ 2.13GHz
說明是8個邏輯cpu
[[email protected] ~]$ cat /proc/cpuinfo | grep physical | uniq -c
4 physical id : 0
4 physical id : 1
實際是2個cpu
[[email protected] ~]$ getconf LONG_BIT
32
當前cpu執行在32位下
[[email protected] ~]$ cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l
8
(結果大於0, 說明支援64bit計算. lm指long mode, 支援lm則是64bit)
再完整看cpu詳細資訊, 不過大部分我們都不關心而已.
# dmidecode | grep 'Processor Information'
4.檢視當前作業系統核心資訊
[[email protected] ~]$ 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