在linux中查询硬件相关信息
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中查询硬件相关信息的更多相关文章
- [linux]netstat命令详解-显示linux中各种网络相关信息
1.功能与说明 netstat 用于显示linux中各种网络相关信息.如网络链接 路由表 接口状态链接 多播成员等等. 2.参数含义介绍 -a (all)显示所有选项,默认不显示LISTEN相关-t ...
- Linux下使用fstatfs/statfs查询系统相关信息
Linux下使用fstatfs/statfs查询系统相关信息 1. 功能 #include < sys/statfs.h > int statfs(const char *path, ...
- netstat---显示Linux中网络系统的状态信息
netstat命令用来打印Linux中网络系统的状态信息,可让你得知整个Linux系统的网络情况. 语法 netstat(选项) 选项 -a或--all:显示所有连线中的Socket: -A<网 ...
- Linux中exec命令相关
Linux中exec命令相关 exec和source都属于bash内部命令(builtins commands),在bash下输入man exec或man source可以查看所有的内部命令信息. b ...
- 如何三招帮你排查Linux中的硬件问题
下列贴士帮助你更快速更轻松地为Linux中的硬件排查故障.许多不同的因素可能导致Linux硬件出现问题:在你开始尝试诊断之前,了解最常见的问题以及最有可能找到原因的环节是明智之举. Linux服务器在 ...
- Nvidia显卡怎样查看显存大小及硬件相关信息
在电脑上安装Nvidia显卡驱动,平时也会通过Nvidia控制面板来查看显示显存位宽及宽带.显示显存容量和显示显存芯片信息等等,那么该如何查看Nvidia显存大小以及Nvidia硬件相关信息呢? 1. ...
- 在Linux中如何利用backtrace信息解决问题
在Linux中如何利用backtrace信息解决问题 一.导读 在程序调试过程中如果遇到程序崩溃死机的情况下我们通常多是通过出问题时的栈信息来找到出错的地方,这一点我们在调试一些高级编程语言程序的时候 ...
- linux lsmod命令 及相关信息
lsmod (list modules) 语法:lsmod 功能: lsmod命令:是一个小程序,用来显示文件.proc/modules的信息,也就是显示当前内核模块装载的模块. 补充说明: 执行l ...
- 在Linux上查询物理机信息-不用去拆机器了
目录 一.查看系统信息(包含机器型号) 1.1 查看机型和品牌 二.查看CPU 信息 2.1 查看CPU 型号 2.2 查看CPU的物理数量 2.3 查看 CPU核心数量(非逻辑CPU) 2.4 查看 ...
随机推荐
- miniui
//android提供了一个库minui用于简单的UI输出,源码在bootable/recovery/minui中, //gr_init()和gr_font_size()为minui库提供方法,gr_ ...
- FirstUniqueCharacterInString
Given a string, find the first non-repeating character in it and return it's index. If it doesn't ex ...
- python学习--字符串
python的字符串类型为str 定义字符串可以用 ‘abc' , "abc", '''abc''' 查看str的帮助 在python提示符里 help(str) python基于 ...
- Python之路 day3 全局变量、局部变量
#!/usr/bin/env python # -*- coding:utf-8 -*- #Author:ersa """ 全局与局部变量 在子程序中定义的变量称为局部变 ...
- C++中的const和指针组合
在C++里,const修饰指针有以下三种情况 (1)指针常量:即指向常量的指针 const int *p或者int const *p const在*前,,可以这样理解它的功能,因为const在*前, ...
- ShellExecute调用另外一个进程(demo为一个控制led的一段代码)
public enum ShowCommands : int { SW_HIDE = 0, SW_SHOWNORMAL = 1, ...
- tomcat-maven-plugin
tomcat-maven-plugin , 我们可以使用这个插件把web应用一键式的部署到一个远程的tomcat中. 步骤1 : 修改 tomcat/conf/tomcat-users.xml ...
- SQL Server数据库备份:通过Windows批处理命令执行
通过Windows批处理命令执行SQL Server数据库备份 建立mybackup.bat ,输入以下内容直接运行该脚本,即可开始自动备份数据库也可把该脚本加入windows任务计划里执行. --- ...
- C#winform调整控件的位置
现在有三个控件并排放置 第二个控件有隐藏功能 隐藏后第一个控件和第三个控件的距离要缩小,于是就要改变第三个控件的位置 尝试用Location.X属性去设置,但是被告知此非变量 于是只能另外想办法 搜到 ...
- yii2 配置文件加载顺序, 以及调用自定义配置信息。
在配置上一般有以下问题: 每个团队成员都会有自己的配置项,提交这样的配置项将会影响其他团队成员: 生产库密码和API密钥不应该出现在代码库中: 有多个服务器环境的情况:开发.测试.生产:每一种环境应该 ...