Linux 查看系统硬件信息
[color=rgb(85, 85, 85)][font=宋体, "]下面介绍下在centos下硬件信息的查看,在Linux下查看需要用到各种命令,不像Windows上可以非常直观地看到。
[color=rgb(85, 85, 85)][font=宋体, "]查看所有硬件的信息
[color=rgb(85, 85, 85)][font=宋体, "] 1)dmidecode[color=rgb(85, 85, 85)][font=宋体, "] 2)dmesg[color=rgb(85, 85, 85)][font=宋体, "]Dmidecode 这款软件允许你在 Linux 系统下获取有关硬件方面的信息。Dmidecode 遵循 SMBIOS/DMI 标准,其输出的信息包括 BIOS、系统、主板、处理器、内存、缓存等等。[color=rgb(85, 85, 85)][font=宋体, "]一般很少用这两个命令直接查看,因为这两个命令输出的信息非常多。一般会使用管道过滤出多需要的信息进行查看或通过-t选择指定的硬件查看信息。例如:[color=#555555][font=宋体, "][font=Consolas, "][size=1em]
[tr=none ][align=right][align=right][size=1em]1
[align=right][size=1em]2
[align=right][size=1em]3
[align=right][size=1em]4
[align=right][size=1em]5
[align=right][size=1em][size=1em][root@baby-centOS ~]# dmidecode | grep -i cpu
[size=1em] Socket Designation: CPU 1
[size=1em] Version: Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz
[size=1em] Internal Reference Designator: J2B3 - CPU FAN
[size=1em] Description: CPU Internal Temperature
[color=rgb(85, 85, 85)][font=宋体, "]
[color=rgb(85, 85, 85)][font=宋体, "]查看当前系统的版本,若是redhat,则查看的文件是/etc/redhat-release[color=#555555][font=宋体, "][font=Consolas, "][size=1em]
[tr=none ][align=right][align=right][size=1em]1
[align=right][size=1em]2
[align=right][size=1em][size=1em][root@baby-centOS ~]# cat /etc/centos-release
[size=1em]CentOS release 6.5 (Final)
[color=rgb(85, 85, 85)][font=宋体, "]查看当前系统是32位还是64位的[color=#555555][font=宋体, "][font=Consolas, "][size=1em]
[tr=none ][align=right][align=right][size=1em]1
[align=right][size=1em]2
[align=right][size=1em][size=1em][root@baby-centOS ~]# getconf LONG_BIT
[size=1em]64
[color=rgb(85, 85, 85)][font=宋体, "]
[color=rgb(85, 85, 85)][font=宋体, "]CPU[color=rgb(85, 85, 85)][font=宋体, "]1)通过lscpu查看cpu的统计信息
[color=#555555][font=宋体, "][font=Consolas, "][size=1em]
[tr=none ][align=right][align=right][size=1em]1
[align=right][size=1em]2
[align=right][size=1em]3
[align=right][size=1em]4
[align=right][size=1em]5
[align=right][size=1em]6
[align=right][size=1em]7
[align=right][size=1em]8
[align=right][size=1em]9
[align=right][size=1em]10
[align=right][size=1em]11
[align=right][size=1em]12
[align=right][size=1em]13
[align=right][size=1em]14
[align=right][size=1em]15
[align=right][size=1em]16
[align=right][size=1em]17
[align=right][size=1em]18
[align=right][size=1em]19
[align=right][size=1em]20
[align=right][size=1em]21
[align=right][size=1em]22
[align=right][size=1em][size=1em][root@baby-centOS ~]# lscpu
[size=1em]Architecture: x86_64 #cpu架构
[size=1em]CPU op-mode(s): 32-bit, 64-bit
[size=1em]Byte Order: Little Endian
[size=1em]CPU(s): 4 #逻辑cpu数
[size=1em]On-line CPU(s) list: 0-3
[size=1em]Thread(s) per core: 2 #每个核心支持2个线程
[size=1em]Core(s) per socket: 2 #每颗cpu两个核心
[size=1em]Socket(s): 1 #总共一颗cpu
[size=1em]NUMA node(s): 1
[size=1em]Vendor ID: GenuineIntel #cpu生产厂商
[size=1em]CPU family: 6
[size=1em]Model: 42
[size=1em]Stepping: 7
[size=1em]CPU MHz: 800.000
[size=1em]BogoMIPS: 4589.75
[size=1em]Virtualization: VT-x #支持cpu虚拟化技术
[size=1em]L1d cache: 32K
[size=1em]L1i cache: 32K
[size=1em]L2 cache: 256K #2级缓存
[size=1em]L3 cache: 3072K #3级缓存
[size=1em]NUMA node0 CPU(s): 0-3
[color=rgb(85, 85, 85)][font=宋体, "]
[color=rgb(85, 85, 85)][font=宋体, "]2)/proc/cpuinfo文件中可以看到cpu的型号和最高频率[color=#555555][font=宋体, "][font=Consolas, "][size=1em]
[tr=none ][align=right][align=right][size=1em]1
[align=right][size=1em]2
[align=right][size=1em]3
[align=right][size=1em]4
[align=right][size=1em]5
[align=right][size=1em]6
[align=right][size=1em]7
[align=right][size=1em]8
[align=right][size=1em]9
[align=right][size=1em]10
[align=right][size=1em][size=1em][root@baby-centOS ~]# cat /proc/cpuinfo
[size=1em]processor : 0
[size=1em]vendor_id : GenuineIntel
[size=1em]cpu family : 6
[size=1em]model : 42
[size=1em]model name : Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz
[size=1em]stepping : 7
[size=1em]cpu MHz : 800.000
[size=1em]cache size : 3072 KB
[size=1em]......
[color=rgb(85, 85, 85)][font=宋体, "]
[color=rgb(85, 85, 85)][font=宋体, "]3)也可以通过dmicecode命令通过-t选项指定cpu类型来查看(有更详细的信息)
[color=#555555][font=宋体, "][font=Consolas, "][size=1em]
[tr=none ][align=right][align=right][size=1em]1
[align=right][size=1em]2
[align=right][size=1em]3
[align=right][size=1em]4
[align=right][size=1em]5
[align=right][size=1em]6
[align=right][size=1em]7
[align=right][size=1em]8
[align=right][size=1em]9
[align=right][size=1em]10
[align=right][size=1em]11
[align=right][size=1em]12
[align=right][size=1em]13
[align=right][size=1em]14
[align=right][size=1em]15
[align=right][size=1em]16
[align=right][size=1em]17
[align=right][size=1em]18
[align=right][size=1em]19
[align=right][size=1em]20
[align=right][size=1em]21
[align=right][size=1em]22
[align=right][size=1em]23
[align=right][size=1em]24
[align=right][size=1em]25
[align=right][size=1em]26
[align=right][size=1em]27
[align=right][size=1em]28
[align=right][size=1em]29
[align=right][size=1em]30
[align=right][size=1em]31
[align=right][size=1em]32
[align=right][size=1em]33
[align=right][size=1em]34
[align=right][size=1em]35
[align=right][size=1em]36
[align=right][size=1em]37
[align=right][size=1em]38
[align=right][size=1em]39
[align=right][size=1em]40
[align=right][size=1em]41
[align=right][size=1em]42
[align=right][size=1em]43
[align=right][size=1em]44
[align=right][size=1em]45
[align=right][size=1em]46
[align=right][size=1em]47
[align=right][size=1em]48
[align=right][size=1em]49
[align=right][size=1em]50
[align=right][size=1em]51
[align=right][size=1em]52
[align=right][size=1em]53
[align=right][size=1em]54
[align=right][size=1em]55
[align=right][size=1em]56
[align=right][size=1em]57
[align=right][size=1em]58
[align=right][size=1em]59
[align=right][size=1em][size=1em][root@baby-centOS ~]# dmidecode -t processor
[size=1em]# dmidecode 2.11
[size=1em]SMBIOS 2.6 present.
[size=1em]Handle 0x0004, DMI type 4, 42 bytes
[size=1em]Processor Information
[size=1em] Socket Designation: CPU 1
[size=1em] Type: Central Processor
[size=1em] Family: Core i5
[size=1em] Manufacturer: Intel
[size=1em] ID: A7 06 02 00 FF FB EB BF
[size=1em] Signature: Type 0, Family 6, Model 42, Stepping 7
[size=1em] Flags:
[size=1em] FPU (Floating-point unit on-chip)
[size=1em] VME (Virtual mode extension)
[size=1em] DE (Debugging extension)
[size=1em] PSE (Page size extension)
[size=1em] TSC (Time stamp counter)
[size=1em] MSR (Model specific registers)
[size=1em] PAE (Physical address extension)
[size=1em] MCE (Machine check exception)
[size=1em] CX8 (CMPXCHG8 instruction supported)
[size=1em] APIC (On-chip APIC hardware supported)
[size=1em] SEP (Fast system call)
[size=1em] MTRR (Memory type range registers)
[size=1em] PGE (Page global enable)
[size=1em] MCA (Machine check architecture)
[size=1em] CMOV (Conditional move instruction supported)
[size=1em] PAT (Page attribute table)
[size=1em] PSE-36 (36-bit page size extension)
[size=1em] CLFSH (CLFLUSH instruction supported)
[size=1em] DS (Debug store)
[size=1em] ACPI (ACPI supported)
[size=1em] MMX (MMX technology supported)
[size=1em] FXSR (FXSAVE and FXSTOR instructions supported)
[size=1em] SSE (Streaming SIMD extensions)
[size=1em] SSE2 (Streaming SIMD extensions 2)
[size=1em] SS (Self-snoop)
[size=1em] HTT (Multi-threading)
[size=1em] TM (Thermal monitor supported)
[size=1em] PBE (Pending break enabled)
[size=1em] Version: Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz
[size=1em] Voltage: 1.1 V
[size=1em] External Clock: 100 MHz
[size=1em] Max Speed: 2300 MHz
[size=1em] Current Speed: 2300 MHz
[size=1em] Status: Populated, Enabled
[size=1em] Upgrade: Other
[size=1em] L1 Cache Handle: 0x0005
[size=1em] L2 Cache Handle: 0x0006
[size=1em] L3 Cache Handle: 0x0007
[size=1em] Serial Number: To Be Filled By O.E.M.
[size=1em] Asset Tag: To Be Filled By O.E.M.
[size=1em] Part Number: To Be Filled By O.E.M.
[size=1em] Core Count: 2
[size=1em] Core Enabled: 1
[size=1em] Thread Count: 2
[size=1em] Characteristics:
[size=1em] 64-bit capable
[color=rgb(85, 85, 85)][font=宋体, "]
[color=rgb(85, 85, 85)][font=宋体, "]
[color=rgb(85, 85, 85)][font=宋体, "]内存
[color=rgb(85, 85, 85)][font=宋体, "]查看内存情况[color=rgb(85, 85, 85)][font=宋体, "]1)[color=#555555][font=宋体, "][font=Consolas, "][size=1em]
[tr=none ][align=right][align=right][size=1em]1
[align=right][size=1em]2
[align=right][size=1em]3
[align=right][size=1em]4
[align=right][size=1em]5
[align=right][size=1em][size=1em][root@baby-centOS ~]# free -m
[size=1em] total used free shared buffers cached
[size=1em]Mem: 3739 224 3514 0 15 79
[size=1em]-/+ buffers/cache: 129 3609
[size=1em]Swap: 4095 0 4095
[color=rgb(85, 85, 85)][font=宋体, "]2)[color=#555555][font=宋体, "][font=Consolas, "][size=1em]
[tr=none ][align=right][align=right][size=1em]1
[align=right][size=1em]2
[align=right][size=1em]3
[align=right][size=1em]4
[align=right][size=1em]5
[align=right][size=1em]6
[align=right][size=1em]7
[align=right][size=1em]8
[align=right][size=1em]9
[align=right][size=1em]10
[align=right][size=1em]11
[align=right][size=1em]12
[align=right][size=1em]13
[align=right][size=1em][size=1em][root@baby-centOS ~]# cat /proc/meminfo
[size=1em]MemTotal: 3828868 kB
[size=1em]MemFree: 3599240 kB
[size=1em]Buffers: 16096 kB
[size=1em]Cached: 80956 kB
[size=1em]SwapCached: 0 kB
[size=1em]Active: 44676 kB
[size=1em]Inactive: 74332 kB
[size=1em]Active(anon): 22288 kB
[size=1em]Inactive(anon): 424 kB
[size=1em]Active(file): 22388 kB
[size=1em]Inactive(file): 73908 kB
[size=1em]......
[color=rgb(85, 85, 85)][font=宋体, "]3)通过dmicecode命令通过-t选项指定memory来查看[color=#555555][font=宋体, "][font=Consolas, "][size=1em]
[tr=none ][align=right][align=right][size=1em]1
[align=right][size=1em]2
[align=right][size=1em]3
[align=right][size=1em]4
[align=right][size=1em]5
[align=right][size=1em]6
[align=right][size=1em]7
[align=right][size=1em]8
[align=right][size=1em]9
[align=right][size=1em]10
[align=right][size=1em]11
[align=right][size=1em]12
[align=right][size=1em]13
[align=right][size=1em]14
[align=right][size=1em]15
[align=right][size=1em]16
[align=right][size=1em]17
[align=right][size=1em]18
[align=right][size=1em]19
[align=right][size=1em]20
[align=right][size=1em]21
[align=right][size=1em]22
[align=right][size=1em]23
[align=right][size=1em]24
[align=right][size=1em]25
[align=right][size=1em]26
[align=right][size=1em]27
[align=right][size=1em]28
[align=right][size=1em]29
[align=right][size=1em]30
[align=right][size=1em]31
[align=right][size=1em]32
[align=right][size=1em]33
[align=right][size=1em]34
[align=right][size=1em]35
[align=right][size=1em]36
[align=right][size=1em]37
[align=right][size=1em]38
[align=right][size=1em]39
[align=right][size=1em]40
[align=right][size=1em]41
[align=right][size=1em]42
[align=right][size=1em]43
[align=right][size=1em]44
[align=right][size=1em]45
[align=right][size=1em]46
[align=right][size=1em]47
[align=right][size=1em]48
[align=right][size=1em]49
[align=right][size=1em]50
[align=right][size=1em]51
[align=right][size=1em]52
[align=right][size=1em][size=1em][root@baby-centOS ~]# dmidecode -t memory
[size=1em]# dmidecode 2.11
[size=1em]SMBIOS 2.6 present.
[size=1em]Handle 0x001D, DMI type 16, 15 bytes
[size=1em]Physical Memory Array
[size=1em] Location: System Board Or Motherboard
[size=1em] Use: System Memory
[size=1em] Error Correction Type: None
[size=1em] Maximum Capacity: 16 GB
[size=1em] Error Information Handle: Not Provided
[size=1em] Number Of Devices: 2
[size=1em]Handle 0x001E, DMI type 17, 28 bytes
[size=1em]Memory Device
[size=1em] Array Handle: 0x001D
[size=1em] Error Information Handle: 0x0000
[size=1em] Total Width: Unknown
[size=1em] Data Width: Unknown
[size=1em] Size: No Module Installed
[size=1em] Form Factor: DIMM
[size=1em] Set: None
[size=1em] Locator: DIMM_A
[size=1em] Bank Locator: BANK 0
[size=1em] Type: Unknown
[size=1em] Type Detail: None
[size=1em] Speed: Unknown
[size=1em] Manufacturer: Not Specified
[size=1em] Serial Number: Not Specified
[size=1em] Asset Tag: Not Specified
[size=1em] Part Number: Not Specified
[size=1em] Rank: Unknown
[size=1em]Handle 0x001F, DMI type 17, 28 bytes
[size=1em]Memory Device
[size=1em] Array Handle: 0x001D
[size=1em] Error Information Handle: 0x0000
[size=1em] Total Width: 64 bits
[size=1em] Data Width: 64 bits
[size=1em] Size: 4096 MB
[size=1em] Form Factor: SODIMM
[size=1em] Set: None
[size=1em] Locator: DIMM_B
[size=1em] Bank Locator: BANK 2
[size=1em] Type: DDR3
[size=1em] Type Detail: Synchronous
[size=1em] Speed: 1333 MHz
[size=1em] Manufacturer: 80CE
[size=1em] Serial Number: 21255F39
[size=1em] Asset Tag: 01112100
[size=1em] Part Number: M471B5273DH0-CH9
[size=1em] Rank: Unknown
[color=rgb(85, 85, 85)][font=宋体, "]上面显示了最大支持的内存大小:16G,一共有两个内存插槽,用了一个。以及内存的详细信息,包括内存类型,位宽,大小,频率.......
[color=rgb(85, 85, 85)][font=宋体, "]
[color=rgb(85, 85, 85)][font=宋体, "]磁盘[color=#555555][font=宋体, "][font=Consolas, "][size=1em]
[tr=none ][align=right][align=right][size=1em]1
[align=right][size=1em]2
[align=right][size=1em]3
[align=right][size=1em]4
[align=right][size=1em]5
[align=right][size=1em]6
[align=right][size=1em]7
[align=right][size=1em]8
[align=right][size=1em]9
[align=right][size=1em]10
[align=right][size=1em]11
[align=right][size=1em]12
[align=right][size=1em]13
[align=right][size=1em]14
[align=right][size=1em][size=1em][root@baby-centOS ~]# lsblk
[size=1em]NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
[size=1em]sda 8:0 0 465.8G 0 disk
[size=1em]├─sda1 8:1 0 200M 0 part /boot
[size=1em]├─sda2 8:2 0 30G 0 part /usr
[size=1em]├─sda3 8:3 0 5G 0 part /
[size=1em]├─sda4 8:4 0 1K 0 part
[size=1em]├─sda5 8:5 0 50G 0 part /data
[size=1em]├─sda6 8:6 0 30G 0 part /usr/local
[size=1em]├─sda7 8:7 0 20G 0 part /var
[size=1em]├─sda8 8:8 0 10G 0 part /home
[size=1em]├─sda9 8:9 0 10G 0 part /tmp
[size=1em]└─sda10 8:10 0 4G 0 part [SWAP]
[size=1em]sr0 11:0 1 1024M 0 rom
[color=rgb(85, 85, 85)][font=宋体, "]可以看到各个分区的大小及挂载情况,比较直观,若要观察某个分区上的文件系统情况,可使用tune2fs -l /dev/sdax,当然这个不是硬件级别的查看了。[color=#555555][font=宋体, "][font=Consolas, "][size=1em]
[tr=none ][align=right][align=right][size=1em]1
[align=right][size=1em]2
[align=right][size=1em]3
[align=right][size=1em]4
[align=right][size=1em]5
[align=right][size=1em]6
[align=right][size=1em]7
[align=right][size=1em]8
[align=right][size=1em]9
[align=right][size=1em]10
[align=right][size=1em]11
[align=right][size=1em]12
[align=right][size=1em][size=1em][root@baby-centOS ~]# tune2fs -l /dev/sda5
[size=1em]tune2fs 1.41.12 (17-May-2010)
[size=1em]Filesystem volume name:
[size=1em]Last mounted on:
[size=1em]Filesystem UUID: 273a5dca-3d41-47e0-b48b-ebd7a1ae98ed
[size=1em]Filesystem magic number: 0xEF53
[size=1em]Filesystem revision #: 1 (dynamic)
[size=1em]Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
[size=1em]Filesystem flags: signed_directory_hash
[size=1em]Default mount options: user_xattr acl
[size=1em]Filesystem state: clean
[size=1em]......
[color=rgb(85, 85, 85)][font=宋体, "]若要查看更详细的硬盘和分区信息:[color=#555555][font=宋体, "][font=Consolas, "][size=1em]
[tr=none ][align=right][align=right][size=1em]1
[align=right][size=1em]2
[align=right][size=1em]3
[align=right][size=1em]4
[align=right][size=1em]5
[align=right][size=1em]6
[align=right][size=1em]7
[align=right][size=1em]8
[align=right][size=1em]9
[align=right][size=1em]10
[align=right][size=1em]11
[align=right][size=1em]12
[align=right][size=1em]13
[align=right][size=1em]14
[align=right][size=1em]15
[align=right][size=1em]16
[align=right][size=1em]17
[align=right][size=1em]18
[align=right][size=1em]19
[align=right][size=1em]20
[align=right][size=1em]21
[align=right][size=1em][size=1em][root@baby-centOS ~]# fdisk -l
[size=1em]Disk /dev/sda: 500.1 GB, 500107862016 bytes
[size=1em]255 heads, 63 sectors/track, 60801 cylinders
[size=1em]Units = cylinders of 16065 * 512 = 8225280 bytes
[size=1em]Sector size (logical/physical): 512 bytes / 512 bytes
[size=1em]I/O size (minimum/optimal): 512 bytes / 512 bytes
[size=1em]Disk identifier: 0x00032c3d
[size=1em] Device Boot Start End Blocks Id System
[size=1em]/dev/sda1 * 1 26 204800 83 Linux
[size=1em]Partition 1 does not end on cylinder boundary.
[size=1em]/dev/sda2 26 3942 31457280 83 Linux
[size=1em]/dev/sda3 3942 4595 5242880 83 Linux
[size=1em]/dev/sda4 4595 60802 451480576 5 Extended
[size=1em]/dev/sda5 4595 11122 52428800 83 Linux
[size=1em]/dev/sda6 11123 15039 31457280 83 Linux
[size=1em]/dev/sda7 15039 17650 20971520 83 Linux
[size=1em]/dev/sda8 17650 18955 10485760 83 Linux
[size=1em]/dev/sda9 18955 20261 10485760 83 Linux
[size=1em]/dev/sda10 20261 20783 4194304 82 Linux swap / Solaris
[color=rgb(85, 85, 85)][font=宋体, "]查看各分区的使用情况:
[color=#555555][font=宋体, "][font=Consolas, "][size=1em]
[tr=none ][align=right][align=right][size=1em]1
[align=right][size=1em]2
[align=right][size=1em]3
[align=right][size=1em]4
[align=right][size=1em]5
[align=right][size=1em]6
[align=right][size=1em]7
[align=right][size=1em]8
[align=right][size=1em]9
[align=right][size=1em]10
[align=right][size=1em]11
[align=right][size=1em][size=1em][root@baby-centOS ~]# df -h
[size=1em]Filesystem Size Used Avail Use% Mounted on
[size=1em]/dev/sda3 5.0G 377M 4.4G 8% /
[size=1em]tmpfs 1.9G 0 1.9G 0% /dev/shm
[size=1em]/dev/sda1 194M 31M 153M 17% /boot
[size=1em]/dev/sda5 50G 775M 46G 2% /data
[size=1em]/dev/sda8 9.9G 151M 9.2G 2% /home
[size=1em]/dev/sda9 9.9G 151M 9.2G 2% /tmp
[size=1em]/dev/sda2 30G 5.0G 24G 18% /usr
[size=1em]/dev/sda6 30G 173M 28G 1% /usr/local
[size=1em]/dev/sda7 20G 2.3G 17G 12% /var
[color=rgb(85, 85, 85)][font=宋体, "]
[color=rgb(85, 85, 85)][font=宋体, "]网卡[color=rgb(85, 85, 85)][font=宋体, "]通过lspci查看pci设备,通过管道过滤就可以找到网卡信息
[color=#555555][font=宋体, "][font=Consolas, "][size=1em]
[tr=none ][align=right][align=right][size=1em]1
[align=right][size=1em]2
[align=right][size=1em]3
[align=right][size=1em][size=1em][root@baby-centOS ~]# lspci | grep -i net
[size=1em]05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 05)
[size=1em]09:00.0 Network controller: Intel Corporation Centrino Wireless-N 1030 [Rainbow Peak] (rev 34)
[color=rgb(85, 85, 85)][font=宋体, "]Ethernet controller是有线网卡,Network controller是无线网卡。[color=rgb(85, 85, 85)][font=宋体, "]
[color=rgb(85, 85, 85)][font=宋体, "]可以用ethtool命令查看某个网络接口的详细信息
[color=#555555][font=宋体, "][font=Consolas, "][size=1em]
[tr=none ][align=right][align=right][size=1em]1
[align=right][size=1em]2
[align=right][size=1em]3
[align=right][size=1em]4
[align=right][size=1em]5
[align=right][size=1em]6
[align=right][size=1em]7
[align=right][size=1em]8
[align=right][size=1em]9
[align=right][size=1em]10
[align=right][size=1em]11
[align=right][size=1em]12
[align=right][size=1em]13
[align=right][size=1em]14
[align=right][size=1em]15
[align=right][size=1em]16
[align=right][size=1em]17
[align=right][size=1em]18
[align=right][size=1em]19
[align=right][size=1em]20
[align=right][size=1em]21
[align=right][size=1em]22
[align=right][size=1em]23
[align=right][size=1em]24
[align=right][size=1em]25
[align=right][size=1em]26
[align=right][size=1em][size=1em][root@baby-centOS ~]# ethtool p1p1
[size=1em]Settings for p1p1:
[size=1em] Supported ports: [ TP MII ]
[size=1em] Supported link modes: 10baseT/Half 10baseT/Full
[size=1em] 100baseT/Half 100baseT/Full
[size=1em] Supported pause frame use: No
[size=1em] Supports auto-negotiation: Yes
[size=1em] Advertised link modes: 10baseT/Half 10baseT/Full
[size=1em] 100baseT/Half 100baseT/Full
[size=1em] Advertised pause frame use: Symmetric Receive-only
[size=1em] Advertised auto-negotiation: Yes
[size=1em] Link partner advertised link modes: 10baseT/Half 10baseT/Full
[size=1em] 100baseT/Half 100baseT/Full
[size=1em] Link partner advertised pause frame use: Symmetric
[size=1em] Link partner advertised auto-negotiation: Yes
[size=1em] Speed: 100Mb/s
[size=1em] Duplex: Full
[size=1em] Port: MII
[size=1em] PHYAD: 0
[size=1em] Transceiver: internal
[size=1em] Auto-negotiation: on
[size=1em] Supports Wake-on: pumbg
[size=1em] Wake-on: g
[size=1em] Current message level: 0x00000033 (51)
[size=1em] drv probe ifdown ifup
[size=1em] Link detected: yes
[color=rgb(85, 85, 85)][font=宋体, "]加上-i可查看网卡驱动:
[color=#555555][font=宋体, "][font=Consolas, "][size=1em]
[tr=none ][align=right][align=right][size=1em]1
[align=right][size=1em]2
[align=right][size=1em]3
[align=right][size=1em]4
[align=right][size=1em]5
[align=right][size=1em]6
[align=right][size=1em]7
[align=right][size=1em]8
[align=right][size=1em]9
[align=right][size=1em]10
[align=right][size=1em][size=1em][root@baby-centOS ~]# ethtool -i p1p1
[size=1em]driver: r8169 #这个就是驱动程序
[size=1em]version: 2.3LK-NAPI
[size=1em]firmware-version: rtl_nic/rtl8105e-1.fw
[size=1em]bus-info: 0000:05:00.0
[size=1em]supports-statistics: yes
[size=1em]supports-test: no
[size=1em]supports-eeprom-access: no
[size=1em]supports-register-dump: yes
[size=1em]supports-priv-flags: no
[color=rgb(85, 85, 85)][font=宋体, "]若要查看所有的网络接口(ip link show,ifocnfig -a):[color=#555555][font=宋体, "][font=Consolas, "][size=1em]
[tr=none ][align=right][align=right][size=1em]1
[align=right][size=1em]2
[align=right][size=1em]3
[align=right][size=1em]4
[align=right][size=1em]5
[align=right][size=1em]6
[align=right][size=1em]7
[align=right][size=1em][size=1em][root@baby-centOS ~]# ip link show
[size=1em]1: lo:
[size=1em] link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
[size=1em]2: p1p1:
[size=1em] link/ether 18:03:73:66:66:ee brd ff:ff:ff:ff:ff:ff
[size=1em]3: wlan0:
[size=1em] link/ether ac:72:89:04:ea:84 brd ff:ff:ff:ff:ff:ff
[color=#555555][font=宋体, "][font=Consolas, "][size=1em]
[tr=none ][align=right][align=right][size=1em]1
[align=right][size=1em]2
[align=right][size=1em]3
[align=right][size=1em]4
[align=right][size=1em]5
[align=right][size=1em][size=1em][root@baby-centOS ~]# ifconfig
[size=1em]br0 Link encap:Ethernet HWaddr 18:03:73:66:66:EE
[size=1em] inet addr:192.168.0.165 Bcast:192.168.0.255 Mask:255.255.255.0
[size=1em] inet6 addr: fe80::1a03:73ff:fe66:66ee/64 Scope:Link
[size=1em].......
[color=rgb(85, 85, 85)][font=宋体, "]查看所有pci设备信息(-v[详细信息],-vv[更详细信息]):[color=#555555][color=#555555][font=宋体, "][font=Consolas, "][size=1em]
[tr=none ][align=right][align=right][size=1em]1
[align=right][size=1em]2
[align=right][size=1em]3
[align=right][size=1em]4
[align=right][size=1em]5
[align=right][size=1em]6
[align=right][size=1em]7
[align=right][size=1em]8
[align=right][size=1em]9
[align=right][size=1em]10
[align=right][size=1em]11
[align=right][size=1em]12
[align=right][size=1em]13
[align=right][size=1em]14
[align=right][size=1em]15
[align=right][size=1em]16
[align=right][size=1em]17
[align=right][size=1em]18
[align=right][size=1em]19
[align=right][size=1em]20
[align=right][size=1em]21
[align=right][size=1em][size=1em][root@baby-centOS ~]# lspci
[size=1em]00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09) #主板芯片
[size=1em]00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
[size=1em]00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
[size=1em]00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
[size=1em]00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05) #usb控制器
[size=1em]00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05) #声卡
[size=1em]00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5) #pci插槽
[size=1em]00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b5)
[size=1em]00:1c.3 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4 (rev b5)
[size=1em]00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b5)
[size=1em]00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b5)
[size=1em]00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)
[size=1em]00:1f.0 ISA bridge: Intel Corporation HM67 Express Chipset Family LPC Controller (rev 05)
[size=1em]00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller (rev 05) #硬盘接口
[size=1em]00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05)
[size=1em]01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 525M] (rev a1) #显卡
[size=1em]01:00.1 Audio device: NVIDIA Corporation GF108 High Definition Audio Controller (rev a1) #声卡
[size=1em]05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 05) #有线网卡
[size=1em]09:00.0 Network controller: Intel Corporation Centrino Wireless-N 1030 [Rainbow Peak] (rev 34) #无线网卡
[size=1em]0b:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04)
[color=#555555][font=宋体, "][font=Consolas, "][size=1em]
[tr=none ][align=right][align=right][size=1em]1
[align=right][size=1em]2
[align=right][size=1em]3
[align=right][size=1em]4
[align=right][size=1em]5
[align=right][size=1em]6
[align=right][size=1em]7
[align=right][size=1em]8
[align=right][size=1em]9
[align=right][size=1em]10
[align=right][size=1em]11
[align=right][size=1em]12
[align=right][size=1em][size=1em][root@baby-centOS ~]# dmidecode -t af
[size=1em]Invalid type keyword: af
[size=1em]Valid type keywords are:
[size=1em] bios
[size=1em] system
[size=1em] baseboard
[size=1em] chassis
[size=1em] processor
[size=1em] memory
[size=1em] cache
[size=1em] connector
[size=1em] slot
[color=rgb(85, 85, 85)][font=宋体, "]也可以通过dmidecode命令指定上面的这些硬件来查看相关信息!!!