linux 下查看硬件信息(mac,IP地址,硬盘型号,序列号等)

一、查看网卡mac地址

#安装lshw

[[email protected] ~]# yum install lshw

#使用方法

[[email protected] ~]# lshw -c network
  *-network:0
       description: Ethernet interface
       product: NetXtreme II BCM5709 Gigabit Ethernet
       vendor: Broadcom Limited
       physical id: 0
       bus info: [email protected]:02:00.0
       logical name: enp2s0f0
       version: 20
       serial: 00:26:55:31:a9:dc
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm vpd msi msix pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=bnx2 driverversion=2.2.6 duplex=full firmware=bc 4.6.4 NCSI 1.0.3 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
       resources: irq:16 memory:f4000000-f5ffffff
  *-network:1
       description: Ethernet interface
       product: NetXtreme II BCM5709 Gigabit Ethernet
       vendor: Broadcom Limited
       physical id: 0.1
       bus info: [email protected]:02:00.1
       logical name: enp2s0f1
       version: 20
       serial: 00:26:55:31:a9:de
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm vpd msi msix pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=bnx2 driverversion=2.2.6 duplex=full firmware=bc 4.6.4 NCSI 1.0.3 ip=10.0.100.85 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
       resources: irq:17 memory:f2000000-f3ffffff
  *-network:0
       description: Ethernet interface
       product: NetXtreme II BCM5709 Gigabit Ethernet
       vendor: Broadcom Limited
       physical id: 0
       bus info: [email protected]:03:00.0
       logical name: enp3s0f0
       version: 20
       serial: 00:26:55:31:a9:e0
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm vpd msi msix pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=bnx2 driverversion=2.2.6 duplex=full firmware=bc 4.6.4 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
       resources: irq:18 memory:f8000000-f9ffffff
  *-network:1
       description: Ethernet interface
       product: NetXtreme II BCM5709 Gigabit Ethernet
       vendor: Broadcom Limited
       physical id: 0.1
       bus info: [email protected]:03:00.1
       logical name: enp3s0f1
       version: 20
       serial: 00:26:55:31:a9:e2
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm vpd msi msix pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=bnx2 driverversion=2.2.6 firmware=bc 4.6.4 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:19 memory:f6000000-f7ffffff

二、查看硬盘

#安装 smartmontools

yum install smartmontools -y

#使用方法

