linux的lshw命令怎么翻页,Linux怎么查看硬件信息之lshw命令

lshw工具简介

本文主要介绍lshw命令,该命令是Linux系统管理中较为常用的一个命令行工具,用于查看硬件信息。多数Linux发行版默认情况下并没有集成该工具,本文将会讲解如何利用lshw命令查看服务器硬件信息。

安装工具:

CentOS7.6为例:

[root@zcwyou ~]# yum -y install lshw

d11bfcc5c2e61be9d097d085f4c6ee65.png

1. 查看网卡信息

命令:

[root@zcwyou ~]# lshw -C network

输出信息:

*-network

description: Ethernet interface

product: RTL8101E/RTL8102E PCI Express Fast Ethernet controller

vendor: Realtek Semiconductor Co., Ltd.

physical id: 0

bus info: pci@0000:01:00.0

logical name: eth0

version: 05

serial: 00:e0:4c:36:01:8b

size: 100Mbit/s

capacity: 100Mbit/s

width: 64 bits

clock: 33MHz

capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation

configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl_nic/rtl8105e-1.fw ip=59.37.83.138 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s

resources: irq:26 ioport:e800(size=256) memory:fdfff000-fdffffff(prefetchable) memory:fdff8000-fdffbfff(prefetchable)

00826cc130237f1b487379b7353dde36.png

2. 查看内存信息

命令:

[root@zcwyou ~]# lshw -C memory

输出信息:

*-firmware

description: BIOS

vendor: Dell Inc.

physical id: 0

version: 1.13.0

date: 03/02/2018

size: 64KiB

capacity: 4MiB

capabilities: isa pci pnp upgrade shadowing cdboot bootselect edd int13floppytoshiba int13floppy360 int13floppy1200 int13floppy720 int9keyboard int14serial int10video acpi usb biosbootspecification netboot

*-cache:0

description: L1 cache

physical id: 700

size: 128KiB

capacity: 128KiB

capabilities: internal write-back data

configuration: level=1

*-cache:1

description: L2 cache

physical id: 701

size: 1MiB

capacity: 2MiB

capabilities: internal write-back unified

configuration: level=2

*-cache:2

description: L3 cache

physical id: 702

size: 12MiB

capacity: 12MiB

capabilities: internal write-back unified

configuration: level=3

*-memory

description: System Memory

physical id: 1000

slot: System board or motherboard

size: 32GiB

capabilities: ecc

configuration: errordetection=multi-bit-ecc

*-bank:0

description: DIMM DDR3 Synchronous Registered (Buffered) 1333 MHz (0.8 ns)

product: M393B1K70DH0-YH9

vendor: 00CE00B380CE

physical id: 0

serial: 83BB0BB1

slot: DIMM_A1

size: 8GiB

width: 64 bits

clock: 1333MHz (0.8ns)

*-bank:1

description: DIMM DDR3 Synchronous Registered (Buffered) 1333 MHz (0.8 ns)

product: M393B1K70DH0-YH9

vendor: 00CE00B380CE

physical id: 1

serial: 83BB0BB0

slot: DIMM_A2

size: 8GiB

width: 64 bits

clock: 1333MHz (0.8ns)

*-bank:2

description: DIMM DDR3 Synchronous Registered (Buffered) 1333 MHz (0.8 ns)

product: M393B1K70DH0-YH9

vendor: 00CE00B380CE

physical id: 2

serial: 83BB0BDD

slot: DIMM_A3

size: 8GiB

width: 64 bits

clock: 1333MHz (0.8ns)

*-bank:3

description: DIMM DDR3 Synchronous Registered (Buffered) 1333 MHz (0.8 ns)

product: M393B1K70DH0-YH9

vendor: 00CE00B380CE

physical id: 3

serial: 83BB0BAC

slot: DIMM_A4

size: 8GiB

width: 64 bits

clock: 1333MHz (0.8ns)

*-bank:4

description: DIMM DDR3 Synchronous [empty]

physical id: 4

slot: DIMM_B1

width: 64 bits

*-bank:5

description: DIMM DDR3 Synchronous [empty]

physical id: 5

slot: DIMM_B2

width: 64 bits

*-bank:6

description: DIMM DDR3 Synchronous [empty]

physical id: 6

slot: DIMM_B3

width: 64 bits

*-bank:7

description: DIMM DDR3 Synchronous [empty]

physical id: 7

slot: DIMM_B4

width: 64 bits

72ffd2c2f5835288af3b7a73ce9176d8.png

3. 查看CPU信息

不需要使用lshw命令

[root@zcwyou ~]# cat /proc/cpuinfo |more

输出结果:

processor : 0

vendor_id : GenuineIntel

cpu family : 6

model : 45

model name : Intel(R) Xeon(R) CPU E5-2630 0 @ 2.30GHz

stepping : 7

microcode : 0x710

cpu MHz : 2294.471

cache size : 15360 KB

physical id : 0

siblings : 2

core id : 0

cpu cores : 2

apicid : 0

initial apicid : 0

fpu : yes

fpu_exception : yes

cpuid level : 13

wp : yes

flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss ht syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts nopl xt

opology tsc_reliable nonstop_tsc cpuid aperfmperf pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm epb pti tsc_adjust dtherm ida

arat pln pts

bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf

bogomips : 4588.94

clflush size : 64

cache_alignment : 64

address sizes : 42 bits physical, 48 bits virtual

power management:

533a09f21055d652d2633f55d2609101.png

总结:Linux使用lshw查看各种硬件信息。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值