Linux查看硬件信息命令

Linux查看硬件信息命令

一、查看服務(wù)器硬件信息

(1)查看服務(wù)器型號(hào)、序列號(hào)

[root@Master ~]# dmidecode|grep "System Information" -A9|egrep? "Manufacturer|Product|Serial"

(2)查看主板型號(hào)

[root@Master ~]# dmidecode |grep -A16 "System Information$"

(3)查看BIOS信息

復(fù)制代碼

復(fù)制代碼

[root@Master ~]# dmidecode -t bios

# dmidecode 2.12

SMBIOS 2.8 present.

Handle 0x0008, DMI type 0, 24 bytes

BIOS Information

? ? ? ? Vendor: HP

? ? ? ? Version: U19

? ? ? ? Release Date: 12/27/2015

? ? ? ? Address: 0xF0000

? ? ? ? Runtime Size: 64 kB

? ? ? ? ROM Size: 16384 kB

? ? ? ? Characteristics:

? ? ? ? ? ? ? ? PCI is supported

? ? ? ? ? ? ? ? PNP is supported

? ? ? ? ? ? ? ? BIOS is upgradeable

? ? ? ? ? ? ? ? BIOS shadowing is allowed

? ? ? ? ? ? ? ? ESCD support is available

? ? ? ? ? ? ? ? Boot from CD is supported

? ? ? ? ? ? ? ? Selectable boot is supported

? ? ? ? ? ? ? ? EDD is supported

? ? ? ? ? ? ? ? 5.25"/360 kB floppy services are supported (int 13h)

? ? ? ? ? ? ? ? 5.25"/1.2 MB floppy services are supported (int 13h)

? ? ? ? ? ? ? ? 3.5"/720 kB floppy services are supported (int 13h)

? ? ? ? ? ? ? ? Print screen service is supported (int 5h)

? ? ? ? ? ? ? ? 8042 keyboard services are supported (int 9h)

? ? ? ? ? ? ? ? Serial services are supported (int 14h)

? ? ? ? ? ? ? ? Printer services are supported (int 17h)

? ? ? ? ? ? ? ? CGA/mono video services are supported (int 10h)

? ? ? ? ? ? ? ? ACPI is supported

? ? ? ? ? ? ? ? USB legacy is supported

? ? ? ? ? ? ? ? BIOS boot specification is supported

? ? ? ? ? ? ? ? Function key-initiated network boot is supported

? ? ? ? ? ? ? ? Targeted content distribution is supported

? ? ? ? ? ? ? ? UEFI is supported

? ? ? ? BIOS Revision: 2.0

? ? ? ? Firmware Revision: 2.40

復(fù)制代碼

復(fù)制代碼

? (3)查看內(nèi)存槽及內(nèi)存條

復(fù)制代碼

復(fù)制代碼

[root@Master ~]# dmidecode -t memory | head -45 | tail -23

Memory Device

? ? ? ? Array Handle: 0x000A

? ? ? ? Error Information Handle: Not Provided

? ? ? ? Total Width: 72 bits

? ? ? ? Data Width: 64 bits

? ? ? ? Size: 16384 MB

? ? ? ? Form Factor: DIMM

? ? ? ? Set: None

? ? ? ? Locator: PROC 1 DIMM 1

? ? ? ? Bank Locator: Not Specified

? ? ? ? Type: DDR4

? ? ? ? Type Detail: Synchronous Registered (Buffered)

? ? ? ? Speed: 2133 MHz

? ? ? ? Manufacturer: HP? ?

? ? ? ? Serial Number: Not Specified

? ? ? ? Asset Tag: Not Specified

? ? ? ? Part Number: 752369-081

? ? ? ? Rank: 2

? ? ? ? Configured Clock Speed: 2133 MHz

? ? ? ? Minimum Voltage:? 1.2 V

? ? ? ? Maximum Voltage:? 1.2 V

? ? ? ? Configured Voltage:? 1.2 V

