查看cpu lscpu
可以查看cpu信息
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 2 Core(s) per socket: 2 Socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 37 Model name: Intel(R) Core(TM) i3 CPU M 380 @ 2.53GHz Stepping: 5 CPU MHz: 1199.000 CPU max MHz: 2533.0000 CPU min MHz: 933.0000 BogoMIPS: 5054.55 Virtualization: VT-x L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 3072K NUMA node0 CPU(s): 0-3
cat /proc/cpuinfo
和上面输出cpu的更多信息
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 37 model name : Intel(R) Core(TM) i3 CPU M 380 @ 2.53GHz stepping : 5 microcode : 0x2 cpu MHz : 1199.000 cache size : 3072 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 2 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 11 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 pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt lahf_lm arat dtherm tpr_shadow vnmi flexpriority ept vpid bugs : bogomips : 5054.55 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 37 model name : Intel(R) Core(TM) i3 CPU M 380 @ 2.53GHz stepping : 5 microcode : 0x2 cpu MHz : 933.000 cache size : 3072 KB physical id : 0 siblings : 4 core id : 2 cpu cores : 2 apicid : 4 initial apicid : 4 fpu : yes fpu_exception : yes cpuid level : 11 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 pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt lahf_lm arat dtherm tpr_shadow vnmi flexpriority ept vpid bugs : bogomips : 5054.55 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: processor : 2 vendor_id : GenuineIntel cpu family : 6 model : 37 model name : Intel(R) Core(TM) i3 CPU M 380 @ 2.53GHz stepping : 5 microcode : 0x2 cpu MHz : 2133.000 cache size : 3072 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 2 apicid : 1 initial apicid : 1 fpu : yes fpu_exception : yes cpuid level : 11 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 pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt lahf_lm arat dtherm tpr_shadow vnmi flexpriority ept vpid bugs : bogomips : 5054.55 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: processor : 3 vendor_id : GenuineIntel cpu family : 6 model : 37 model name : Intel(R) Core(TM) i3 CPU M 380 @ 2.53GHz stepping : 5 microcode : 0x2 cpu MHz : 933.000 cache size : 3072 KB physical id : 0 siblings : 4 core id : 2 cpu cores : 2 apicid : 5 initial apicid : 5 fpu : yes fpu_exception : yes cpuid level : 11 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 pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt lahf_lm arat dtherm tpr_shadow vnmi flexpriority ept vpid bugs : bogomips : 5054.55 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management:
cat /proc/cpuinfo |grep name |cut -f2 -d : |uniq -c
可以查看cpu的型号dmidecode
可以查看很多硬件信息也可以查看cpu的信息
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 # dmidecode 2.12 SMBIOS 2.6 present. Handle 0x0004, DMI type 4, 35 bytes Processor Information Socket Designation: N/A Type: Central Processor Family: Core i3 Manufacturer: GenuineIntel ID: 55 06 02 00 FF FB EB BF Signature: Type 0, Family 6, Model 37, Stepping 5 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) Core(TM) i3 CPU M 380 @ 2.53GHz Voltage: 1.4 V External Clock: 133 MHz Max Speed: 2533 MHz Current Speed: 2533 MHz Status: Populated, Enabled Upgrade: None L1 Cache Handle: 0x0005 L2 Cache Handle: 0x0006 L3 Cache Handle: 0x0007 Serial Number: N/A Asset Tag: N/A Part Number: N/A
dmidecode
可以查看更多硬件信息,根据种类的不同,主要分为以下的种类:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 0 BIOS 1 System 2 Baseboard 3 Chassis 4 Processor 5 MemoryController 6 MemoryModule 7 Cache 8 PortConnector 9 SystemSlots 10 OnBoardDevices 11 OEMStrings 12 SystemConfigurationOptions 13 BIOSLanguage 14 GroupAssociations 15 SystemEventLog 16 PhysicalMemoryArray 17 MemoryDevice 18 32-bitMemoryError 19 MemoryArrayMappedAddress 20 MemoryDeviceMappedAddress 21 Built-inPointingDevice 22 PortableBattery 23 SystemReset 24 HardwareSecurity 25 SystemPowerControls 26 VoltageProbe 27 CoolingDevice 28 TemperatureProbe 29 ElectricalCurrentProbe 30 Out-of-bandRemoteAccess 31 BootIntegrityServices 32 SystemBoot 33 64-bitMemoryError 34 ManagementDevice 35 ManagementDeviceComponent 36 ManagementDeviceThresholdData 37 MemoryChannel 38 IPMIDevice 39 PowerSupply 40 AdditionalInformation 41 OnboardDevicesExtendedInformation 42 ManagementControllerHostInterface
内存信息查看 dmidecode -t memory
可以查看内存的信息
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 # dmidecode -t memory # dmidecode 2.12 SMBIOS 2.6 present. Handle 0x0009, DMI type 16, 15 bytes Physical Memory Array Location: System Board Or Motherboard Use: System Memory Error Correction Type: None Maximum Capacity: Unknown Error Information Handle: Not Provided Number Of Devices: 2 Handle 0x000A, DMI type 17, 21 bytes Memory Device Array Handle: 0x0009 Error Information Handle: Not Provided Total Width: 64 bits Data Width: 64 bits Size: 2048 MB Form Factor: SODIMM Set: None Locator: SODIMM1 Bank Locator: Bank 0 Type: DDR3 Type Detail: Unknown Handle 0x000C, DMI type 17, 21 bytes Memory Device Array Handle: 0x0009 Error Information Handle: Not Provided Total Width: 64 bits Data Width: 64 bits Size: 4096 MB Form Factor: SODIMM Set: None Locator: SODIMM2 Bank Locator: Bank 1 Type: DDR3 Type Detail: Unknown
free -h
可以查看当前系统中内存的使用情况
硬盘信息查看 lsblk -n -nodeps -o name,serial
可以查看硬盘的序列号lsblk
可以查看硬盘的分区信息以及分区的挂在情况
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 # lsblk -n -nodeps -o name,serial sda 5VD61WA1 |-sda1 `-sda2 |-fedora-swap |-fedora-root `-fedora-home sr0 loop0 `-docker-253:1-2884659-pool loop1 `-docker-253:1-2884659-pool # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 298.1G 0 disk |-sda1 8:1 0 500M 0 part /boot `-sda2 8:2 0 297.6G 0 part |-fedora-swap 253:0 0 2G 0 lvm [SWAP] |-fedora-root 253:1 0 98.8G 0 lvm / `-fedora-home 253:2 0 196.8G 0 lvm /home sr0 11:0 1 1024M 0 rom loop0 7:0 0 100G 0 loop `-docker-253:1-2884659-pool 253:3 0 100G 0 dm loop1 7:1 0 2G 0 loop `-docker-253:1-2884659-pool 253:3 0 100G 0 dm
其他 1 2 3 4 5 6 7 8 lspci #查看pci相关设备 lsusp #查看usb相关设备 lsscsi # 查看scsi相关设备 ipmitool #查看BMC相关信息 fdisk # 查看磁盘分区信息 lshw --short #查看硬件信息列表 hwinfo --short #也可以查看硬件信息