查看CPU信息(型号)
# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
8 Intel(R) Xeon(R) CPU E5405 @ 2.00GHz
(看到有8个逻辑CPU, 也知道了CPU型号)
# cat /proc/cpuinfo | grep physical | uniq -c
1 physical id : 0
1 address sizes : 38 bits physical, 48 bits virtual
1 physical id : 1
1 address sizes : 38 bits physical, 48 bits virtual
1 physical id : 0
1 address sizes : 38 bits physical, 48 bits virtual
1 physical id : 1
1 address sizes : 38 bits physical, 48 bits virtual
1 physical id : 0
1 address sizes : 38 bits physical, 48 bits virtual
1 physical id : 1
1 address sizes : 38 bits physical, 48 bits virtual
1 physical id : 0
1 address sizes : 38 bits physical, 48 bits virtual
1 physical id : 1
1 address sizes : 38 bits physical, 48 bits virtual
(说明实际上是两颗4核的CPU)
# getconf LONG_BIT
32
(说明当前CPU运行在32bit模式下, 但不代表CPU不支持64bit)
# cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l
8
(结果大于0, 说明支持64bit计算. lm指long mode, 支持lm则是64bit)
再完整看cpu详细信息, 不过大部分我们都不关心而已.
# dmidecode | grep 'Processor Information'
查看内 存信息
# cat /proc/meminfo
MemTotal: 4045524 kB
MemFree: 192904 kB
Buffers: 130848 kB
Cached: 3275984 kB
SwapCached: 10076 kB
Active: 3015852 kB
Inactive: 618200 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 4045524 kB
LowFree: 192904 kB
SwapTotal: 6094840 kB
SwapFree: 6054660 kB
Dirty: 1084 kB
Writeback: 0 kB
AnonPages: 225352 kB
Mapped: 20672 kB
Slab: 176908 kB
PageTables: 12684 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 8117600 kB
Committed_AS: 925016 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 266084 kB
VmallocChunk: 34359472087 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
Hugepagesize: 2048 kB
# uname -a
Linux localhost.localdomain 2.6.18-238.el5 #1 SMP Thu Jan 13 15:51:15 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
(查看当前操作系统内核信息)
# cat /etc/issue | grep Linux
Red Hat Enterprise Linux AS release 4 (Nahant Update 5)
(查看当前操作系统发行版信息)
查看机器型号
# dmidecode | grep "Product Name"
Product Name: ProLiant DL380 G5
# dmesg | grep -i eth