[root@Master ~]#

復(fù)制代碼

復(fù)制代碼

? (4)查看網(wǎng)卡信息

復(fù)制代碼

復(fù)制代碼

[root@Master ~]# dmesg | grep -i Ethernet

igb: Intel(R) Gigabit Ethernet Network Driver - version 5.3.0-k

igb 0000:04:00.0: Intel(R) Gigabit Ethernet Network Connection

igb 0000:04:00.1: Intel(R) Gigabit Ethernet Network Connection

igb 0000:04:00.2: Intel(R) Gigabit Ethernet Network Connection

igb 0000:04:00.3: Intel(R) Gigabit Ethernet Network Connection

igb 0000:02:00.0: Intel(R) Gigabit Ethernet Network Connection

igb 0000:02:00.1: Intel(R) Gigabit Ethernet Network Connection

復(fù)制代碼

復(fù)制代碼

(5) 查看pci信息,即主板所有硬件槽信息

復(fù)制代碼

復(fù)制代碼

[root@Master ~]# lspci | head -10

00:00.0 Host bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DMI2 (rev 02)

00:01.0 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 1 (rev 02)

00:01.1 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 1 (rev 02)

00:02.0 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 2 (rev 02)

00:02.1 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 2 (rev 02)

00:02.2 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 2 (rev 02)

00:02.3 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 2 (rev 02)

00:03.0 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 3 (rev 02)

00:03.1 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 3 (rev 02)

00:03.2 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 3 (rev 02)

復(fù)制代碼

復(fù)制代碼

二、查看CPU信息

(1)查看cpu型號(hào)

[root@Master ~]# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c

? ? 40? Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz

(2)查看系統(tǒng)中實(shí)際物理CPU的數(shù)量(物理)

[root@Master ~]# grep 'physical id' /proc/cpuinfo | sort | uniq | wc -l

2

(3)系統(tǒng)中實(shí)際物理CPU的數(shù)量(核數(shù))

[root@Master ~]# cat /proc/cpuinfo |grep 'processor'|wc -l

40

(4)查看每個(gè)物理CPU中core的個(gè)數(shù)(即核數(shù))

[root@Master ~]# cat /proc/cpuinfo |grep "cores"|uniq

cpu cores? ? ? : 10

(5)查看CPU的主頻

[root@Master ~]# cat /proc/cpuinfo |grep MHz|uniq

cpu MHz? ? ? ? : 1200.000

cpu MHz? ? ? ? : 2300.000

cpu MHz? ? ? ? : 1200.000

(6)查看CPU的詳細(xì)信息

復(fù)制代碼

復(fù)制代碼

[root@Master ~]# cat /proc/cpuinfo | head -20

processor? ? ? : 0? ? ? ? ? ? ? ? ? ? ? ? ? //邏輯處理器的ID

vendor_id? ? ? : GenuineIntel

cpu family? ? ? : 6

model? ? ? ? ? : 63

model name? ? ? : Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz? //CPU型號(hào)

stepping? ? ? ? : 2

microcode? ? ? : 54

cpu MHz? ? ? ? : 1200.000

cache size? ? ? : 25600 KB

physical id? ? : 0

siblings? ? ? ? : 20? ? ? ? ? ? ? ? //相同物理封裝處理器中邏輯處理器數(shù)

core id? ? ? ? : 0

cpu cores? ? ? : 10? ? ? ? ? ? ? //相同物理封裝處理器中的內(nèi)核數(shù)

apicid? ? ? ? ? : 0

initial apicid? : 0

fpu? ? ? ? ? ? : yes

fpu_exception? : yes

cpuid level? ? : 15

wp? ? ? ? ? ? ? : yes

flags? ? ? ? ? : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm cqm_llc cqm_occup_llc

復(fù)制代碼

復(fù)制代碼

(7)查看CPU的相關(guān)信息

復(fù)制代碼

復(fù)制代碼

[root@Master ~]# lscpu

