当前位置:首页 > 综合资讯 > 正文
黑狐家游戏

linux查看服务器型号指令,Linux环境下高效查看服务器型号与硬件信息详解

linux查看服务器型号指令,Linux环境下高效查看服务器型号与硬件信息详解

Linux下查看服务器型号及硬件信息,可使用dmidecode指令。该指令提供详细的硬件信息,包括型号、CPU、内存等。运行dmidecode -t 1可获取服务器型号...

Linux下查看服务器型号及硬件信息,可使用dmidecode指令。该指令提供详细的硬件信息,包括型号、CPU、内存等。运行dmidecode -t 1可获取服务器型号,运行dmidecode -t 2-17可查看其他硬件信息。

服务器是承载着企业核心业务的重要基础设施,了解服务器的型号和硬件信息对于系统管理员来说至关重要,本文将详细介绍在Linux环境下如何查看服务器的型号以及相关硬件信息,帮助管理员快速定位问题,提高工作效率。

查看服务器型号的常用方法

1、使用cat命令查看系统信息

cat /etc/os-release:查看操作系统的名称、版本和发行版信息。

cat /proc/cpuinfo:查看CPU的详细信息,包括型号、核心数、线程数等。

linux查看服务器型号指令,Linux环境下高效查看服务器型号与硬件信息详解

cat /proc/meminfo:查看内存信息,包括总内存、已用内存、空闲内存等。

cat /etc/hostid:查看主机ID,主机ID在一定程度上可以代表服务器的型号。

2、使用dmidecode命令查看硬件信息

dmidecode命令可以获取服务器硬件的详细信息,包括CPU、内存、硬盘、网络适配器等。

dmidecode -s system-serial-number:查看服务器的序列号。

dmidecode -t 1:查看系统信息,包括制造商、型号、版本等。

dmidecode -t 2:查看基板信息,包括制造商、型号、版本等。

dmidecode -t 3:查看处理器信息,包括制造商、型号、核心数等。

dmidecode -t 4:查看内存信息,包括制造商、型号、容量等。

linux查看服务器型号指令,Linux环境下高效查看服务器型号与硬件信息详解

dmidecode -t 5:查看存储设备信息,包括制造商、型号、容量等。

3、使用lshw命令查看硬件信息

lshw命令可以查看硬件设备的详细信息,包括CPU、内存、硬盘、显卡等。

lshw -class cpu:查看CPU信息。

lshw -class memory:查看内存信息。

lshw -class disk:查看硬盘信息。

lshw -class network:查看网络信息。

4、使用lspcilsusb命令查看硬件信息

lspci命令用于列出系统上的PCI设备信息。

linux查看服务器型号指令,Linux环境下高效查看服务器型号与硬件信息详解

lsusb命令用于列出系统上的USB设备信息。

lspci -nn:查看PCI设备信息,包括设备名称和厂商ID。

lsusb -nn:查看USB设备信息,包括设备名称和厂商ID。

实际操作案例

以下以Red Hat Enterprise Linux 7为例,演示如何查看服务器型号及硬件信息。

1、使用cat命令查看系统信息

[root@server ~]# cat /etc/os-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.7 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="7"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.7 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.7:ga"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.7
REDHAT_BUGZILLAấuđAFTER-reporting=Yes
REDHAT_BUGZILLA_REPORT_URL="https://bugzilla.redhat.com/"
SYSTEM_LOCALE="en_US.UTF-8"
[root@server ~]# cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 79
model name      : Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz
stepping        : 4
microcode       : 0x00000041
cpu MHz         : 2399.846
cache size      : 20480 KB
physical id     : 0
socket id       : 0
core id         : 0
cpu cores       : 8
cpu threads     : 16
firmware        : 10.00.02
[root@server ~]# cat /proc/meminfo
MemTotal:       16375512 kB
MemFree:         4267840 kB
MemAvailable:    14929944 kB
Buffers:          409600 kB
Cached:          9865040 kB
SwapTotal:       8388608 kB
SwapFree:        8388608 kB
Dirty:               0 kB
Writeback:         0 kB
AnonPages:      5722864 kB
Mapped:          583552 kB
Shmem:             7168 kB
Slab:             895680 kB
SReclaimable:     335312 kB
SUnreclaim:       560256 kB
KernelStack:       32768 kB
PageTables:        78368 kB
NFS_Unstable:         0 kB
Bounce:               0 kB
WritebackTmp:         0 kB
CommitLimit:     15857920 kB
Committed_AS:     15983536 kB
VmallocTotal:   34359738367136 kB
VmallocUsed:      589248 kB
VmallocChunk:   34359738367136 kB
Percpu:             0 kB
NUMAZone:          0 kB
HardwareWatchdog:      0
[root@server ~]# cat /etc/hostid
5c8c8d4a

