linux下查看cpu和memery信息
1.查内存
#more/proc/meminfo
cat /proc/meminfo
cat /proc/meminfo | grep MemTotal
[root@www proc]#more /proc/meminfo
MemTotal: 2054100 kB
MemFree: 840524 kB
Buffers: 61216 kB
Cached: 680756 kB
SwapCached: 0 kB
Active: 485172 kB
Inactive: 647160 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 2054100 kB
LowFree: 840524 kB
SwapTotal: 2031608 kB
SwapFree: 2031508 kB
Dirty: 172 kB
Writeback: 0 kB
Mapped: 409012 kB
Slab: 52544 kB
CommitLimit: 3058656 kB
Committed_AS: 1661192 kB
PageTables: 10168 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 263432 kB
VmallocChunk: 34359474711 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
Hugepagesize: 2048 kB
#grep MemTotal /proc/meminfo(查内存总量)
[root@www proc]# grep MemTotal /proc/meminfo
MemTotal: 2054100 kB
2.查CPU
#more /proc/cpuinfo 查看CPU名称,主频,缓存等信息
[root@www proc]# more/proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpufamily : 15
model : 6
modelname : Intel(R) Xeon(TM) CPU 3.00GHz
stepping : 4
cpuMHz : 2992.669
cachesize : 2048 KB
physicalid : 0
siblings : 4
coreid : 0
cpucores : 2
fpu : yes
fpu_exception : yes
cpuidlevel : 6
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov patpse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall
nx lm constant_tsc pni monitor ds_cpl vmx est cid cx16 xtprlahf_lm
bogomips : 5991.71
clflush size : 64
cache_alignment : 128
address sizes : 36 bitsphysical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpufamily : 15
model : 6
modelname : Intel(R) Xeon(TM) CPU 3.00GHz
stepping : 4
cpuMHz : 2992.669
cachesize : 2048 KB
physic