歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> Linux系統查看硬件配置

Linux系統查看硬件配置

日期:2017/3/1 11:53:06   编辑:關於Linux

以CentOS系統為例
一、CPU
cat /proc/cpuinfo
如下是我的CPU信息,有4個信息,說明有4個邏輯CPU,但是每個physical id相同,說明只有1個物理CPU。
1、多個邏輯CPU的”physical id”和”core id”均相同,說明開啟了超線程。
2、flags中有lm標記,說明是64位的CPU
3、我的processor有4個不同的編號,並且同屬於一個physical id,同時cpu cores 的值為1,這也就說明了我的CPU是單核心的,並且核心上有4個邏輯處理器。
所以,我的機器CPU是Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz型號,1個64位物理CPU,單核4線程。

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 62
model name  : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping    : 4
microcode   : 1046
cpu MHz     : 2600.058
cache size  : 20480 KB
physical id : 12
siblings    : 1
core id     : 0
cpu cores   : 1
apicid      : 12
initial apicid  : 12
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good unfair_spinlock pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt tsc_deadline_timer aes f16c rdrand hypervisor lahf_lm ida arat pln pts dts fsgsbase erms
bogomips    : 5200.11
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

processor   : 1
vendor_id   : GenuineIntel
cpu family  : 6
model       : 62
model name  : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping    : 4
microcode   : 1046
cpu MHz     : 2600.058
cache size  : 20480 KB
physical id : 12
siblings    : 1
core id     : 0
cpu cores   : 1
apicid      : 12
initial apicid  : 12
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good unfair_spinlock pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt tsc_deadline_timer aes f16c rdrand hypervisor lahf_lm ida arat pln pts dts fsgsbase erms
bogomips    : 5200.11
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

processor   : 2
vendor_id   : GenuineIntel
cpu family  : 6
model       : 62
model name  : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping    : 4
microcode   : 1046
cpu MHz     : 2600.058
cache size  : 20480 KB
physical id : 12
siblings    : 1
core id     : 0
cpu cores   : 1
apicid      : 12
initial apicid  : 12
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good unfair_spinlock pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt tsc_deadline_timer aes f16c rdrand hypervisor lahf_lm ida arat pln pts dts fsgsbase erms
bogomips    : 5200.11
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

processor   : 3
vendor_id   : GenuineIntel
cpu family  : 6
model       : 62
model name  : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping    : 4
microcode   : 1046
cpu MHz     : 2600.058
cache size  : 20480 KB
physical id : 12
siblings    : 1
core id     : 0
cpu cores   : 1
apicid      : 12
initial apicid  : 12
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good unfair_spinlock pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt tsc_deadline_timer aes f16c rdrand hypervisor lahf_lm ida arat pln pts dts fsgsbase erms
bogomips    : 5200.11
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

二、內存
cat /proc/meminfo
如下是我的內存信息,總內存3.7G,剩余約380M

MemTotal:        3974056 kB
MemFree:          390724 kB
Buffers:           27460 kB
Cached:            98616 kB
SwapCached:        43080 kB
Active:          2634864 kB
Inactive:         692540 kB
Active(anon):    2584488 kB
Inactive(anon):   618872 kB
Active(file):      50376 kB
Inactive(file):    73668 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       3145724 kB
SwapFree:              0 kB
Dirty:                32 kB
Writeback:             0 kB
AnonPages:       3159036 kB
Mapped:            15320 kB
Shmem:              2032 kB
Slab:              97000 kB
SReclaimable:      18188 kB
SUnreclaim:        78812 kB
KernelStack:        4816 kB
PageTables:       101172 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     5132752 kB
Committed_AS:    9925672 kB
VmallocTotal:   34359738367 kB
VmallocUsed:       18008 kB
VmallocChunk:   34359719108 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:     4194304 kB
DirectMap2M:           0 kB

三、硬盤
1、查看硬盤和分區
lsblk

NAME                        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
xvda                        202:0    0   30G  0 disk 
├─xvda1                     202:1    0  500M  0 part /boot
└─xvda2                     202:2    0 29.5G  0 part 
  ├─VolGroup-lv_root (dm-0) 253:0    0 26.5G  0 lvm  /
  └─VolGroup-lv_swap (dm-1) 253:1    0    3G  0 lvm  [SWAP]
Copyright © Linux教程網 All Rights Reserved