(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
(4)查看内存槽及内存条
[root@Master ~]# dmidecode -t memory | head -45 | tail -23
(5)查看网卡信息
[root@Master ~]# dmesg | grep -i Ethernet
(6)查看pci信息,即主板所有硬件槽信息
[root@Master ~]# lspci | head -10
(7) 查看CPU信息
a、查看cpu型号
[root@Master ~]# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
b、查看系统中实际物理CPU的数量(物理)
[root@Master ~]# grep 'physical id' /proc/cpuinfo | sort | uniq | wc -l
c、系统中实际物理CPU的数量(核数)
[root@Master ~]#cat /proc/cpuinfo |grep 'processor'|wc -l
d、查看每个物理CPU中core的个数(即核数)
[root@Master ~]#cat /proc/cpuinfo |grep "cores"|uniq
e、查看CPU的主频
[root@Master ~]# cat /proc/cpuinfo |grep MHz|uniq
f、查看CPU的详细信息
[root@Master ~]#cat /proc/cpuinfo | head -20
g、查看CPU的相关信息
[root@Master ~]# lscpu
h、查看cpu运行模式
[root@Master ~]# getconf LONG_BIT
i、查看cpu是否支持64bit
[root@Master ~]#cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l
(结果大于0, 说明支持64bit计算. lm指long mode, 支持lm则是64bit)
(8)查看内存信息
a、查看内存硬件信息
[root@Master ~]#dmidecode -t memory | head -45 | tail -24
b、最大支持多少内存
[root@Master ~]# dmidecode|grep -P 'Maximum\s+Capacity'
c、Linux 查看内存的插槽数,已经使用多少插槽.每条内存多大:
[root@jjh-test04 ~]# dmidecode | grep -A5 "Memory Device" | grep Size | grep -v Range
d、Linux 查看内存的频率:
[root@Master ~]# dmidecode|grep -A16 "Memory Device"|grep 'Speed'
e、Linux 查看内存的详细信息:
[root@Master ~]#cat /proc/meminfo |head -20
f、Linux 查看内存的使用情况
[root@Master ~]# free -m
(9)查看硬盘信息
a、查看挂接的分区状态
[root@Master ~]# fdisk -l |grep Disk
b、查看硬盘和分区分布
[root@Master ~]# lsblk
c、查看硬盘和分区的详细信息
[root@Master ~]# fdisk -l
d、硬盘检测命令smartctl
[root@Master ~]# smartctl -a /dev/sda
e、查看挂接的分区状态
[root@Master ~]# mount | column -t
f、查看挂接的分区状态
[root@Master ~]# swapon -s
g、查看硬盘使用情况
[root@Master ~]# df -hT
(10)查看网卡信息
a、查看网卡硬件信息
[root@Master ~]# lspci | grep -i 'eth'
b、查看系统的所有网络接口
[root@Master ~]# ifconfig -a
[root@Master ~]# ip link show
c、查看某个网络接口的详细信息,例如eth0的详细参数和指标
[root@Master ~]# ethtool eth0
d、查看所有网卡的链路状态
[root@Master ~]# for i in `seq 0 9`;do ethtool eth${i} | egrep 'eth|Link';done
(11)列出所有PCI设备信息
[root@Master ~]# lspci -tv | more
Linux查看服务器硬件设备信息
最新推荐文章于 2024-05-16 08:51:33 发布