Architecture:? ? ? ? ? x86_64

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

Byte Order:? ? ? ? ? ? Little Endian

CPU(s):? ? ? ? ? ? ? ? 40

On-line CPU(s) list:? 0-39

Thread(s) per core:? ? 2

Core(s) per socket:? ? 10

Socket(s):? ? ? ? ? ? 2

NUMA node(s):? ? ? ? ? 2

Vendor ID:? ? ? ? ? ? GenuineIntel

CPU family:? ? ? ? ? ? 6

Model:? ? ? ? ? ? ? ? 63

Model name:? ? ? ? ? ? Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz

Stepping:? ? ? ? ? ? ? 2

CPU MHz:? ? ? ? ? ? ? 1200.000

BogoMIPS:? ? ? ? ? ? ? 4594.43

Virtualization:? ? ? ? VT-x

L1d cache:? ? ? ? ? ? 32K

L1i cache:? ? ? ? ? ? 32K

L2 cache:? ? ? ? ? ? ? 256K

L3 cache:? ? ? ? ? ? ? 25600K

NUMA node0 CPU(s):? ? 0-9,20-29

NUMA node1 CPU(s):? ? 10-19,30-39

[root@Master ~]#

復(fù)制代碼

復(fù)制代碼

(8)查看cpu運(yùn)行模式

[root@Master ~]# getconf LONG_BIT

64

(9)查看cpu是否支持64bit

[root@Master ~]#? cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l

40

(結(jié)果大于0, 說(shuō)明支持64bit計(jì)算. lm指long mode, 支持lm則是64bit)

三、查看內(nèi)存信息

(1)查看內(nèi)存硬件信息

復(fù)制代碼

復(fù)制代碼

root@Master ~]# dmidecode -t memory | head -45 | tail -24

Handle 0x000C, DMI type 17, 40 bytes

Memory Device

? ? ? ? Array Handle: 0x000A

? ? ? ? Error Information Handle: Not Provided

? ? ? ? Total Width: 72 bits

? ? ? ? Data Width: 64 bits

? ? ? ? Size: 16384 MB

? ? ? ? Form Factor: DIMM

? ? ? ? Set: None

? ? ? ? Locator: PROC 1 DIMM 1

? ? ? ? Bank Locator: Not Specified

? ? ? ? Type: DDR4

? ? ? ? Type Detail: Synchronous Registered (Buffered)

? ? ? ? Speed: 2133 MHz

? ? ? ? Manufacturer: HP? ?

? ? ? ? Serial Number: Not Specified

? ? ? ? Asset Tag: Not Specified

? ? ? ? Part Number: 752369-081

? ? ? ? Rank: 2

? ? ? ? Configured Clock Speed: 2133 MHz

? ? ? ? Minimum Voltage:? 1.2 V

? ? ? ? Maximum Voltage:? 1.2 V

? ? ? ? Configured Voltage:? 1.2 V

復(fù)制代碼

復(fù)制代碼

(2)最大支持多少內(nèi)存

[root@Master ~]# dmidecode|grep -P 'Maximum\s+Capacity'

(3)Linux 查看內(nèi)存的插槽數(shù),已經(jīng)使用多少插槽.每條內(nèi)存多大:

(4)Linux 查看內(nèi)存的頻率:

[root@Master ~]# dmidecode|grep -A16 "Memory Device"|grep 'Speed'

(5)Linux 查看內(nèi)存的詳細(xì)信息:

復(fù)制代碼

復(fù)制代碼

[root@Master ~]# cat /proc/meminfo |head -20

MemTotal:? ? ? 131897620 kB

MemFree:? ? ? ? ? 414124 kB

Buffers:? ? ? ? 1040560 kB

Cached:? ? ? ? 111083180 kB

SwapCached:? ? ? ? 1320 kB

Active:? ? ? ? ? 7637912 kB

Inactive:? ? ? 110607108 kB

Active(anon):? ? 4406900 kB

