CentOS/Linux 查看硬件配置CPU内存磁盘

【查看系统内存空间】

引用
free -m


             total       used       free     shared    buffers     cached
Mem:          3500        637       2863          0         51        290
-/+ buffers/cache:        294       3205
Swap:         7999          0       7999


以MB为单位显示内存空间,“Mem”后的total列就是内存大小。3500实际就是4GB。

【查看内存插槽和内存条】

引用
dmidecode --type memory


# dmidecode 2.11
SMBIOS 2.7 present.

Handle 0x0040, DMI type 16, 23 bytes
Physical Memory Array
	Location: System Board Or Motherboard
	Use: System Memory
	Error Correction Type: None
	Maximum Capacity: 32 GB  ##硬件能够支持的最大量
	Error Information Handle: Not Provided
	Number Of Devices: 4     ##内存插槽数量

Handle 0x0042, DMI type 17, 34 bytes
Memory Device
	Array Handle: 0x0040
	Error Information Handle: Not Provided
	Total Width: 64 bits
	Data Width: 64 bits
	Size: 4096 MB            ##内存条空间
	Form Factor: DIMM
	Set: None
	Locator: ChannelA-DIMM0
	Bank Locator: BANK 0     ##插槽位置编号
	Type: DDR3               ##内存条类型
	Type Detail: Synchronous
	Speed: 1333 MHz          ##内存条主频
	Manufacturer: Kingston   ##内存条厂商
	Serial Number: 9B369A8C
	Asset Tag: 9876543210
	Part Number: 99P5474-055.A00LF 
	Rank: 1
	Configured Clock Speed: 1333 MHz

Handle 0x0044, DMI type 17, 34 bytes
Memory Device
	Array Handle: 0x0040
	Error Information Handle: Not Provided
	Total Width: Unknown
	Data Width: Unknown
	Size: No Module Installed ##插槽没安装内存条
	Form Factor: DIMM
	Set: None
	Locator: ChannelA-DIMM1
	Bank Locator: BANK 1
	Type: Unknown
	Type Detail: None
	Speed: Unknown
	Manufacturer: [Empty]
	Serial Number: [Empty]
	Asset Tag: 9876543210
	Part Number: [Empty]
	Rank: Unknown
	Configured Clock Speed: Unknown






【查看磁盘及分区情况】

引用
fdisk -l


Disk /dev/sda: 1000.2 GB, 1000204886016 bytes   ##磁盘sda空间1TB,分三个区
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0002cb39

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          26      204800   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              26        1046     8192000   82  Linux swap / Solaris
/dev/sda3            1046      121602   968364032   83  Linux





【查看磁盘分区挂载情况】
对照fdisk -l可以看到各分区空间分别挂载到了哪个目录下、是否有磁盘分区未挂载使用。
引用
df -h


Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3       910G  5.1G  858G   1% /   ##磁盘sda最大分区sda3挂载在根目录下910GB
tmpfs           1.8G   72K  1.8G   1% /dev/shm
/dev/sda1       194M   32M  152M  18% /boot




【查看硬盘硬件信息】

引用
smartctl --all /dev/sda

如果此工具命令不支持可以使用hdparm -i /dev/sda查看型号,建议安装此工具
smartctl 5.43 2012-06-30 r3573 [i686-linux-2.6.32-431.el6.i686] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Barracuda (SATA 3Gb/s, 4K Sectors) ##厂商
Device Model:     ST1000DM003-1ER162                         ##型号
Serial Number:    W4Y4PK8N                                   ##序列号
LU WWN Device Id: 5 000c50 08a8951c8
Firmware Version: CC46
User Capacity:    1,000,204,886,016 bytes [1.00 TB]          ##空间
Sector Sizes:     512 bytes logical, 4096 bytes physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   8
ATA Standard is:  ACS-2 (unknown minor revision code: 0x001f)
Local Time is:    Fri Jan 12 14:19:32 2018 CST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled



如果有RAID卡,参考http://blog.csdn.net/msdnchina/article/details/52475383


【查看CPU硬件信息】

引用
dmidecode --type processor

# dmidecode 2.11
SMBIOS 2.7 present.

Handle 0x0041, DMI type 4, 42 bytes
Processor Information
	Socket Designation: SOCKET 0                          ##插槽0
	Type: Central Processor
	Family: Pentium                                       ##家族系列
	Manufacturer: Intel(R) Corporation                    ##制造商
	ID: A7 06 02 00 FF FB EB BF
	Signature: Type 0, Family 6, Model 42, Stepping 7
	Flags:
		FPU (Floating-point unit on-chip)
		VME (Virtual mode extension)
		DE (Debugging extension)
		PSE (Page size extension)
		TSC (Time stamp counter)
		MSR (Model specific registers)
		PAE (Physical address extension)
		MCE (Machine check exception)
		CX8 (CMPXCHG8 instruction supported)
		APIC (On-chip APIC hardware supported)
		SEP (Fast system call)
		MTRR (Memory type range registers)
		PGE (Page global enable)
		MCA (Machine check architecture)
		CMOV (Conditional move instruction supported)
		PAT (Page attribute table)
		PSE-36 (36-bit page size extension)
		CLFSH (CLFLUSH instruction supported)
		DS (Debug store)
		ACPI (ACPI supported)
		MMX (MMX technology supported)
		FXSR (FXSAVE and FXSTOR instructions supported)
		SSE (Streaming SIMD extensions)
		SSE2 (Streaming SIMD extensions 2)
		SS (Self-snoop)
		HTT (Multi-threading)
		TM (Thermal monitor supported)
		PBE (Pending break enabled)
	Version: Intel(R) Pentium(R) CPU G860 @ 3.00GHz         ##CPU型号
	Voltage: 5.0 V 3.3 V 2.9 V
	External Clock: 100 MHz
	Max Speed: 3800 MHz
	Current Speed: 3000 MHz
	Status: Populated, Enabled
	Upgrade: Socket BGA1155
	L1 Cache Handle: 0x003E
	L2 Cache Handle: 0x003D
	L3 Cache Handle: 0x003F
	Serial Number: Not Specified
	Asset Tag: Fill By OEM
	Part Number: Fill By OEM
	Core Count: 2                                          ##核心总数
	Core Enabled: 2                                        ##线程总数
	Thread Count: 2
	Characteristics:
		64-bit capable                                 ##是否支持64位



