Linux查看服务器硬件设备信息

(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

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值