Linux系统——硬件命令

目录

一.网卡带宽

[1.查看网卡速率------ethtool 网卡名](#1.查看网卡速率——ethtool 网卡名)

[2.查看mac地址------ethtool -P 网卡名](#2.查看mac地址——ethtool -P 网卡名)

二、内存相关

[1.显示系统中内存使用情况------free -h](#1.显示系统中内存使用情况——free -h)

[2.显示内存模块的详细信息------dmidecode -t memory](#2.显示内存模块的详细信息——dmidecode -t memory)

三、CPU相关

1.查看CPU架构信息------lscpu

2.性能模式

四、其他硬件命令

1.查看块设备信息------lsblk

[2.查看机器型号------dmidecode | grep "Product Name"](#2.查看机器型号——dmidecode | grep "Product Name")

[3.查看系统序列号------dmidecode -t system](#3.查看系统序列号——dmidecode -t system)


一.网卡带宽

1.查看网卡速率------ethtool 网卡名

bash 复制代码
[root@localhost ~]#ethtool ens33
Settings for ens33:
	Supported ports: [ TP ]
	Supported link modes:   10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Full 
	Supported pause frame use: No
	Supports auto-negotiation: Yes
	Advertised link modes:  10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Full 
	Advertised pause frame use: No
	Advertised auto-negotiation: Yes
	Speed: 1000Mb/s
	Duplex: Full
	Port: Twisted Pair
	PHYAD: 0
	Transceiver: internal
	Auto-negotiation: on
	MDI-X: off (auto)
	Supports Wake-on: d
	Wake-on: d
	Current message level: 0x00000007 (7)
			       drv probe link
	Link detected: yes

2.查看mac地址------ethtool -P 网卡名

bash 复制代码
[root@localhost ~]#ethtool -P ens33
Permanent address: 

二、内存相关

1.显示系统中内存使用情况------free -h

bash 复制代码
[root@localhost ~]#free -h
              total        used        free      shared  buff/cache   available
Mem:           1.8G        472M        700M        9.1M        650M        1.1G
Swap:          4.0G          0B        4.0G

2.显示内存模块的详细信息------dmidecode -t memory

三、CPU相关

1.查看CPU架构信息------lscpu

bash 复制代码
[root@localhost ~]#lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                2
On-line CPU(s) list:   0,1
Thread(s) per core:    1
Core(s) per socket:    1
座:                 2
NUMA 节点:         1
厂商 ID:           GenuineIntel
CPU 系列:          6
型号:              142
型号名称:        Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
步进:              10
CPU MHz:             1991.571
BogoMIPS:            3984.00
超管理器厂商:  VMware
虚拟化类型:     完全
L1d 缓存:          32K
L1i 缓存:          32K
L2 缓存:           256K
L3 缓存:           8192K
NUMA 节点0 CPU:    0,1
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 arat
bash 复制代码
[root@localhost ~]#cat /proc/cpuinfo
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 142
model name	: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
stepping	: 10
microcode	: 0xb4
cpu MHz		: 1991.571
cache size	: 8192 KB
physical id	: 0
siblings	: 1
core id		: 0
cpu cores	: 1
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 22
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 arat
bogomips	: 3984.00
clflush size	: 64
cache_alignment	: 64
address sizes	: 45 bits physical, 48 bits virtual
power management:

processor	: 1
vendor_id	: GenuineIntel
cpu family	: 6
model		: 142
model name	: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
stepping	: 10
microcode	: 0xb4
cpu MHz		: 1991.571
cache size	: 8192 KB
physical id	: 2
siblings	: 1
core id		: 0
cpu cores	: 1
apicid		: 2
initial apicid	: 2
fpu		: yes
fpu_exception	: yes
cpuid level	: 22
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 arat
bogomips	: 3984.00
clflush size	: 64
cache_alignment	: 64
address sizes	: 45 bits physical, 48 bits virtual
power management:

2.性能模式

开启性能模式------cpupower frequency-set -g performance

查看是否开启性能模式------cpupower frequency-info

四、其他硬件命令

1.查看块设备信息------lsblk

bash 复制代码
[root@localhost ~]#lsblk
NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda               8:0    0   60G  0 disk 
├─sda1            8:1    0    5G  0 part /boot
└─sda2            8:2    0   54G  0 part 
  ├─centos-root 253:0    0   50G  0 lvm  /
  └─centos-swap 253:1    0    4G  0 lvm  [SWAP]
sr0              11:0    1  4.2G  0 rom  

2.查看机器型号------dmidecode | grep "Product Name"

bash 复制代码
[root@localhost ~]#dmidecode | grep "Product Name"
	Product Name: VMware Virtual Platform
	Product Name: 440BX Desktop Reference Platform

3.查看系统序列号------dmidecode -t system

bash 复制代码
[root@localhost ~]#dmidecode -t system
# dmidecode 3.0
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.

Handle 0x0001, DMI type 1, 27 bytes
System Information
	Manufacturer: VMware, Inc.
	Product Name: VMware Virtual Platform
	Version: None
	Serial Number: VMware-56 4d 41 3c 70 d0 23 f2-99 ef fc 31 0c 51 4b b5
	UUID: 3C414D56-D070-F223-99EF-FC310C514BB5
	Wake-up Type: Power Switch
	SKU Number: Not Specified
	Family: Not Specified

Handle 0x01A1, DMI type 15, 29 bytes
System Event Log
	Area Length: 16 bytes
	Header Start Offset: 0x0000
	Header Length: 16 bytes
	Data Start Offset: 0x0010
	Access Method: General-purpose non-volatile data functions
	Access Address: 0x0000
	Status: Invalid, Full
	Change Token: 0x00000036
	Header Format: Type 1
	Supported Log Type Descriptors: 3
	Descriptor 1: POST error
	Data Format 1: POST results bitmap
	Descriptor 2: Single-bit ECC memory error
	Data Format 2: Multiple-event
	Descriptor 3: Multi-bit ECC memory error
	Data Format 3: Multiple-event

Handle 0x0265, DMI type 23, 13 bytes
System Reset
	Status: Enabled
	Watchdog Timer: Present
	Boot Option: Do Not Reboot
	Boot Option On Limit: Do Not Reboot
	Reset Count: Unknown
	Reset Limit: Unknown
	Timer Interval: Unknown
	Timeout: Unknown

Handle 0x0268, DMI type 32, 20 bytes
System Boot Information
	Status: No errors detected
相关推荐
云卓SKYDROID16 分钟前
无人机激光测距技术应用与挑战
网络·无人机·吊舱·高科技·云卓科技
Lovyk1 小时前
Linux 正则表达式
linux·运维
Fireworkitte2 小时前
Ubuntu、CentOS、AlmaLinux 9.5的 rc.local实现 开机启动
linux·ubuntu·centos
sword devil9002 小时前
ubuntu常见问题汇总
linux·ubuntu
ac.char3 小时前
在CentOS系统中查询已删除但仍占用磁盘空间的文件
linux·运维·centos
中科米堆4 小时前
中科米堆CASAIM自动化三维测量设备测量汽车壳体直径尺寸
运维·自动化·汽车·视觉检测
淮北也生橘124 小时前
Linux的ALSA音频框架学习笔记
linux·笔记·学习
缘华工业智维5 小时前
CNN 在故障诊断中的应用:原理、案例与优势
大数据·运维·cnn
iナナ6 小时前
传输层协议——UDP和TCP
网络·网络协议·tcp/ip·udp
开航母的李大6 小时前
软件系统运维常见问题
运维·服务器·系统架构·运维开发