Inactive(anon):? 1714900 kB

Active(file):? ? 3231012 kB

Inactive(file): 108892208 kB

Unevictable:? ? 10878976 kB

Mlocked:? ? ? ? 5521652 kB

SwapTotal:? ? ? 16777212 kB

SwapFree:? ? ? 16737536 kB

Dirty:? ? ? ? ? ? ? 180 kB

Writeback:? ? ? ? ? ? 0 kB

AnonPages:? ? ? 16999324 kB

Mapped:? ? ? ? ? 149020 kB

Shmem:? ? ? ? ? ? ? 172 kB

復(fù)制代碼

復(fù)制代碼

(6)Linux 查看內(nèi)存的使用情況

[root@Master ~]# free -m? ? // -b,-k,-m,-g show output in bytes, KB, MB, or GB

? ? ? ? ? ? total? ? ? used? ? ? free? ? shared? ? buffers? ? cached

Mem:? ? ? ? 128806? ? 123407? ? ? 5398? ? ? ? ? 0? ? ? 1015? ? 103474

-/+ buffers/cache:? ? ? 18918? ? 109888

Swap:? ? ? ? 16383? ? ? ? 38? ? ? 16345

四、查看硬盤(pán)信息

(1)查看掛接的分區(qū)狀態(tài)

[root@Master ~]# fdisk -l |grep Disk

(2)查看硬盤(pán)和分區(qū)分布

復(fù)制代碼

復(fù)制代碼

[root@Master ~]# lsblk

NAME? MAJ:MIN RM? SIZE RO TYPE MOUNTPOINT

sda? ? ? 8:0? ? 0 279.4G? 0 disk

├─sda1? 8:1? ? 0? ? 50M? 0 part /boot

├─sda2? 8:2? ? 0? 100G? 0 part /

├─sda3? 8:3? ? 0? ? 50G? 0 part /home

├─sda4? 8:4? ? 0? ? 1K? 0 part

├─sda5? 8:5? ? 0? ? 16G? 0 part [SWAP]

├─sda6? 8:6? ? 0? 13.3G? 0 part /tmp

└─sda7? 8:7? ? 0? 100G? 0 part /usr

sdb? ? ? 8:16? 0? 83.7T? 0 disk

└─sdb1? 8:17? 0? 83.7T? 0 part /PureDisk

復(fù)制代碼

復(fù)制代碼

(3)查看硬盤(pán)和分區(qū)的詳細(xì)信息

復(fù)制代碼

復(fù)制代碼

[root@Master ~]# fdisk -l? ? ? ? ?

Disk /dev/sda: 300.0 GB, 299966445568 bytes

255 heads, 63 sectors/track, 36468 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 262144 bytes / 262144 bytes

Disk identifier: 0x000384d9

? Device Boot? ? ? Start? ? ? ? End? ? ? Blocks? Id? System

/dev/sda1? *? ? ? ? ? 1? ? ? ? ? 7? ? ? 51200? 83? Linux

Partition 1 does not end on cylinder boundary.

/dev/sda2? ? ? ? ? ? ? 7? ? ? 13061? 104857600? 83? Linux

/dev/sda3? ? ? ? ? 13061? ? ? 19588? ? 52428800? 83? Linux

/dev/sda4? ? ? ? ? 19588? ? ? 36469? 135597056? ? 5? Extended

/dev/sda5? ? ? ? ? 19588? ? ? 21677? ? 16777216? 82? Linux swap / Solaris

/dev/sda6? ? ? ? ? 21677? ? ? 23415? ? 13962240? 83? Linux

/dev/sda7? ? ? ? ? 23416? ? ? 36469? 104854528? 83? Linux

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sdb: 92017.3 GB, 92017310654464 bytes

255 heads, 63 sectors/track, 11187134 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 262144 bytes / 6029312 bytes

Disk identifier: 0x00000000

? Device Boot? ? ? Start? ? ? ? End? ? ? Blocks? Id? System