2、使用dmidecode命令查看硬件信息

[root@server ~]# dmidecode -s system-serial-number
5C8C8D4A
[root@server ~]# dmidecode -t 1
System Information
  Manufacturer: Supermicro
  Product Name: SYS-6036B-TR4
  Version: 1.0
  Serial Number: 5C8C8D4A
  UUID: 00000000-0000-0000-0000-000000000000
  Firmware Revision: 1.0
  BIOS Version: AMI BIOS V1.0.1
  Total Number Of Devices: 15
  Bootup State: Normal
  Power On Hours: 2473
  Machine Type: Server
  SKU Number: None
  Family: X11
  Element Count: 2
  Handle 0x0001: 8086, 7567, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00
  Handle 0x0002: 8086, 7567, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00

3、使用lshw命令查看硬件信息

[root@server ~]# lshw -class cpu
  *-cpu
       product: Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz
       vendor: Intel
       physical id: 0
       bus info: cpu@0
       version: Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz
       capacity: 2400 MHz
       width: 64 bits
       capabilities: mmx, fxsr, sse, sse2, sse3, ssse3, sse4_1, sse4_2, popcnt, avx, avx2, f16c, xop, fma, bmi1, bmi2, rdseed, adx, smap
       configuration: l1d size=256K l1i size=256K l1t size=256K l2 size=2560K l3 size=31936K
       resources: 0
       *-cache
            description: L1 cache
            size: 256 KB
            type: Data
            level: L1
            technology: DDR3
            width: 64 bits
            slots: x8
            firms: x1
            latency: 6
            supported: yes
            width_mask: 0x0
            firms_mask: 0x0
            latency_mask: 0x0
            technology_mask: 0x0
            width_shift: 0
            firms_shift: 0
            latency_shift: 0
            technology_shift: 0
            units: bytes
            operating_speed: 2400 MHz
            error_being_corrected: no
            error_detected: no
            error logged: no
            error_reported: no
       *-cache
            description: L2 cache
            size: 2560 KB
            type: Unified
            level: L2
            technology: DDR3
            width: 64 bits
            slots: x4
            firms: x1
            latency: 6
            supported: yes
            width_mask: 0x0
            firms_mask: 0x0
            latency_mask: 0x0
            technology_mask: 0x0
            width_shift: 0
            firms_shift: 0
            latency_shift: 0
            technology_shift: 0
            units: bytes
            operating_speed: 2400 MHz
            error_being_corrected: no
            error_detected: no
            error_logged: no
            error_reported: no
       *-cache
            description: L3 cache
            size: 31936 KB
            type: Unified
            level: L3
            technology: DDR3
            width: 64 bits
            slots: x8
            firms: x1
            latency: 18
            supported: yes
            width_mask: 0x0
            firms_mask: 0x0
            latency_mask: 0x0
            technology_mask: 0x0
            width_shift: 0
            firms_shift: 0
            latency_shift: 0
            technology_shift: 0
            units: bytes
            operating_speed: 2400 MHz
            error_being_corrected: no
            error_detected: no
            error_logged: no
            error_reported: no
[root@server ~]# lshw -class memory
  *-memory
       description: System Memory
       physical id: 0
       size: 16375 MB
       version: Unpopulated
       width: 64 bits
       clock: 2400MHz
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 0
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 1
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 2
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 3
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 4
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 5
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 6
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 7
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 8
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 9
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 10
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 11
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 12
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 13
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 14
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 15
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 16
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 17
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 18
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 19
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 20
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 21
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 22
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 23
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 24
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 25
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 26
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 27
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 28
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 29
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 30
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 31
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 32
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 33
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 34
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 35
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 36
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 37
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 38
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 39
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 40
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 41
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 42
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 43
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 44
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 45
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 46
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 47
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 48
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 49
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 50
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 51
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 52
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 53
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 54
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 55
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 56
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 57
       size: 16375 MB
       width: 64 bits
       clock: 2400MHz
       slot: 58
黑狐家游戏

发表评论

最新文章