1、查询cpu的相关

  a、查询CPU的统计信息

  使用命令:lscpu

  得到的结果如下:

  

Architecture:          x86_64
CPU op-mode(s): -bit, -bit
Byte Order: Little Endian
CPU(s):
On-line CPU(s) list: -
Thread(s) per core:
Core(s) per socket:
Socket(s):
NUMA node(s):
Vendor ID: GenuineIntel
CPU family:
Model:
Stepping:
CPU MHz: 2099.939
BogoMIPS: 4199.44
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 15360K
NUMA node0 CPU(s): -
NUMA node1 CPU(s): -

  b、查询每个CPU信息  

  使用的命令:cat /proc/cpuinfo

  得到如下结果:

processor    :
vendor_id : GenuineIntel
cpu family :
model :
model name : Intel(R) Xeon(R) CPU E5- v2 @ .10GHz
stepping :
cpu MHz : 2099.939
cache size : KB
physical id :
siblings :
core id :
cpu cores :
apicid :
initial apicid :
fpu : yes
fpu_exception : yes
cpuid level :
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 pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
bogomips : 4199.87
clflush size :
cache_alignment :
address sizes : bits physical, bits virtual
power management: processor :
vendor_id : GenuineIntel
cpu family :
model :
model name : Intel(R) Xeon(R) CPU E5- v2 @ .10GHz
stepping :
cpu MHz : 2099.939
cache size : KB
physical id :
siblings :
core id :
cpu cores :
apicid :
initial apicid :
fpu : yes
fpu_exception : yes
cpuid level :
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 pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
bogomips : 4199.87
clflush size :
cache_alignment :
address sizes : bits physical, bits virtual
power management: processor :
vendor_id : GenuineIntel
cpu family :
model :
model name : Intel(R) Xeon(R) CPU E5- v2 @ .10GHz
stepping :
cpu MHz : 2099.939
cache size : KB
physical id :
siblings :
core id :
cpu cores :
apicid :
initial apicid :
fpu : yes
fpu_exception : yes
cpuid level :
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 pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
bogomips : 4199.87
clflush size :
cache_alignment :
address sizes : bits physical, bits virtual
power management:

2、查询所有的pci设备信息(pci是一种总线,而通过pci总线连接的设备就是pci设备了,如今,我们常用的设备很多都采用pci总线了,如网卡存储等)

  使用命令:lspci

  得到结果:

:00.0 Host bridge: Intel Corporation Xeon E5 v2/Core i7 DMI2 (rev )
:01.0 PCI bridge: Intel Corporation Xeon E5 v2/Core i7 PCI Express Root Port 1a (rev )
:01.1 PCI bridge: Intel Corporation Xeon E5 v2/Core i7 PCI Express Root Port 1b (rev )
:02.0 PCI bridge: Intel Corporation Xeon E5 v2/Core i7 PCI Express Root Port 2a (rev )
:03.0 PCI bridge: Intel Corporation Xeon E5 v2/Core i7 PCI Express Root Port 3a (rev )
:03.2 PCI bridge: Intel Corporation Xeon E5 v2/Core i7 PCI Express Root Port 3c (rev )
:04.0 System peripheral: Intel Corporation Xeon E5 v2/Core i7 Crystal Beach DMA Channel (rev )
:04.1 System peripheral: Intel Corporation Xeon E5 v2/Core i7 Crystal Beach DMA Channel (rev )
:04.2 System peripheral: Intel Corporation Xeon E5 v2/Core i7 Crystal Beach DMA Channel (rev )
:04.3 System peripheral: Intel Corporation Xeon E5 v2/Core i7 Crystal Beach DMA Channel (rev )
:04.4 System peripheral: Intel Corporation Xeon E5 v2/Core i7 Crystal Beach DMA Channel (rev )
:04.5 System peripheral: Intel Corporation Xeon E5 v2/Core i7 Crystal Beach DMA Channel (rev )
:04.6 System peripheral: Intel Corporation Xeon E5 v2/Core i7 Crystal Beach DMA Channel (rev )
:04.7 System peripheral: Intel Corporation Xeon E5 v2/Core i7 Crystal Beach DMA Channel (rev )
:05.0 System peripheral: Intel Corporation Xeon E5 v2/Core i7 VTd/Memory Map/Misc (rev )
:05.2 System peripheral: Intel Corporation Xeon E5 v2/Core i7 IIO RAS (rev )
:05.4 PIC: Intel Corporation Xeon E5 v2/Core i7 IOAPIC (rev )
:11.0 PCI bridge: Intel Corporation C600/X79 series chipset PCI Express Virtual Root Port (rev )
:16.0 Communication controller: Intel Corporation C600/X79 series chipset MEI Controller # (rev )
:16.1 Communication controller: Intel Corporation C600/X79 series chipset MEI Controller # (rev )
:1a. USB controller: Intel Corporation C600/X79 series chipset USB2 Enhanced Host Controller # (rev )
:1d. USB controller: Intel Corporation C600/X79 series chipset USB2 Enhanced Host Controller # (rev )
:1e. PCI bridge: Intel Corporation PCI Bridge (rev a6)
:1f. ISA bridge: Intel Corporation C600/X79 series chipset LPC Controller (rev )
:1f. SATA controller: Intel Corporation C600/X79 series chipset -Port SATA AHCI Controller (rev )
:1f. SMBus: Intel Corporation C600/X79 series chipset SMBus Host Controller (rev )
:1f. Signal processing controller: Intel Corporation C600/X79 series chipset Thermal Management Controller (rev )
:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev )
:00.1 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev )
:00.0 Network controller: Mellanox Technologies MT27500 Family [ConnectX-]
:04.0 VGA compatible controller: Matrox Electronics Systems Ltd. MGA G200eW WPCM450 (rev 0a)