/dev/sdb1? ? ? ? ? ? ? 1? ? ? 267350? 2147483647+? ee? GPT

Partition 1 does not start on physical sector boundary.

復(fù)制代碼

復(fù)制代碼

(4)查看掛接的分區(qū)狀態(tài)

復(fù)制代碼

復(fù)制代碼

[root@Master ~]# mount | column -t

/dev/sda2? on? /? ? ? ? ? ? ? ? ? ? ? ? type? ext4? ? ? ? (rw)

proc? ? ? on? /proc? ? ? ? ? ? ? ? ? ? type? proc? ? ? ? (rw)

sysfs? ? ? on? /sys? ? ? ? ? ? ? ? ? ? ? type? sysfs? ? ? ? (rw)

devpts? ? on? /dev/pts? ? ? ? ? ? ? ? ? type? devpts? ? ? (rw,gid=5,mode=620)

tmpfs? ? ? on? /dev/shm? ? ? ? ? ? ? ? ? type? tmpfs? ? ? ? (rw)

/dev/sda1? on? /boot? ? ? ? ? ? ? ? ? ? type? ext4? ? ? ? (rw)

/dev/sda3? on? /home? ? ? ? ? ? ? ? ? ? type? ext4? ? ? ? (rw)

/dev/sda6? on? /tmp? ? ? ? ? ? ? ? ? ? ? type? ext4? ? ? ? (rw)

/dev/sda7? on? /usr? ? ? ? ? ? ? ? ? ? ? type? ext4? ? ? ? (rw)

/dev/sdb1? on? /PureDisk? ? ? ? ? ? ? ? type? ext4? ? ? ? (rw)

none? ? ? on? /proc/sys/fs/binfmt_misc? type? binfmt_misc? (rw

復(fù)制代碼

復(fù)制代碼

(5)查看掛接的分區(qū)狀態(tài)

[root@Master ~]# swapon -s?

Filename? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Type? ? ? ? ? ? Size? ? Used? ? Priority

/dev/sda5? ? ? ? ? ? ? ? ? ? ? ? ? ? ? partition? ? ? 16777212? ? ? ? 39676? -1

(6)查看硬盤(pán)使用情況

復(fù)制代碼

復(fù)制代碼

[root@Master ~]# df -hT

Filesystem? ? Type? Size? Used Avail Use% Mounted on

/dev/sda2? ? ? ext4? ? 99G? 561M? 93G? 1% /

tmpfs? ? ? ? ? tmpfs? 63G? 76K? 63G? 1% /dev/shm

/dev/sda1? ? ? ext4? ? 45M? 38M? 4.9M? 89% /boot

/dev/sda3? ? ? ext4? ? 50G? 52M? 47G? 1% /home

/dev/sda6? ? ? ext4? ? 13G? 34M? 13G? 1% /tmp

/dev/sda7? ? ? ext4? ? 99G? 21G? 73G? 23% /usr

/dev/sdb1? ? ? ext4? ? 84T? 41T? 40T? 51% /PureDisk

復(fù)制代碼

復(fù)制代碼

(7) 硬盤(pán)檢測(cè)命令smartctl

復(fù)制代碼

復(fù)制代碼

[root@Master ~]# smartctl -a /dev/sda

smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-642.el6.x86_64] (local build)

Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

Vendor:? ? ? ? ? ? ? HP? ? ?

Product:? ? ? ? ? ? ? LOGICAL VOLUME?

Revision:? ? ? ? ? ? 3.56

User Capacity:? ? ? ? 299,966,445,568 bytes [299 GB]

Logical block size:? 512 bytes

Logical Unit id:? ? ? 0x600508b1001cc8a1b9ec4dacc5ab35dc

Serial number:? ? ? ? PDNNK0BRH9U0AG?

Device type:? ? ? ? ? disk

Local Time is:? ? ? ? Mon Feb? 5 13:13:33 2018 CST

Device supports SMART and is Enabled

