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
相关推荐
2201_7611990438 分钟前
nginx 负载均衡1
linux·运维·服务器·nginx·负载均衡
suri ..43 分钟前
【Linux】进程第三弹(虚拟地址空间)
linux·运维·服务器
害羞的白菜44 分钟前
Nginx基础详解5(nginx集群、四七层的负载均衡、Jmeter工具的使用、实验验证集群的性能与单节点的性能)
linux·运维·笔记·jmeter·nginx·centos·负载均衡
纪伊路上盛名在44 分钟前
如何初步部署自己的服务器,达到生信分析的及格线
linux·运维·服务器·python·学习·r语言·github
爱滑雪的码农1 小时前
快速熟悉Nginx
运维·nginx·dubbo
Betty’s Sweet1 小时前
[Linux]:线程(三)
linux·线程·信号量·生产者消费者模型
0DayHP1 小时前
HTB:Bike[WriteUP]
运维·服务器
程序员南飞3 小时前
ps aux | grep smart_webrtc这条指令代表什么意思
java·linux·ubuntu·webrtc
StrokeAce3 小时前
linux桌面软件(wps)内嵌到主窗口后的关闭问题
linux·c++·qt·wps·窗口内嵌
热爱嵌入式的小许7 小时前
Linux基础项目开发1:量产工具——显示系统
linux·运维·服务器·韦东山量产工具