下面是另外一台服务器的CPU信息。
# dmidecode 2.11
SMBIOS 2.8 present.
# SMBIOS implementations newer than version 2.7 are not
# fully supported by this version of dmidecode.

Handle 0x0016, DMI type 4, 42 bytes
Processor Information
	Socket Designation: CPU01   ##CPU1
	Type: Central Processor
	Family: Xeon                ##至强
	Manufacturer: Intel(R) Corporation
	ID: F2 06 03 00 FF FB EB BF
	Signature: Type 0, Family 6, Model 63, Stepping 2
	Flags:
		FPU (Floating-point unit on-chip)
		VME (Virtual mode extension)
		DE (Debugging extension)
		PSE (Page size extension)
		TSC (Time stamp counter)
		MSR (Model specific registers)
		PAE (Physical address extension)
		MCE (Machine check exception)
		CX8 (CMPXCHG8 instruction supported)
		APIC (On-chip APIC hardware supported)
		SEP (Fast system call)
		MTRR (Memory type range registers)
		PGE (Page global enable)
		MCA (Machine check architecture)
		CMOV (Conditional move instruction supported)
		PAT (Page attribute table)
		PSE-36 (36-bit page size extension)
		CLFSH (CLFLUSH instruction supported)
		DS (Debug store)
		ACPI (ACPI supported)
		MMX (MMX technology supported)
		FXSR (FXSAVE and FXSTOR instructions supported)
		SSE (Streaming SIMD extensions)
		SSE2 (Streaming SIMD extensions 2)
		SS (Self-snoop)
		HTT (Multi-threading)
		TM (Thermal monitor supported)
		PBE (Pending break enabled)
	Version: Intel(R) Xeon(R) CPU E5-2609 v3 @ 1.90GHz   ##型号Xeon E5-2609 v3
	Voltage: 1.8 V
	External Clock: 100 MHz
	Max Speed: 3500 MHz
	Current Speed: 1900 MHz
	Status: Populated, Enabled
	Upgrade: <OUT OF SPEC>
	L1 Cache Handle: 0x0013
	L2 Cache Handle: 0x0014
	L3 Cache Handle: 0x0015
	Serial Number: Not Specified
	Asset Tag: UNKNOWN
	Part Number: Not Specified
	Core Count: 6                                        ##六核
	Core Enabled: 6
	Thread Count: 6                                      ##六线程
	Characteristics:
		64-bit capable
		Multi-Core
		Hardware Thread
		Execute Protection
		Enhanced Virtualization
		Power/Performance Control

Handle 0x001B, DMI type 4, 42 bytes
Processor Information
	Socket Designation: CPU02                           ##第二个CPU
	Type: Central Processor
	Family: Xeon
	Manufacturer: Intel(R) Corporation
	ID: F2 06 03 00 FF FB EB BF
	Signature: Type 0, Family 6, Model 63, Stepping 2
	Flags:
		FPU (Floating-point unit on-chip)
		VME (Virtual mode extension)
		DE (Debugging extension)
		PSE (Page size extension)
		TSC (Time stamp counter)
		MSR (Model specific registers)
		PAE (Physical address extension)
		MCE (Machine check exception)
		CX8 (CMPXCHG8 instruction supported)
		APIC (On-chip APIC hardware supported)
		SEP (Fast system call)
		MTRR (Memory type range registers)
		PGE (Page global enable)
		MCA (Machine check architecture)
		CMOV (Conditional move instruction supported)
		PAT (Page attribute table)
		PSE-36 (36-bit page size extension)
		CLFSH (CLFLUSH instruction supported)
		DS (Debug store)
		ACPI (ACPI supported)
		MMX (MMX technology supported)
		FXSR (FXSAVE and FXSTOR instructions supported)
		SSE (Streaming SIMD extensions)
		SSE2 (Streaming SIMD extensions 2)
		SS (Self-snoop)
		HTT (Multi-threading)
		TM (Thermal monitor supported)
		PBE (Pending break enabled)
	Version: Intel(R) Xeon(R) CPU E5-2609 v3 @ 1.90GHz
	Voltage: 1.8 V
	External Clock: 100 MHz
	Max Speed: 3500 MHz
	Current Speed: 1900 MHz
	Status: Populated, Enabled
	Upgrade: <OUT OF SPEC>
	L1 Cache Handle: 0x0018
	L2 Cache Handle: 0x0019
	L3 Cache Handle: 0x001A
	Serial Number: Not Specified
	Asset Tag: UNKNOWN
	Part Number: Not Specified
	Core Count: 6
	Core Enabled: 6
	Thread Count: 6
	Characteristics:
		64-bit capable
		Multi-Core
		Hardware Thread
		Execute Protection
		Enhanced Virtualization
		Power/Performance Control

猜你喜欢

转载自lixor.iteye.com/blog/2407573
今日推荐