[[email protected] ~]# smartctl -a /dev/sda
smartctl 6.2 2017-02-27 r4394 [x86_64-linux-3.10.0-514.26.2.el7.x86_64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               HP
Product:              LOGICAL VOLUME
Revision:             2.74
User Capacity:        384,005,660,672 bytes [384 GB]
Logical block size:   512 bytes
Rotation Rate:        15000 rpm
Logical Unit id:      0x600508b1001030393636354543300b00
Serial number:        50123456789ABCDE
Device type:          disk
Local Time is:        Wed Nov  8 16:10:00 2017 CST
SMART support is:     Unavailable - device lacks SMART capability.

=== START OF READ SMART DATA SECTION ===

Error Counter logging not supported

Device does not support Self Test logging

#加-c参数

[[email protected] ~]# smartctl -x /dev/sda
smartctl 6.2 2017-02-27 r4394 [x86_64-linux-3.10.0-514.26.2.el7.x86_64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               HP
Product:              LOGICAL VOLUME
Revision:             2.74
User Capacity:        384,005,660,672 bytes [384 GB]
Logical block size:   512 bytes
Rotation Rate:        15000 rpm
Logical Unit id:      0x600508b1001030393636354543300b00
Serial number:        50123456789ABCDE
Device type:          disk
Local Time is:        Wed Nov  8 16:12:07 2017 CST
SMART support is:     Unavailable - device lacks SMART capability.
Read Cache is:        Enabled
Writeback Cache is:   Disabled

=== START OF READ SMART DATA SECTION ===

Error Counter logging not supported

Device does not support Self Test logging
Device does not support Background scan results logging
scsiPrintSasPhy Log Sense Failed [unsupported scsi opcode]

  

时间: 2024-11-06 20:46:30

linux 下查看硬件信息(mac,IP地址,硬盘型号,序列号等)的相关文章

[转]Linux下显示硬件信息--lshw

Linux下显示硬件信息--lshw lshw lshw(Hardware Lister)是另外一个可以查看硬件信息的工具,不仅如此,它还可以用来做一些硬件的benchmark. 这个工具其实就是用/proc里面读取一些文件来显示相关的信息,它用到了如下文件和目录(下的文件): /proc/cpuinfo  显示CPU信息 /proc/bus/pci  显示pci信息 /proc/scsi   显示scsi信息 /proc/net/dev  显示网络设备信息 /proc/kcore   从内存映

linux下设置电信网通双线路IP地址

工作上遇到需要在linux下设置电信网通双线路IP地址,操作系统为Suse Linux Enterprise Linux 11 SP2,简要记录下步骤: 编辑/etc/sysconfig/network/ifcfg-eth0, /etc/sysconfig/network/ifcfg-eth1, 设置两个网卡的IP地址,eth0为电信的,eth1为网通的 BOOTPROTO='static' BROADCAST='' ETHTOOL_OPTIONS='' IPADDR='${telecomip}

Linux下查看CPU信息

linux下查看CPU的信息主要通过查看/proc/cpuinfo这个文件. 一.针对/proc/cpuinfo文件,我们需要查看processor,physical id,siblings,core id,cpu cores这几个字段. 1.拥有相同physical id的所有逻辑处理器共享同一个物理插座.每个physical id 代表一个唯一的物理封装,即一颗CPU. 2.Siblings表示位于一个物理封装的CPU上逻辑CPU的个数. 3.每个core id 均代表一个唯一的处理器内核,

Linux下查看CPU信息、机器型号等硬件信息命令

编写一个bash脚本: vim info.sh #!/bin/bash cat /etc/issue echo "_________________________________" cat /proc/cpuinfo |grep name|cut -f2 -d:|uniq -c echo "_________________________________" cat /proc/cpuinfo |grep physical|grep -v address|uniq

Linux 系统下查看硬件信息命令大全

有许多命令可以用来查看 Linux 系统上的硬件信息.有些命令只能够打印出像 CPU 和内存这一特定的硬件组件信息,另外一些命令可以查看多种硬件组件的信息. 这个教程可以带大家快速了解一下查看各种硬件设备的信息和配置详情的最常用的命令. lscpu lscpu命令能够查看 CPU 和处理单元的信息.该命令没有任何其他选项或者别的功能. lscpu 运行该命令会看到下面输出: lspci lspci是另一个命令行工具,可以用来列出所有的 PCI 总线,还有与 PCI 总线相连的设备的详细信息,比如

Linux系统下查看硬件信息命令大全

导读 有许多命令可以用来查看 Linux 系统上的硬件信息.有些命令只能够打印出像 CPU 和内存这一特定的硬件组件信息,另外一些命令可以查看多种硬件组件的信息. 这个教程可以带大家快速了解一下查看各种硬件设备的信息和配置详情的最常用的命令. lscpu lscpu命令能够查看 CPU 和处理单元的信息.该命令没有任何其他选项或者别的功能. lscpu 运行该命令会看到下面输出: lspci lspci是另一个命令行工具,可以用来列出所有的 PCI 总线,还有与 PCI 总线相连的设备的详细信息

Linux操作系统下查看硬件信息的命令总结

1.查看CPU型号 [[email protected] ~]# cat  /proc/cpuinfo | grep  name | awk -F : '{print $2}' |uniq  Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz 2.查看物理CPU数量 [[email protected] ~]# cat  /proc/cpuinfo  | grep  physical |sort |uniq address sizes: 46 bits physic

[转]Linux下查看CPU信息、机器型号等硬件信息

From: http://www.jbxue.com/LINUXjishu/14582.html 查看CPU信息(型号) : # cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c 8 Intel(R) Xeon(R) CPU E5410 @ 2.33GHz (看到有8个逻辑CPU, 也知道了CPU型号) # cat /proc/cpuinfo | grep physical | uniq -c 4 physical id : 0 4 ph

使用dmidecode在Linux下获取硬件信息

dmidecode命令可以让你在Linux系统下获取有关硬件方面的信息.dmidecode的作用是将DMI数据库中的信息解码,以可读的文本方式显示.由于DMI信息可以人为修改,因此里面的信息不一定是系统准确的信息.dmidecode遵循SMBIOS/DMI标准,其输出的信息包括BIOS.系统.主板.处理器.内存.缓存等等. DMI(Desktop Management Interface,DMI)就是帮助收集电脑系统信息的管理系统,DMI信息的收集必须在严格遵照SMBIOS规范的前提下进行.SM