如果要利用lscpi查询网卡型号可以使用命令:lspci |grep Ethernet

得到结果:

:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev )
:00.1 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev )

3、查询内存相关信息

  a、查看内存大小

  使用命令:free

  得到内存的一个整体信息如下:

             total       used       free     shared    buffers     cached
Mem:
-/+ buffers/cache:
Swap:

  b、查看详细信息

  使用命令:cat /proc/meminfo

  结果:

MemTotal:        kB
MemFree: kB
Buffers: kB
Cached: kB
SwapCached: kB
Active: kB
Inactive: kB
Active(anon): kB
Inactive(anon): kB
Active(file): kB
Inactive(file): kB
Unevictable: kB
Mlocked: kB
SwapTotal: kB
SwapFree: kB
Dirty: kB
Writeback: kB
AnonPages: kB
Mapped: kB
Shmem: kB
Slab: kB
SReclaimable: kB
SUnreclaim: kB
KernelStack: kB
PageTables: kB
NFS_Unstable: kB
Bounce: kB
WritebackTmp: kB
CommitLimit: kB
Committed_AS: kB
VmallocTotal: kB
VmallocUsed: kB
VmallocChunk: kB
HardwareCorrupted: kB
AnonHugePages: kB
HugePages_Total:
HugePages_Free:
HugePages_Rsvd:
HugePages_Surp:
Hugepagesize: kB
DirectMap4k: kB
DirectMap2M: kB
DirectMap1G: kB

4、查看系统内核相关信息

  使用命令:uname -a

  结果:

Linux cn13 2.6.-.el6.x86_64 # SMP Sun Nov  :: EST  x86_64 x86_64 x86_64 GNU/Linux

  查看系统版本

  使用命令:cat /etc/issue

  结果:

Red Hat Enterprise Linux Server release 6.5 (Santiago)

5、利用dmindecode查看硬件信息

查看服务器型号
dmidecode | grep 'product name'
查看主板序列号
dmidecode | grep 'Serial Number'
查看系统序列号
dmidecode -s systems-serial-number
查看内存信息
dmidecode -t memory
查看oem信息
dmidecode -t 11

**6、利用ibstat查看infiniband网卡的信息:

结果:

CA 'mlx4_0'
CA type: MT4099
Number of ports:
Firmware version: 2.30.
Hardware version:
Node GUID: 0x002590fffff7761c
System image GUID: 0x002590fffff7761f
Port :
State: Active
Physical state: LinkUp
Rate:
Base lid:
LMC:
SM lid:
Capability mask: 0x02514868
Port GUID: 0x002590fffff7761d
Link layer: InfiniBand

