Linux之硬件管理(不断更新中)

时间:2023-03-09 19:08:15
Linux之硬件管理(不断更新中)

1 查看CPU信息

[root@limt01 .ssh]# lscpu

Architecture:          x86_64

CPU op-mode(s):        32-bit, 64-bit

Byte Order:            Little Endian

CPU(s):                4

On-line CPU(s) list:   0-3

Thread(s) per core:    1

Core(s) per socket:    4

Socket(s):             1

NUMA node(s):          1

Vendor ID:             AuthenticAMD

CPU family:            16

Model:                 5

Stepping:              2

CPU MHz:               2813.039

BogoMIPS:              5626.07

Hypervisor vendor:     VMware

Virtualization type:   full

L1d cache:             64K

L1i cache:             64K

L2 cache:              512K

NUMA node0 CPU(s):     0-3



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

processor       : 0

vendor_id       : AuthenticAMD

cpu family      : 16

model           : 5

model name      : AMD Athlon(tm) II X4 630 Processor

stepping        : 2

cpu MHz         : 2813.039

cache size      : 512 KB

physical id     : 0

siblings        : 4

core id         : 0

cpu cores       : 4

apicid          : 0

initial apicid  : 0

fpu             : yes

fpu_exception   : yes

cpuid level     : 5

wp              : yes

flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mm

xext fxsr_opt rdtscp lm 3dnowext 3dnow constant_tsc rep_good tsc_reliable nonstop_tsc unfair_spinlock pni cx16 popcnt hypervisor lah

f_lm extapic abm sse4a misalignsse 3dnowprefetch osvw

bogomips        : 5626.07

TLB size        : 1024 4K pages

clflush size    : 64

cache_alignment : 64

address sizes   : 40 bits physical, 48 bits virtual

power management:



查看cpu位数

[root@limt01 ~]# getconf LONG_BIT

64

2 查看硬件概要

$ hwconfig  

hwconfig: warning: could not run megarc; please yinst megarc

Summary:        Huawei Technologies Tecal RH2285, 2 x Xeon E5620 2.40GHz, 23.5GB / 24GB 1066MHz

System:         Huawei Technologies Tecal RH2285 (Huawei Technologies BC11BTSA)

Processors:     2 x Xeon E5620 2.40GHz 133MHz FSB (16 cores)

Memory:         23.5GB / 24GB 1066MHz == 6 x 4GB, 6 x empty

Disk:           sda (megaraid_sas0): 107GB (38%) JBOD == 1 x LSI-MegaRAID-SAS-RMB

Disk:           sdb (megaraid_sas0): 5.9TB (1%) JBOD == 1 x LSI-MegaRAID-SAS-RMB

Disk-Control:   megaraid_sas0: LSI Logic / Symbios Logic MegaRAID SAS 1078

Disk-Control:   ata_piix0: Intel 82801JI (ICH10 Family) 4 port SATA IDE Controller

Disk-Control:   ata_piix1: Intel 82801JI (ICH10 Family) 2 port SATA IDE Controller

Network:        host5 (bnx2-1): Broadcom NetXtreme II BCM5709 Gigabit Ethernet

Network:        host6 (bnx2-0): Broadcom NetXtreme II BCM5709 Gigabit Ethernet

Network:        eth0 (bnx2): 08:19:a6:24:3c:05, 1000Mb/s <full-duplex>

Network:        eth1 (bnx2): 08:19:a6:24:3c:05, 1000Mb/s <full-duplex>

OS:             RHEL Server 5.4 (Tikanga), Linux 2.6.18-164.el5 x86_64, 64-bit

BIOS:           AMI CTSAV035 12/07/2010

Hostname:       xxxxxx

3 查看机器所有硬件信息

dmidecode |more

4 查看系统硬件加载信息

dmesg |more

5 查看网卡信息

[root@limt01 ~]#  ethtool eth0

Settings for eth0:

        Supported ports: [ TP ]

        Supported link modes:   1000baseT/Full 

        Supported pause frame use: No

        Supports auto-negotiation: No

        Advertised link modes:  Not reported

        Advertised pause frame use: No

        Advertised auto-negotiation: No

        Speed: 1000Mb/s

        Duplex: Full

        Port: Twisted Pair

        PHYAD: 0

        Transceiver: internal

        Auto-negotiation: off

        MDI-X: Unknown

        Link detected: yes

7 查看主板信息

[root@limt01 ~]#  lspci

00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 01)

00:01.0 PCI bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 01)

00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 08)

00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)

00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)

00:07.7 System peripheral: VMware Virtual Machine Communication Interface (rev 10)

00:0f.0 VGA compatible controller: VMware SVGA II Adapter

00:10.0 SCSI storage controller: LSI Logic / Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 01)

00:11.0 PCI bridge: VMware PCI bridge (rev 02)

8 查看USB挂载信息

[root@limt01 ~]# lsusb

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse

Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub

9 查看磁盘信息

[root@limt01 ~]# lsblk

NAME                         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT

sda                            8:0    0   80G  0 disk 

├─sda1                         8:1    0  500M  0 part /boot

└─sda2                         8:2    0 79.5G  0 part 

  ├─vg_limt01-lv_root (dm-0) 253:0    0   50G  0 lvm  /

  ├─vg_limt01-lv_swap (dm-1) 253:1    0    4G  0 lvm  [SWAP]

  └─vg_limt01-lv_home (dm-2) 253:2    0 25.6G  0 lvm  /home

sr0                           11:0    1 1024M  0 rom