linux 系统下硬件信息查看

1、Linux 查看CPU信息

2、获取物理CPU个数

 3、获取逻辑CPU个数
4、每个物理CPU中Core的个数:每个相同的physical id都有其对应的core id
5、Linux 查看内存信息
6、查看当前操作系统内核信息
7、查看当前操作系统发行版信息
9、查看机器型号(硬件)
10、查看网卡信息
11、Linux查看版本说明当前CPU运行在32bit模式还是64bit

 


1、Linux 查看CPU信息

wei>cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Xeon(R) CPU           L5420  @ 2.50GHz
stepping        : 10
cpu MHz         : 1992.000
cache size      : 6144 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 4
apicid          : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pn
i monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
bogomips        : 4987.49
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Xeon(R) CPU           L5420  @ 2.50GHz
stepping        : 10
cpu MHz         : 1992.000
cache size      : 6144 KB
physical id     : 0
siblings        : 4
core id         : 1
cpu cores       : 4
apicid          : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pn
i monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
bogomips        : 4987.42
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:

processor       : 2
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Xeon(R) CPU           L5420  @ 2.50GHz
stepping        : 10
cpu MHz         : 1992.000
cache size      : 6144 KB
physical id     : 0
siblings        : 4
core id         : 2
cpu cores       : 4
apicid          : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pn
i monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
bogomips        : 4987.51
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:

processor       : 3
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Xeon(R) CPU           L5420  @ 2.50GHz
stepping        : 10
cpu MHz         : 1992.000
cache size      : 6144 KB
physical id     : 0
siblings        : 4
core id         : 3
cpu cores       : 4
apicid          : 3
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pn
i monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
bogomips        : 4987.50
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:

processor       : 4
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Xeon(R) CPU           L5420  @ 2.50GHz
stepping        : 10
cpu MHz         : 1992.000
cache size      : 6144 KB
physical id     : 1
siblings        : 4
core id         : 0
cpu cores       : 4
apicid          : 4
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pn
i monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
bogomips        : 4987.52
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:

processor       : 5
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Xeon(R) CPU           L5420  @ 2.50GHz
stepping        : 10
cpu MHz         : 1992.000
cache size      : 6144 KB
physical id     : 1
siblings        : 4
core id         : 1
cpu cores       : 4
apicid          : 5
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pn
i monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
bogomips        : 4987.51
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:

processor       : 6
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Xeon(R) CPU           L5420  @ 2.50GHz
stepping        : 10
cpu MHz         : 1992.000
cache size      : 6144 KB
physical id     : 1
siblings        : 4
core id         : 2
cpu cores       : 4
apicid          : 6
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pn
i monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
bogomips        : 4987.99
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:

processor       : 7
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Xeon(R) CPU           L5420  @ 2.50GHz
stepping        : 10
cpu MHz         : 1992.000
cache size      : 6144 KB
physical id     : 1
siblings        : 4
core id         : 3
cpu cores       : 4
apicid          : 7
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pn
i monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
bogomips        : 4987.53
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:

processor 条目包括这一逻辑处理器的唯一标识符。
physical id 条目包括每个物理封装的唯一标识符。
core id 条目保存每个内核的唯一标识符。
siblings 条目列出了位于相同物理封装中的逻辑处理器的数量。
cpu cores 条目包含位于相同物理封装中的内核数量

 

2、获取物理CPU个数
wei>cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l
2
wei>cat /proc/cpuinfo | grep "physical id" | sort | uniq
physical id     : 0
physical id     : 1

 

 3、获取逻辑CPU个数
wei>cat /proc/cpuinfo | grep "processor" | wc -l
8
wei>cat /proc/cpuinfo | grep "processor"
processor       : 0
processor       : 1
processor       : 2
processor       : 3
processor       : 4
processor       : 5
processor       : 6
processor       : 7


4、每个物理CPU中Core的个数:每个相同的physical id都有其对应的core id
wei>cat /proc/cpuinfo | grep "cpu cores"
cpu cores       : 4
cpu cores       : 4
cpu cores       : 4
cpu cores       : 4
cpu cores       : 4
cpu cores       : 4
cpu cores       : 4
cpu cores       : 4

4 个

 

 

 

5、Linux 查看内存信息

wei>cat /proc/meminfo
MemTotal:     16436596 kB
MemFree:       8559892 kB
Buffers:         96284 kB
Cached:        5478964 kB
SwapCached:          0 kB
Active:        3536408 kB
Inactive:      4126892 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:     16436596 kB
LowFree:       8559892 kB
SwapTotal:    18481144 kB
SwapFree:     18481144 kB
Dirty:             228 kB
Writeback:           0 kB
AnonPages:     2087972 kB
Mapped:         385192 kB
Slab:           105988 kB
PageTables:      56628 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:  26699440 kB
Committed_AS: 10565760 kB
VmallocTotal: 34359738367 kB
VmallocUsed:    272352 kB
VmallocChunk: 34359465847 kB
HugePages_Total:     0
HugePages_Free:      0
HugePages_Rsvd:      0
Hugepagesize:     2048 kB
wei>

 

6、查看当前操作系统内核信息
wei>uname -a
Linux baby.com 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

 

7、查看当前操作系统发行版信息
wei>cat /etc/issue
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
Kernel \r on an \m
或者
wei>cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)

 

9、查看机器型号(硬件)
wei>dmidecode | grep "Product Name"
        Product Name: IBM System x3550 -[1913PCE]-
        Product Name: System Planar
        Product Name: Power Suppy Backplane
        Product Name: PCI-Express Riser Card, Slot 2
        Product Name: PCI-Express Riser Card, Slot 1


10、查看网卡信息
wei>dmesg | grep -i eth
Broadcom NetXtreme II Gigabit Ethernet Driver bnx2 v1.9.3 (March 17, 2009)
eth0: Broadcom NetXtreme II BCM5708 1000Base-T (B2) PCI-X 64-bit 133MHz found at

 mem c8000000, IRQ 90, node addr 001a64960e4c
eth1: Broadcom NetXtreme II BCM5708 1000Base-T (B2) PCI-X 64-bit 133MHz found at

 mem ce000000, IRQ 177, node addr 001a64960e4e
bnx2: eth0: using MSI
ADDRCONF(NETDEV_UP): eth0: link is not ready
bnx2: eth0 NIC Copper Link is Up, 100 Mbps full duplex, receive & transmit flow

control ON
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
eth0: no IPv6 routers present

 

11、Linux查看版本说明当前CPU运行在32bit模式还是64bit
wei>getconf LONG_BIT
64

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值