在linux中查询硬件相关信息的更多相关文章

  1. [linux]netstat命令详解-显示linux中各种网络相关信息

    1.功能与说明 netstat 用于显示linux中各种网络相关信息.如网络链接 路由表  接口状态链接 多播成员等等. 2.参数含义介绍 -a (all)显示所有选项,默认不显示LISTEN相关-t ...

  2. Linux下使用fstatfs/statfs查询系统相关信息

    Linux下使用fstatfs/statfs查询系统相关信息 1.   功能 #include < sys/statfs.h > int statfs(const char *path, ...

  3. netstat---显示Linux中网络系统的状态信息

    netstat命令用来打印Linux中网络系统的状态信息,可让你得知整个Linux系统的网络情况. 语法 netstat(选项) 选项 -a或--all:显示所有连线中的Socket: -A<网 ...

  4. Linux中exec命令相关

    Linux中exec命令相关 exec和source都属于bash内部命令(builtins commands),在bash下输入man exec或man source可以查看所有的内部命令信息. b ...

  5. 如何三招帮你排查Linux中的硬件问题

    下列贴士帮助你更快速更轻松地为Linux中的硬件排查故障.许多不同的因素可能导致Linux硬件出现问题:在你开始尝试诊断之前,了解最常见的问题以及最有可能找到原因的环节是明智之举. Linux服务器在 ...

  6. Nvidia显卡怎样查看显存大小及硬件相关信息

    在电脑上安装Nvidia显卡驱动,平时也会通过Nvidia控制面板来查看显示显存位宽及宽带.显示显存容量和显示显存芯片信息等等,那么该如何查看Nvidia显存大小以及Nvidia硬件相关信息呢? 1. ...

  7. 在Linux中如何利用backtrace信息解决问题

    在Linux中如何利用backtrace信息解决问题 一.导读 在程序调试过程中如果遇到程序崩溃死机的情况下我们通常多是通过出问题时的栈信息来找到出错的地方,这一点我们在调试一些高级编程语言程序的时候 ...

  8. linux lsmod命令 及相关信息

    lsmod  (list modules) 语法:lsmod 功能: lsmod命令:是一个小程序,用来显示文件.proc/modules的信息,也就是显示当前内核模块装载的模块. 补充说明: 执行l ...

  9. 在Linux上查询物理机信息-不用去拆机器了

    目录 一.查看系统信息(包含机器型号) 1.1 查看机型和品牌 二.查看CPU 信息 2.1 查看CPU 型号 2.2 查看CPU的物理数量 2.3 查看 CPU核心数量(非逻辑CPU) 2.4 查看 ...

随机推荐

  1. <开心一笑> 码农 黑客和2B程序员之间的区别

    笔记本电脑 码农: 黑客: 2B程序员: 求2的32次方: 码农: System.out.println(Math.pow(2, 32)); 黑客: System.out.println(1L< ...

  2. Predicate接口和Consumer接口

    Predicate和Consumer接口是集合操作中常用到的俩个接口: 1.Predicate public interface Predicate<T>{ boolean test(T ...

  3. python实现查看目录下重复的文件

    该python 脚本有以下三个功能: 1. 实现查看目录下重复的文件,输出文件按修改时间升序排列 2. 将按修改时间排列比较旧的.可删除的文件列出来 3. 按目录对重复文件进行统计,比如,目录/tmp ...

  4. ROS学习笔记(八)——ROSTOPIC

    NEW 1 $ roscore NEW 2 $ rosrun turtlesim turtlesim_node NEW 3 $ rosrun turtlesim turtle_teleop_key N ...

  5. Evolutionary Computing: Assignments

    Assignment 1: TSP Travel Salesman Problem Assignment 2: TTP Travel Thief Problem The goal is to find ...

  6. underscore源码解析 (转载)

    转载出自http://www.cnblogs.com/human/p/3273616.html (function() { // 创建一个全局对象, 在浏览器中表示为window对象, 在Node.j ...

  7. 【Duke-Image】Week_5 Segmentation

    Chapter 10 Image Segmentation 图像分割 10.2.7 Edge Linking and Boundary Detection 边缘连接和边界检测 Global proce ...

  8. JAVA GUI布局管理器

    边界布局管理器: a.布局方式:是把整个容器划分为五个部分.东西南北中,南北要贯通,中间最大 (不仅是中间的范围最大,权利也最大)当周边不存在的时候中间会占领周边,当中间不存在的时候周边不能占据中间 ...

  9. CentOS7 yum 安装git

    1.查看系统是否已经安装git git --version 2.CentOS7 yum 安装git yum install -y git 3.安装成功 4.卸载git yum remove git

  10. Winform 文本框多线程赋值

    delegate void SetTextCallback(string text); private void showClientMsg(string text) { // InvokeRequi ...