Temperature Warning Disabled or Not Supported

SMART Health Status: OK

Error Counter logging not supported

Device does not support Self Test logging

復(fù)制代碼

復(fù)制代碼

五、查看網(wǎng)卡信息

(1)查看網(wǎng)卡硬件信息

[root@Master ~]#? lspci | grep -i 'eth'

? (2)查看系統(tǒng)的所有網(wǎng)絡(luò)接口

[root@Master ~]# ifconfig -a

[root@Master ~]# ip link show

? ? (3)查看某個(gè)網(wǎng)絡(luò)接口的詳細(xì)信息,例如eth0的詳細(xì)參數(shù)和指標(biāo)

復(fù)制代碼

復(fù)制代碼

[root@Master ~]# ethtool eth0

Settings for eth0:

? ? ? ? Supported ports: [ FIBRE ]

? ? ? ? Supported link modes:? 10000baseT/Full

? ? ? ? Supported pause frame use: No

? ? ? ? Supports auto-negotiation: No

? ? ? ? Advertised link modes:? 10000baseT/Full

? ? ? ? Advertised pause frame use: No

? ? ? ? Advertised auto-negotiation: No

? ? ? ? Speed: 10000Mb/s

? ? ? ? Duplex: Full

? ? ? ? Port: FIBRE

? ? ? ? PHYAD: 0

? ? ? ? Transceiver: external

? ? ? ? Auto-negotiation: off

? ? ? ? Supports Wake-on: d

? ? ? ? Wake-on: d

? ? ? ? Current message level: 0x00000007 (7)

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? drv probe link

? ? ? ? Link detected: yes

復(fù)制代碼

復(fù)制代碼

? ? (4)查看所有網(wǎng)卡的鏈路狀態(tài)

復(fù)制代碼

復(fù)制代碼

[root@Master ~]# for i in `seq 0 9`;do ethtool eth${i} | egrep 'eth|Link';done

Settings for eth0:

? ? ? ? Link detected: yes?

Settings for eth1:

? ? ? ? Link detected: yes

Settings for eth2:

? ? ? ? Link detected: no

Settings for eth3:

? ? ? ? Link detected: no

Settings for eth4:

? ? ? ? Link detected: no

Settings for eth5:

? ? ? ? Link detected: no

Settings for eth6:

? ? ? ? Link detected: no

Settings for eth7:

? ? ? ? Link detected: no

Settings for eth8:

? ? ? ? Link detected: no

Settings for eth9:

? ? ? ? Link detected: no

復(fù)制代碼

復(fù)制代碼

六、列出所有PCI設(shè)備信息

復(fù)制代碼

復(fù)制代碼

[root@Master ~]# lspci -tv | more

-+-[0000:ff]-+-08.0? Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 QPI Link 0

|? ? ? ? ? +-08.3? Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 QPI Link 0

|? ? ? ? ? +-09.0? Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 QPI Link 1

|? ? ? ? ? +-09.3? Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 QPI Link 1

|? ? ? ? ? +-0b.0? Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 R3 QPI Link 0 & 1 Monitoring

|? ? ? ? ? +-0b.1? Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 R3 QPI Link 0 & 1 Monitoring

|? ? ? ? ? +-0b.2? Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 R3 QPI Link 0 & 1 Monitoring

|? ? ? ? ? +-0c.0? Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers

|? ? ? ? ? +-0c.1? Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers

|? ? ? ? ? +-0c.2? Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers

|? ? ? ? ? +-0c.3? Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers

|? ? ? ? ? +-0c.4? Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers

|? ? ? ? ? +-0c.5? Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers

|? ? ? ? ? +-0c.6? Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers

|? ? ? ? ? +-0c.7? Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers

|? ? ? ? ? +-0d.0? Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers

|? ? ? ? ? +-0d.1? Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers

|? ? ? ? ? +-0f.0? Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Buffered Ring Agent

|? ? ? ? ? +-0f.1? Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Buffered Ring Agent

