linux 查看主板sn_Linux系统查看硬件信息
一、查看服務(wù)器型號(hào)、序列號(hào):
[root@Master ~]#dmidecode|grep "System Information" -A9|egrep "Manufacturer|Product|Serial"
查看主板型號(hào)
[root@Master ~]# dmidecode |grep -A16 "System Information$"
查看BIOS信息
[root@Master ~]# dmidecode -t bios
查看內(nèi)存槽及內(nèi)存條
[root@Master ~]# dmidecode -t memory | head -45 | tail -23
查看網(wǎng)卡信息
dmesg | grep -i Ethernet
查看pci信息,即主板所有硬件槽信息
[root@Master ~]# lspci | head -10
二、查看CPU信息
(1)查看cpu型號(hào)
[root@Master ~]# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
40 Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz
(2)查看系統(tǒng)中實(shí)際物理CPU的數(shù)量(物理)
[root@Master ~]# grep 'physical id' /proc/cpuinfo | sort | uniq | wc -l
2
(3)系統(tǒng)中實(shí)際物理CPU的數(shù)量(核數(shù))線程
[root@Master ~]# cat /proc/cpuinfo |grep 'processor'|wc -l
40
(4)查看每個(gè)物理CPU中core的個(gè)數(shù)(即核數(shù))
[root@Master ~]# cat /proc/cpuinfo |grep "cores"|uniq
cpu cores : 10
(5)查看CPU的主頻
[root@Master ~]# cat /proc/cpuinfo |grep MHz|uniq
cpu MHz : 1200.000
cpu MHz : 2300.000
cpu MHz : 1200.000
(6)查看CPU的詳細(xì)信息
[root@Master ~]# cat /proc/cpuinfo | head -20
(7)查看CPU的相關(guān)信息
[root@Master ~]# lscpu
(8)查看cpu運(yùn)行模式
[root@Master ~]# getconf LONG_BIT
64
(9)查看cpu是否支持64bit
[root@Master ~]# cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l
40
(結(jié)果大于0, 說(shuō)明支持64bit計(jì)算. lm指long mode, 支持lm則是64bit)
三、查看內(nèi)存信息
(1)查看內(nèi)存硬件信息
[root@Master ~]# dmidecode -t memory | head -45 | tail -24
(2)最大支持多少內(nèi)存
[root@Master ~]# dmidecode|grep -P 'Maximum\s+Capacity'
(3)Linux 查看內(nèi)存的插槽數(shù),已經(jīng)使用多少插槽.每條內(nèi)存多大:
dmidecode |grep -A5 "Memory Device" |grep Size|grep -v Range
(4)Linux 查看內(nèi)存的頻率:
[root@Master ~]# dmidecode|grep -A16 "Memory Device"|grep 'Speed'
(5)Linux 查看內(nèi)存的詳細(xì)信息:
[root@Master ~]# cat /proc/meminfo |head -20
6)Linux 查看內(nèi)存的使用情況
[root@Master ~]# free -m //?-b,-k,-m,-g show output in bytes, KB, MB, or GB
四、查看硬盤信息
(1)查看掛接的分區(qū)狀態(tài)
[root@Master ~]# fdisk -l |grep Disk
(2)查看硬盤和分區(qū)分布
[root@Master ~]# lsblk
(3)查看硬盤和分區(qū)的詳細(xì)信息
[root@Master ~]# fdisk -l
(4)查看掛接的分區(qū)狀態(tài)
[root@Master ~]# mount | column -t
(5)查看掛接的分區(qū)狀態(tài)
[root@Master ~]# swapon -s
(6)查看硬盤使用情況
[root@Master ~]# df -hT
(7) 硬盤檢測(cè)命令smartctl
[root@Master ~]# smartctl -a /dev/sda
五、查看網(wǎng)卡信息
(1)查看網(wǎng)卡硬件信息
[root@Master ~]# lspci | grep -i 'eth'
(2)查看系統(tǒng)的所有網(wǎng)絡(luò)接口
[root@Master ~]# ifconfig -a
[root@Master ~]# ip link show
(3)查看某個(gè)網(wǎng)絡(luò)接口的詳細(xì)信息,例如eth0的詳細(xì)參數(shù)和指標(biāo)
[root@Master ~]# ethtool eth0
(4)查看所有網(wǎng)卡的鏈路狀態(tài)
[root@Master ~]# for i in seq 0 9;do ethtool eth${i} | egrep 'eth|Link';done
六、列出所有PCI設(shè)備信息
[root@Master ~]# lspci -tv | more
總結(jié)
以上是生活随笔為你收集整理的linux 查看主板sn_Linux系统查看硬件信息的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: lkj
- 下一篇: linux下Nginx部署前后端项目