Linux查看硬件信息命令
一、查看服务器硬件信息
(1)查看服务器型号、序列号
[root@Master ~]# dmidecode|grep "System Information" -A9|egrep "Manufacturer|Product|Serial"
(2)查看主板型号
[root@Master ~]# dmidecode |grep -A16 "System Information$"
(3)查看BIOS信息
- [root@Master ~]# dmidecode -t bios
- # dmidecode 2.12
- SMBIOS 2.8 present.
- Handle 0x0008, DMI type , bytes
- BIOS Information
- Vendor: HP
- Version: U19
- Release Date: //
- Address: 0xF0000
- Runtime Size: kB
- ROM Size: kB
- Characteristics:
- PCI is supported
- PNP is supported
- BIOS is upgradeable
- BIOS shadowing is allowed
- ESCD support is available
- Boot from CD is supported
- Selectable boot is supported
- EDD is supported
- 5.25"/360 kB floppy services are supported (int 13h)
- 5.25"/1.2 MB floppy services are supported (int 13h)
- 3.5"/720 kB floppy services are supported (int 13h)
- Print screen service is supported (int 5h)
- keyboard services are supported (int 9h)
- Serial services are supported (int 14h)
- Printer services are supported (int 17h)
- CGA/mono video services are supported (int 10h)
- ACPI is supported
- USB legacy is supported
- BIOS boot specification is supported
- Function key-initiated network boot is supported
- Targeted content distribution is supported
- UEFI is supported
- BIOS Revision: 2.0
- Firmware Revision: 2.40
(3)查看内存槽及内存条
- [root@Master ~]# dmidecode -t memory | head - | tail -
- Memory Device
- Array Handle: 0x000A
- Error Information Handle: Not Provided
- Total Width: bits
- Data Width: bits
- Size: MB
- Form Factor: DIMM
- Set: None
- Locator: PROC DIMM
- Bank Locator: Not Specified
- Type: DDR4
- Type Detail: Synchronous Registered (Buffered)
- Speed: MHz
- Manufacturer: HP
- Serial Number: Not Specified
- Asset Tag: Not Specified
- Part Number: -
- Rank:
- Configured Clock Speed: MHz
- Minimum Voltage: 1.2 V
- Maximum Voltage: 1.2 V
- Configured Voltage: 1.2 V
- [root@Master ~]#
(4)查看网卡信息
- [root@Master ~]# dmesg | grep -i Ethernet
- igb: Intel(R) Gigabit Ethernet Network Driver - version 5.3.-k
- igb ::00.0: Intel(R) Gigabit Ethernet Network Connection
- igb ::00.1: Intel(R) Gigabit Ethernet Network Connection
- igb ::00.2: Intel(R) Gigabit Ethernet Network Connection
- igb ::00.3: Intel(R) Gigabit Ethernet Network Connection
- igb ::00.0: Intel(R) Gigabit Ethernet Network Connection
- igb ::00.1: Intel(R) Gigabit Ethernet Network Connection
(5) 查看pci信息,即主板所有硬件槽信息
- [root@Master ~]# lspci | head -
- :00.0 Host bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DMI2 (rev )
- :01.0 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port (rev )
- :01.1 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port (rev )
- :02.0 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port (rev )
- :02.1 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port (rev )
- :02.2 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port (rev )
- :02.3 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port (rev )
- :03.0 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port (rev )
- :03.1 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port (rev )
- :03.2 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port (rev )
二、查看CPU信息
(1)查看cpu型号
- [root@Master ~]# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
- Intel(R) Xeon(R) CPU E5- v3 @ .30GHz
(2)查看系统中实际物理CPU的数量(物理)
- [root@Master ~]# grep 'physical id' /proc/cpuinfo | sort | uniq | wc -l
(3)系统中实际物理CPU的数量(核数)
- [root@Master ~]# cat /proc/cpuinfo |grep 'processor'|wc -l
(4)查看每个物理CPU中core的个数(即核数)
- [root@Master ~]# cat /proc/cpuinfo |grep "cores"|uniq
- cpu cores :
(5)查看CPU的主频
- [root@Master ~]# cat /proc/cpuinfo |grep MHz|uniq
- cpu MHz : 1200.000
- cpu MHz : 2300.000
- cpu MHz : 1200.000
(6)查看CPU的详细信息
- [root@Master ~]# cat /proc/cpuinfo | head -
- processor : 0 //逻辑处理器的ID
- vendor_id : GenuineIntel
- cpu family :
- model :
- model name : Intel(R) Xeon(R) CPU E5- v3 @ .30GHz //CPU型号
- stepping :
- microcode :
- cpu MHz : 1200.000
- cache size : KB
- physical id :
- siblings : 20 //相同物理封装处理器中逻辑处理器数
- core id :
- cpu cores : 10 //相同物理封装处理器中的内核数
- 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 fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm cqm_llc cqm_occup_llc
(7)查看CPU的相关信息
- [root@Master ~]# 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:
- Model name: Intel(R) Xeon(R) CPU E5- v3 @ .30GHz
- Stepping:
- CPU MHz: 1200.000
- BogoMIPS: 4594.43
- Virtualization: VT-x
- L1d cache: 32K
- L1i cache: 32K
- L2 cache: 256K
- L3 cache: 25600K
- NUMA node0 CPU(s): -,-
- NUMA node1 CPU(s): -,-
- [root@Master ~]#
(8)查看cpu运行模式
- [root@Master ~]# getconf LONG_BIT
(9)查看cpu是否支持64bit
- [root@Master ~]# cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l
- (结果大于0, 说明支持64bit计算. lm指long mode, 支持lm则是64bit)
三、查看内存信息
(1)查看内存硬件信息
- root@Master ~]# dmidecode -t memory | head - | tail -
- Handle 0x000C, DMI type , bytes
- Memory Device
- Array Handle: 0x000A
- Error Information Handle: Not Provided
- Total Width: bits
- Data Width: bits
- Size: MB
- Form Factor: DIMM
- Set: None
- Locator: PROC DIMM
- Bank Locator: Not Specified
- Type: DDR4
- Type Detail: Synchronous Registered (Buffered)
- Speed: MHz
- Manufacturer: HP
- Serial Number: Not Specified
- Asset Tag: Not Specified
- Part Number: -
- Rank:
- Configured Clock Speed: MHz
- Minimum Voltage: 1.2 V
- Maximum Voltage: 1.2 V
- Configured Voltage: 1.2 V
(2)最大支持多少内存
[root@Master ~]# dmidecode|grep -P 'Maximum\s+Capacity'
(3)Linux 查看内存的插槽数,已经使用多少插槽.每条内存多大:
(4)Linux 查看内存的频率:
[root@Master ~]# dmidecode|grep -A16 "Memory Device"|grep 'Speed'
(5)Linux 查看内存的详细信息:
- [root@Master ~]# cat /proc/meminfo |head -
- 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
(6)Linux 查看内存的使用情况
- [root@Master ~]# free -m // -b,-k,-m,-g show output in bytes, KB, MB, or GB
- total used free shared buffers cached
- Mem:
- -/+ buffers/cache:
- Swap:
四、查看硬盘信息
(1)查看挂接的分区状态
[root@Master ~]# fdisk -l |grep Disk
(2)查看硬盘和分区分布
- [root@Master ~]# lsblk
- NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
- sda : .4G disk
- ├─sda1 : 50M part /boot
- ├─sda2 : 100G part /
- ├─sda3 : 50G part /home
- ├─sda4 : 1K part
- ├─sda5 : 16G part [SWAP]
- ├─sda6 : .3G part /tmp
- └─sda7 : 100G part /usr
- sdb : .7T disk
- └─sdb1 : .7T part /PureDisk
(3)查看硬盘和分区的详细信息
- [root@Master ~]# fdisk -l
- Disk /dev/sda: 300.0 GB, bytes
- heads, sectors/track, cylinders
- Units = cylinders of * = bytes
- Sector size (logical/physical): bytes / bytes
- I/O size (minimum/optimal): bytes / bytes
- Disk identifier: 0x000384d9
- Device Boot Start End Blocks Id System
- /dev/sda1 * Linux
- Partition does not end on cylinder boundary.
- /dev/sda2 Linux
- /dev/sda3 Linux
- /dev/sda4 Extended
- /dev/sda5 Linux swap / Solaris
- /dev/sda6 Linux
- /dev/sda7 Linux
- WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
- Disk /dev/sdb: 92017.3 GB, bytes
- heads, sectors/track, cylinders
- Units = cylinders of * = bytes
- Sector size (logical/physical): bytes / bytes
- I/O size (minimum/optimal): bytes / bytes
- Disk identifier: 0x00000000
- Device Boot Start End Blocks Id System
- /dev/sdb1 + ee GPT
- Partition does not start on physical sector boundary.
(4)查看挂接的分区状态
- [root@Master ~]# mount | column -t
- /dev/sda2 on / type ext4 (rw)
- proc on /proc type proc (rw)
- sysfs on /sys type sysfs (rw)
- devpts on /dev/pts type devpts (rw,gid=,mode=)
- tmpfs on /dev/shm type tmpfs (rw)
- /dev/sda1 on /boot type ext4 (rw)
- /dev/sda3 on /home type ext4 (rw)
- /dev/sda6 on /tmp type ext4 (rw)
- /dev/sda7 on /usr type ext4 (rw)
- /dev/sdb1 on /PureDisk type ext4 (rw)
- none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw
(5)查看挂接的分区状态
- [root@Master ~]# swapon -s
- Filename Type Size Used Priority
- /dev/sda5 partition -
(6)查看硬盘使用情况
- [root@Master ~]# df -hT
- Filesystem Type Size Used Avail Use% Mounted on
- /dev/sda2 ext4 99G 561M 93G % /
- tmpfs tmpfs 63G 76K 63G % /dev/shm
- /dev/sda1 ext4 45M 38M 4.9M % /boot
- /dev/sda3 ext4 50G 52M 47G % /home
- /dev/sda6 ext4 13G 34M 13G % /tmp
- /dev/sda7 ext4 99G 21G 73G % /usr
- /dev/sdb1 ext4 84T 41T 40T % /PureDisk
(7) 硬盘检测命令smartctl
- [root@Master ~]# smartctl -a /dev/sda
- smartctl 5.43 -- r3573 [x86_64-linux-2.6.-.el6.x86_64] (local build)
- Copyright (C) - by Bruce Allen, http://smartmontools.sourceforge.net
- Vendor: HP
- Product: LOGICAL VOLUME
- Revision: 3.56
- User Capacity: ,,, bytes [ GB]
- Logical block size: bytes
- Logical Unit id: 0x600508b1001cc8a1b9ec4dacc5ab35dc
- Serial number: PDNNK0BRH9U0AG
- Device type: disk
- Local Time is: Mon Feb :: CST
- Device supports SMART and is Enabled
- Temperature Warning Disabled or Not Supported
- SMART Health Status: OK
- Error Counter logging not supported
- Device does not support Self Test logging
五、查看网卡信息
(1)查看网卡硬件信息
[root@Master ~]# lspci | grep -i 'eth'
(2)查看系统的所有网络接口
- [root@Master ~]# ifconfig -a
- [root@Master ~]# ip link show
(3)查看某个网络接口的详细信息,例如eth0的详细参数和指标
- [root@Master ~]# ethtool eth0
- Settings for eth0:
- Supported ports: [ FIBRE ]
- Supported link modes: 10000baseT/Full
- Supported pause frame use: No
- Supports auto-negotiation: No
- Advertised link modes: 10000baseT/Full
- Advertised pause frame use: No
- Advertised auto-negotiation: No
- Speed: 10000Mb/s
- Duplex: Full
- Port: FIBRE
- PHYAD:
- Transceiver: external
- Auto-negotiation: off
- Supports Wake-on: d
- Wake-on: d
- Current message level: 0x00000007 ()
- drv probe link
- Link detected: yes
(4)查看所有网卡的链路状态
- [root@Master ~]# for i in `seq `;do ethtool eth${i} | egrep 'eth|Link';done
- Settings for eth0:
- Link detected: yes
- Settings for eth1:
- Link detected: yes
- Settings for eth2:
- Link detected: no
- Settings for eth3:
- Link detected: no
- Settings for eth4:
- Link detected: no
- Settings for eth5:
- Link detected: no
- Settings for eth6:
- Link detected: no
- Settings for eth7:
- Link detected: no
- Settings for eth8:
- Link detected: no
- Settings for eth9:
- Link detected: no
六、列出所有PCI设备信息
- [root@Master ~]# lspci -tv | more
- -+-[:ff]-+-08.0 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 QPI Link
- | +-08.3 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 QPI Link
- | +-09.0 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 QPI Link
- | +-09.3 Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 QPI Link
- | +-0b. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 R3 QPI Link & Monitoring
- | +-0b. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 R3 QPI Link & Monitoring
- | +-0b. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 R3 QPI Link & Monitoring
- | +-0c. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
- | +-0c. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
- | +-0c. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
- | +-0c. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
- | +-0c. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
- | +-0c. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
- | +-0c. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
- | +-0c. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
- | +-0d. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
- | +-0d. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers
- | +-0f. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Buffered Ring Agent
- | +-0f. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Buffered Ring Agent
- | +-0f. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Buffered Ring Agent
- | +-0f. Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Buffered Ring Agent
Linux查看硬件信息命令的更多相关文章
- LINUX查看硬件配置命令
LINUX查看硬件配置命令 系统 # uname -a # 查看内核/操作系统/CPU信息 # head -n 1 /etc/issue # 查看操作系统版本 # cat /proc/cpuinf ...
- Linux查看硬件信息(北桥芯片组、南桥、PCI接口、CPU等)
Linux查看硬件信息(北桥芯片组.南桥.PCI接口.CPU等) Linux查看硬件信息(北桥芯片组.南桥.PCI接口.CPU等) 查看MCH(北桥) 查看ICH(南桥) 查看CPU 查看pci接口设 ...
- linux查看硬件信息及驱动设备相关整理
查看声卡设备:cat /proc/asound/cards 查看USB设备:cat /proc/bus/usb/devices 常用命令整理如下:用硬件检测程序kuduz探测新硬件:service k ...
- LINUX 查看硬件配置命令
系统 # uname -a # 查看内核/操作系统/CPU信息 # head -n 1 /etc/issue # 查看操作系统版本 # cat /proc/cpuinfo # 查看CPU信息 # ...
- linux查看硬件常用命令
最近整理了平时工作中经常使用的命令,主要分为两大块,一块是查看硬件信息的命令,另一块是监控硬件运转情况的命令.这一篇只涉及查看硬件信息的命令,有关监控硬件运转的命令,我会在下一篇博客中给大 ...
- Linux系统下查看硬件信息命令大全
导读 有许多命令可以用来查看 Linux 系统上的硬件信息.有些命令只能够打印出像 CPU 和内存这一特定的硬件组件信息,另外一些命令可以查看多种硬件组件的信息. 这个教程可以带大家快速了解一下查看各 ...
- linux查看硬件信息的命令(图文)
发布:脚本学堂/Linux命令 编辑:JB02 2013-12-23 21:48:18 [大 中 小] 转自:http://www.jbxue.com/LINUXjishu/14996.htm ...
- Linux 系统下查看硬件信息命令大全
有许多命令可以用来查看 Linux 系统上的硬件信息.有些命令只能够打印出像 CPU 和内存这一特定的硬件组件信息,另外一些命令可以查看多种硬件组件的信息. 这个教程可以带大家快速了解一下查看各种硬件 ...
- Linux查看硬件信息以及驱动设备的命令
用硬件检测程序kuduz探测新硬件:service kudzu start ( or restart) 查看CPU信息:cat /proc/cpuinfo 查看板卡信息:cat /proc/pci 查 ...
随机推荐
- 关于springcloud的一些问题总结.txt
@Bean public CorsFilter corsFilter() { final UrlBasedCorsConfigurationSource source = new UrlBasedCo ...
- Oracle执行SQL查询语句的步骤
Oracle执行SQL查询语句的步骤 如果用户在SQL*Plus下输入了如下查询语句:SELECT * FROM dept: 查询语句的处理主要包括三个过程:编译(parse).执行(execute) ...
- 02-matplotlib-散点图
import numpy as np import matplotlib.pyplot as plt ''' 散点图显示两组数据的值,每个点的坐标位置的值决定 用户观察两种变量的相关性: 正相关 负相 ...
- host命令详解
基础命令学习目录首页 原文链接:https://blog.csdn.net/xin_y/article/details/53924763 分析域名查询工具,测试域名系统工作是否正常 语法: host ...
- Java多线程编程之不可变对象模式
在多线程环境中,为了保证共享数据的一致性,往往需要对共享数据的使用进行加锁,但是加锁操作本身就会带来一定的开销,这里可以使用将共享数据使用不可变对象进行封装,从而避免加锁操作. 1. 模 ...
- 作业 20181127-3 互评Beta版本
此作业要求参见:https://edu.cnblogs.com/campus/nenu/2018fall/homework/2448 组名:可以低头,但没必要 组长:付佳 组员:张俊余 李文涛 孙赛佳 ...
- 20172313『Java程序设计』课程结对编程练习_四则运算第二周阶段总结
20172313『Java程序设计』课程结对编程练习_四则运算第二周阶段总结 结对伙伴 20172326康皓越 博客地址(http://www.cnblogs.com/326477465-a/p/90 ...
- 【每日scrum】第一次冲刺day3
学习安卓,和小伙伴讨论百度API调用的问题,最后决定自己写地图
- 关于注册github
- html border画三角形
最近遇到了问题就是画推进条类似于