|? ? ? ? ? +-0f.2? Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Buffered Ring Agent

|? ? ? ? ? +-0f.3? Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Buffered Ring Agent

復(fù)制代碼

復(fù)制代碼

1.cpu

查看CPU信息

# 總核數(shù) = 物理CPU個(gè)數(shù) X 每顆物理CPU的核數(shù)

# 總邏輯CPU數(shù) = 物理CPU個(gè)數(shù) X 每顆物理CPU的核數(shù) X 超線程數(shù)

# 查看物理CPU個(gè)數(shù)

cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l

# 查看每個(gè)物理CPU中core的個(gè)數(shù)(即核數(shù))

cat /proc/cpuinfo| grep "cpu cores"| uniq

# 查看邏輯CPU的個(gè)數(shù)

cat /proc/cpuinfo| grep "processor"| wc -l

# 查看CPU信息(型號(hào))

cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c

#lscpu命令,查看的是cpu的統(tǒng)計(jì)信息.(部分舊版本不支持)

復(fù)制代碼

復(fù)制代碼

Disk /dev/sda: 64.4 GB, 64424509440 bytes

255 heads, 63 sectors/track, 7832 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x0000859f

? Device Boot? ? ? Start? ? ? ? End? ? ? Blocks? Id? System

/dev/sda1? *? ? ? ? ? 1? ? ? ? ? 64? ? ? 512000? 83? Linux

Partition 1 does not end on cylinder boundary.

/dev/sda2? ? ? ? ? ? ? 64? ? ? ? 7833? ? 62401536? 8e? Linux LVM

Disk /dev/mapper/vg_qdy-lv_root: 53.7 GB, 53687091200 bytes

255 heads, 63 sectors/track, 6527 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

復(fù)制代碼

復(fù)制代碼

使用#cat? /proc/cpuinfo ,可以知道每個(gè)cpu信息,如每個(gè)CPU的型號(hào),主頻等。

2.內(nèi)存

#free -m # 查看內(nèi)存使用量和交換區(qū)使用量?

? total? ? ? used? ? ? free? ? shared? ? buffers? ? cached

Mem:? ? ? ? ? 3690? ? ? ? 288? ? ? 3401? ? ? ? ? 0? ? ? ? 15? ? ? ? 119

-/+ buffers/cache:? ? ? ? 153? ? ? 3536

Swap:? ? ? ? 3951? ? ? ? ? 0? ? ? 3951

# cat /proc/meminfo

#dmidecode -t memory 查看內(nèi)存硬件信息

grep MemTotal /proc/meminfo# 查看內(nèi)存總量

grep MemFree /proc/meminfo # 查看空閑內(nèi)存量

lsmod # 列出加載的內(nèi)核模塊

3.磁盤(pán)

# lsblk 查看硬盤(pán)與分區(qū)分而

#df -h? ? # 查看各分區(qū)使用情況

#du -sh # 查看指定目錄的大小

Filesystem? ? ? ? ? ? ? ? ? Size? Used Avail Use% Mounted on

/dev/mapper/vg_qdy-lv_root? 50G? 3.7G? 44G? 8% /

tmpfs? ? ? ? ? ? ? ? ? ? ? 1.9G? ? 0? 1.9G? 0% /dev/shm

/dev/sda1? ? ? ? ? ? ? ? ? 485M? 39M? 421M? 9% /boot

/dev/mapper/vg_qdy-lv_home? 5.6G? 239M? 5.1G? 5% /home

#fdisk -l # 查看所有分區(qū)詳細(xì)信息

復(fù)制代碼

復(fù)制代碼

Disk /dev/sda: 64.4 GB, 64424509440 bytes

255 heads, 63 sectors/track, 7832 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x0000859f

? Device Boot? ? ? Start? ? ? ? End? ? ? Blocks? Id? System

/dev/sda1? *? ? ? ? ? 1? ? ? ? ? 64? ? ? 512000? 83? Linux

