各种硬件查看命令
- 查看cpu
lscpu|grep "Model name:"
Model name: AMD EPYC 7302P 16-Core Processor
- 查看内存大小和频率
频率
sudo dmidecode -t memory |grep -A16 "Memory Device$" |grep "Speed:"
Speed: 3200 MT/s
Speed: 3200 MT/s
Speed: 3200 MT/s
Speed: 3200 MT/s
Speed: 3200 MT/s
Speed: 3200 MT/s
Speed: Unknown
Speed: Unknown
内存大小
sudo dmidecode -t memory |grep -A16 "Memory Device$" |grep "Size:"
Size: 64 GB
Size: 64 GB
Size: 64 GB
Size: 64 GB
Size: 64 GB
Size: 64 GB
Size: No Module Installed
Size: No Module Installed
- 查看硬盘
查看硬盘容量
lsblk
NAMEMAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:01 447.1G 0 disk
├─sda18:11 512M 0 part /boot/efi
└─sda28:21 446.6G 0 part /
nvme0n1 259:00 7T 0 disk /opt/hdd_pool
lsblk -d -o name,rota
NAME ROTA
sda 0
nvme0n1 0
1为机械硬盘,0是固态硬盘
查看硬盘型号
sudo hdparm -i /dev/sda |grep "Model"
- 查看显卡
lspci | grep -i vga
如果是NVIDIA的独显的话,可以执行下面命令查看型号:
nvidia-smi -q|grep "Product Name"
Product Name : GeForce RTX 3080
Product Name : GeForce RTX 3080
- 查看机器型号
sudo dmidecode | grep -A 9 "System Information"
System Information
Manufacturer: Dell Inc.
Product Name: PowerEdge R7515
Version: Not Specified
Serial Number: 8X8RC43
UUID: 4C4C4544-0058-3810-8052-B8C04F433433
Wake-up Type: Power Switch
SKU Number: SKU=NotProvided;ModelName=PowerEdge R7515
Family: PowerEdge