Partition 1 does not end on cylinder boundary.

/dev/sda2? ? ? ? ? ? ? 64? ? ? ? 7833? ? 62401536? 8e? Linux LVM

Disk /dev/mapper/vg_qdy-lv_root: 53.7 GB, 53687091200 bytes

255 heads, 63 sectors/track, 6527 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

...... 下方省略!

復(fù)制代碼

復(fù)制代碼

4.網(wǎng)卡信息

# lspci | grep -i 'eth'? 查看網(wǎng)卡硬件信息

# ifconfig -a 查看系統(tǒng)所有網(wǎng)絡(luò)接口

或 #ip link show

# ethtool eth0 查看某個(gè)網(wǎng)絡(luò)接口的詳細(xì)信息

5.主板所有硬件槽PCI信息。

#lspci

更詳細(xì)的lspci -v 或者 lspci -vv

#lscpi -t 設(shè)備樹(shù)

6.查看bios 信息

# dmidecode -t bios

7. 查看系統(tǒng)運(yùn)行時(shí)間、用戶數(shù)、負(fù)載

#uptime

#cat /proc/loadavg # 查看系統(tǒng)負(fù)載磁盤(pán)和分區(qū)

8. 查看掛接的分區(qū)狀態(tài)

#mount | column -t

9. 查看系統(tǒng)負(fù)載 磁盤(pán)和分區(qū)

# cat /proc/loadavg

10.查看所有安裝的軟件包

#rpm -qa

11. 查看所有進(jìn)程

# ps -ef

12. 查看所有監(jiān)聽(tīng)端口

#netstat -lntp

13.查用戶與組信息

#cut -d: -f1 /etc/passwd # 查看系統(tǒng)所有用戶 cat /etc/passwd |more 顯示長(zhǎng)系統(tǒng)用戶并分頁(yè)

#cut -d: -f1 /etc/group # 查看系統(tǒng)所有組? cat /etc/group|more 顯示長(zhǎng)系統(tǒng)所有組并分頁(yè)

14其它不常用查看信息命令

swapon -s # 查看所有交換分區(qū)

iptables -L # 查看防火墻設(shè)置

hdparm -i /dev/hda # 查看磁盤(pán)參數(shù)(僅適用于IDE設(shè)備)

dmesg | grep IDE # 查看啟動(dòng)時(shí)IDE設(shè)備檢測(cè)狀況網(wǎng)絡(luò)

crontab -l # 查看當(dāng)前用戶的計(jì)劃任務(wù) 服務(wù)

chkconfig –list # 列出所有系統(tǒng)服務(wù)#

chkconfig –list | grep on # 列出所有啟動(dòng)的系統(tǒng)服務(wù) 程序

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • 上面型號(hào),下面算力. INTEL(R) XEON(R) CPU E7-8867 V4 @ 2.40GHZ 3150...
    我是小夫呀閱讀 41,799評(píng)論 1 3
  • 1.命令格式:ifconfig [網(wǎng)絡(luò)設(shè)備] [參數(shù)] 2.命令功能: ifconfig 命令用來(lái)查看和配置網(wǎng)絡(luò)設(shè)...
    Nuuuu閱讀 4,109評(píng)論 0 12
  • 魯大師檢測(cè) 詳細(xì)報(bào)表 --------[ 魯大師 ]-------------------------------...
    Feel君閱讀 12,722評(píng)論 0 0
  • feisky云計(jì)算、虛擬化與Linux技術(shù)筆記posts - 1014, comments - 298, trac...
    不排版閱讀 4,276評(píng)論 0 5
  • 今天媽媽下班回來(lái),媽媽對(duì)我說(shuō)不舒服。我說(shuō)讓媽媽在床上休息休息。我給媽媽倒了杯水,還給媽媽剝水果吃,媽媽夸我是個(gè)懂事...
    范子航閱讀 221評(píng)論 0 1

友情鏈接更多精彩內(nèi)容