linux中怎么linux 查看硬件故障信息

Linux——查看系统硬件信息
Linux——查看系统硬件信息
前言:下面实验的信息是我在几台配置不同服
务器的测试结果,操作系统分别为Red Hat Enterprise Linux Server release 6.0
(Santiago)、Ubuntu
前言:下面实验的信息是我在几台配置不同服
务器的测试结果,操作系统分别为Red Hat Enterprise Linux Server release 6.0
(Santiago)、Ubuntu
7.10。所以你看到我实验信息的不同时,请不要大惊小怪。而且有些命令也不是所有Linux操作系统都支持(例如在Ubuntu
7.10就不支持dmesg),下面的内容是收集整理的,如有错误或新的方法,也会不停整理、更新。
一:查看CPU信息
1、CPU详细信息
方法1:CPU信息一般保存在proc目录下的cpuinfo文件中。如下所示。
[root@DB-Server ~]# more /proc/cpuinfo
: AuthenticAMD
cpu family
model name
: AMD Athlon(tm) II X3 450 Processor
cache size
physical id
initial apicid
fpu_exception
cpuid level
: fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat
pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm
3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid pni monitor cx16 po
pcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefet
ch osvw ibs skinit wdt npt lbrv svm_lock nrip_save
: 1024 4K pages
clflush size
cache_alignment : 64
address sizes
: 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate
: AuthenticAMD
cpu family
model name
: AMD Athlon(tm) II X3 450 Processor
--注意:AMD的CPU的频率会调整
cache size
physical id
initial apicid
fpu_exception
cpuid level
: fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext
fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy
svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt npt lbrv svm_lock nrip_save
: 1024 4K pages
clflush size
cache_alignment : 64
address sizes
: 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate
: AuthenticAMD
cpu family
model name
: AMD Athlon(tm) II X3 450 Processor
cache size
physical id
initial apicid
fpu_exception
cpuid level
: fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext
fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy
svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt npt lbrv svm_lock nrip_save
: 1024 4K pages
clflush size
cache_alignment : 64
address sizes
: 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate
方法2:使用dmesg命令(注意CPU应为大写)[root@m1 ~]$dmesg | grep CPU
SMP: Allowing 8 CPUs, 5 hotplug CPUs
NR_CPUS:4096 nr_cpumask_bits:8 nr_cpu_ids:8 nr_node_ids:1
PERCPU: Embedded 31 pages/cpu @ffff s9 d2
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 0
mce: CPU supports 6 MCE banks
CPU0: AMD Athlon(tm) II X3 450 Processor stepping 03
Brought up 3 CPUs
processor LNXCPU:00: registered as cooling_device0
processor LNXCPU:01: registered as cooling_device1
processor LNXCPU:02: registered as cooling_device2
方法3:使用dmidecode查看CPU信息[root@DB-Server ~]# dmidecode -t processor
# dmidecode 2.10
SMBIOS 2.4 present.
Handle 0x0004, DMI type 4, 35 bytes
Processor Information
Socket Designation: Socket M2
Type: Central Processor
Family: Athlon
Manufacturer: AMD
ID: 53 0F 10 00 FF FB 8B 17
Signature: Family 16, Model 5, Stepping 3
FlagsPGE (Page global enable)
FPU (Floating-point unit on-chip)
VME (Virtual mode extension)
DE (Debugging extension)
PSE (Page size extension)
TSC (Time stamp counter)
MSR (Model specific registers)
PAE (Physical address extension)
MCE (Machine check exception)
CX8 (CMPXCHG8 instruction supported)
APIC (On-chip APIC hardware supported)
SEP (Fast system call)
MTRR (Memory type range registers)MCA (Machine check architecture)
CMOV (Conditional move instruction supported)
PAT (Page attribute table)
PSE-36 (36-bit page size extension)
CLFSH (CLFLUSH instruction supported)
MMX (MMX technology supported)
FXSR (Fast floating-point save and restore)
SSE (Streaming SIMD extensions)
SSE2 (Streaming SIMD extensions 2)
HTT (Hyper-threading technology)
Version: AMD Athlon(tm) II X3 450 Processor
Voltage: 1.6 V
External Clock: 200 MHz
Max Speed: 3000 MHz
Current Speed: 3200 MHz
Status: Populated, Enabled
Upgrade: Socket 754
L1 Cache Handle: 0x0008
L2 Cache Handle: 0x000A
L3 Cache Handle: Not Provided
Serial Number:
Asset Tag:
Part Number:
2、查看物理CPU个数[root@DB-Server ~]# cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l
[root@DB-Server ~]# dmesg | grep CPU | grep "Physical Processor ID" | uniq | wc -l
3、查看逻辑CPU个数[root@DB-Server ~]# cat /proc/cpuinfo | grep "processor" | wc -l
[root@DB-Server ~]# dmesg | grep "CPU" | grep "processor" | wc -l
4、查看CPU是几核的[root@DB-Server ~]# cat /proc/cpuinfo | grep "cores" | uniq
cpu cores : 3
5、查看CPU的主频[root@DB-Server ~]# cat /proc/cpuinfo | grep MHz | uniq
cpu MHz : 800.000
[root@DB-Server ~]# cat /proc/cpuinfo | grep MHz
cpu MHz : 800.000
cpu MHz : 800.000
cpu MHz : 800.000
6、查看CPU型号信息[root@DB-Server ~]# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
3 AMD Athlon(tm) II X3 450 Processor
7、通过physical id 可以判断物理CPU个数[root@DB-Server ~]# cat /proc/cpuinfo | grep physical | uniq -c
physical id : 0
address sizes : 48 bits physical, 48 bits virtual
physical id : 0
address sizes : 48 bits physical, 48 bits virtual
physical id : 0
address sizes : 48 bits physical, 48 bits virtual
8、查看CPU是否支持64位运算[root@DB-Server ~]# cat /proc/cpuinfo | grep flags | grep 'lm' | wc -l
结果大于0,说明支持64位运算,lm指long mode 支持lm则是64bit
[root@DB-Server ~]# getconf LONG_BIT
etl:/home/etl/$getconf LONG_BIT(另外一台服务器)
说明当前CPU运行在32位模式下,当不代表CPU不支持64位
二、 查看内存信息[root@DB-Server ~]# more /proc/meminfo
7541288 kB
6433572 kB
SwapCached:
5489928 kB
1346252 kB
Active(anon):
5193596 kB
Inactive(anon):
1015024 kB
Active(file):
Inactive(file):
Unevictable:
SwapTotal:
9781240 kB
9430432 kB
Writeback:
AnonPages:
3878064 kB
5992240 kB
SReclaimable:
SUnreclaim:
KernelStack:
PageTables:
NFS_Unstable:
WritebackTmp:
CommitLimit:
Committed_AS:
6943792 kB
VmallocTotal:
VmallocUsed:
VmallocChunk:
HardwareCorrupted:
AnonHugePages:
HugePages_Total:
HugePages_Free:
HugePages_Rsvd:
HugePages_Surp:
Hugepagesize:
DirectMap4k:
DirectMap2M:
2611200 kB
DirectMap1G:
5242880 kB
你也可以用free命令查看[root@DB-Server ~]# free -k
-/+ buffers/cache:
[root@DB-Server ~]# free -m
-/+ buffers/cache:
[root@DB-Server ~]# free -g
-/+ buffers/cache:
查看内存条型号[root@DB-Server ~]# dmidecode -t memory
# dmidecode 2.10
SMBIOS 2.4 present.
Handle 0x0005, DMI type 5, 20 bytes
Memory Controller Information
Error Detecting Method: 64-bit ECC
Error Correcting Capabilities:
Supported Interleave: One-way Interleave
Current Interleave: One-way Interleave
Maximum Memory Module Size: 4096 MB
Maximum Total Memory Size: 8192 MB
Supported Speeds:
Supported Memory Types:
Memory Module Voltage: 2.9 V
Associated Memory Slots: 2
Enabled Error Correcting Capabilities:
Handle 0x0006, DMI type 6, 12 bytes
Memory Module Information
Socket Designation: A0
Bank Connections: 1
Current Speed: 53 ns
Type: Other Unknown EDO
Installed Size: 4096 MB (Double-bank Connection)
Enabled Size: 4096 MB (Double-bank Connection)
Error Status: OK
Handle 0x0007, DMI type 6, 12 bytes
Memory Module Information
Socket Designation: A1
Bank Connections: 2
Current Speed: 53 ns
Type: Other Unknown EDO
Installed Size: 4096 MB (Double-bank Connection)
Enabled Size: 4096 MB (Double-bank Connection)
Error Status: OK
Handle 0x0020, DMI type 16, 15 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 8 GB
--支持的最大内存容量
Error Information Handle: Not Provided
Number Of Devices: 2
--内存插槽数
Handle 0x0021, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x0020
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 4096 MB
--内存的大小
Form Factor: DIMM
Locator: A0
Bank Locator: Bank0/1
Type: Unknown
Type Detail: None
Speed: 1333 MHz
--内存的频率
Manufacturer: None
--制造厂商
Serial Number: None
Asset Tag: None
Part Number: None
Handle 0x0022, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x0020
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 4096 MB
Form Factor: DIMM
Locator: A1
Bank Locator: Bank2/3
Type: Unknown
Type Detail: None
Speed: 1333 MHz
Manufacturer: None
Serial Number: None
Asset Tag: None
Part Number: None
三:查看磁盘信息 [etl@DB-Server proc]$ cat /proc/diskstats
0 ram0 0 0 0 0 0 0 0 0 0 0 0
1 ram1 0 0 0 0 0 0 0 0 0 0 0
2 ram2 0 0 0 0 0 0 0 0 0 0 0
3 ram3 0 0 0 0 0 0 0 0 0 0 0
4 ram4 0 0 0 0 0 0 0 0 0 0 0
5 ram5 0 0 0 0 0 0 0 0 0 0 0
6 ram6 0 0 0 0 0 0 0 0 0 0 0
7 ram7 0 0 0 0 0 0 0 0 0 0 0
8 ram8 0 0 0 0 0 0 0 0 0 0 0
9 ram9 0 0 0 0 0 0 0 0 0 0 0
10 ram10 0 0 0 0 0 0 0 0 0 0 0
11 ram11 0 0 0 0 0 0 0 0 0 0 0
12 ram12 0 0 0 0 0 0 0 0 0 0 0
13 ram13 0 0 0 0 0 0 0 0 0 0 0
14 ram14 0 0 0 0 0 0 0 0 0 0 0
15 ram15 0 0 0 0 0 0 0 0 0 0 0
0 loop0 0 0 0 0 0 0 0 0 0 0 0
1 loop1 0 0 0 0 0 0 0 0 0 0 0
2 loop2 0 0 0 0 0 0 0 0 0 0 0
3 loop3 0 0 0 0 0 0 0 0 0 0 0
4 loop4 0 0 0 0 0 0 0 0 0 0 0
5 loop5 0 0 0 0 0 0 0 0 0 0 0
6 loop6 0 0 0 0 0 0 0 0 0 0 0
7 loop7 0 0 0 0 0 0 0 0 0 0 0
0 sr0 0 0 0 0 0 0 0 0 0 0 0
36 0 62184
1 sda1 747 51
1 176 197 0 859 1022
2 sda2 644
826 99 0 71502
17 sdb1 37
454 46 0 71609
1 dm-1 240 010 0 22 2968950
[etl@DB-Server proc]$ df -m
Filesystem
Used Available Use% Mounted on
/dev/mapper/vg_localhost-lv_root
1% /dev/shm
/dev/mapper/vg_localhost-lv_home
[etl@DB-Server proc]$ more /proc/partitions
major minor
512000 sda1
9781248 dm-1
[root@DB-Server ~]# fdisk -l
Disk /dev/sda: 2000.4 GB, 6 bytes
heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xb5acb5ac
Device Boot
Partition 1 does not end on cylinder boundary.
Disk /dev/sdb: 2000.4 GB, 6 bytes
heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xccfbccfb
Device Boot
Disk /dev/dm-0: 53.7 GB,
heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x
Disk /dev/dm-0 doesn't contain a valid partition table
Disk /dev/dm-1: 10.0 GB,
heads, 63 sectors/track, 1217 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x
Disk /dev/dm-1 doesn't contain a valid partition table
Disk /dev/dm-2: 3936.6 GB, 6 bytes
heads, 63 sectors/track, 478592 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x
Disk /dev/dm-2 doesn't contain a valid partition table
[root@DB-Server ~]# lvscan
'/dev/vg_localhost/lv_root' [50.00 GiB] inherit
'/dev/vg_localhost/lv_home' [3.58 TiB] inherit
'/dev/vg_localhost/lv_swap' [9.33 GiB] inherit
[root@DB-Server ~]# pvscan
PV /dev/sda2
VG vg_localhost
lvm2 [1.82 TiB / 0
PV /dev/sdb1
VG vg_localhost
lvm2 [1.82 TiB / 0
Total: 2 [3.64 TiB] / in use: 2 [3.64 TiB] / in no VG: 0 [0
四:查看网卡信息
1. mii-tool 指令来查看网卡信息。它主要是用于配置网卡工作模式的指令,同时也可以用于查询、监控工作。
2. 直接输入dmesg可以看到开机检测到硬件信息
3. ethtool eth0 采用此命令查到网卡相关的技术指标 (不一定所有网卡支持都支持此命令)
4. more /etc/sysconfig/network-scripts/ifcfg-eth0 用这个可以看到网卡的信息
5. ifconfig
网卡配置文件
每一个网络介质都对应一个配置文件,超级用户可以通过这些配置文件来配置网卡
网卡配置文件存放在/etc/sysconfig/network-scripts/目录中
/etc/sysconfig/network-scripts/ifcfg-interface-name
设置文件ifcfg-interface-name包含了初始化接口所需的大部分周详信息,其中interface-name将根据网卡的类型和排序而不同,一般其名字为eth0、eth1、ppp0等,
其中eth表示以太(eth0)类型网卡,0表示第一块网卡、1表示第二块网卡,而ppp0则表示point-to-poirt protocol网络接口。在ifcfg文件中定义的各项目取决于接口类型。
DEVICE=name 其中name是物理设备名
IPADDR=addr 其中addr是IP地址
NETMASK=mask 其中mask是网络掩码值
NETWORK=addr 其中addr是网络地址
BROADCAST=addr 其中addr是广播地址
GATEWAY=addr 其中addr是网关地址
ONBOOT=answer 其中answer是yes(引导时激活设备)或no(引导时不激活设备)
USECTL=answer 其中answer是yes(非root用户能控制该设备)或no
BOOTPROTO=proto
[root@DB-Server ~]# ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
Transceiver: internal
Auto-negotiation: on
MDI-X: Unknown
Supports Wake-on: pg
Wake-on: d
Current message level: 0x)
Link detected: yes
ethtool -i eth0 加上-i查看网卡驱动
[root@DB-Server ~]# ethtool -i eth0
driver: ATL1C
version: 1.0.1.14
firmware-version: L1e
bus-info: .0
[root@DB-Server ~]# dmesg | grep eth0
atheros_eth .0: ATL1C: eth0 NIC Link is Up&100 Mbps Full Duplex&
[root@DB-Server ~]# more /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
IPADDR=172.20.32.97
NETMASK=255.255.248.0
GATEWAY=172.20.39.251
DNS1=172.20.0.11
ONBOOT=yes
HWADDR=50:e5:49:df:b0:8b
BOOTPROTO=none
TYPE=Ethernet
IPV6INIT=no
USERCTL=no
[root@DB-Server ~]# mii-tool
eth0: negotiated 100baseTx-FD, link ok
五:查看主板信息
[root@DB-Server ~]# dmidecode|more
查看Base Board Information信息:如下所示
Base Board Information
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: GA-78LMT-S2P
Version: x.x
Serial Number:
[root@DB-Server ~]# dmidecode -t 2
# dmidecode 2.10
SMBIOS 2.4 present.
Handle 0x0002, DMI type 2, 8 bytes
Base Board Information
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: GA-78LMT-S2P
Version: x.x
Serial Number:
[root@DB-Server ~]# dmidecode |grep -A16 "System Information$"
System Information
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: GA-78LMT-S2P
Serial Number:
UUID: 9-42FFFFFFFF
Wake-up Type: Power Switch
SKU Number:
Handle 0x0002, DMI type 2, 8 bytes
Base Board Information
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: GA-78LMT-S2P
Version: x.x
Serial Number:
六:查看显卡信息
[root@DB-Server ~]# lspci |grep VGA
01:05.0 VGA compatible controller: ATI Technologies Inc 760G [Radeon 3000]
用云栖社区APP,舒服~
【云栖快讯】云栖社区技术交流群汇总,阿里巴巴技术专家及云栖社区专家等你加入互动,老铁,了解一下?&&
是一款提供了现场可编程门阵列(FPGA)的计算实例,基于阿里云弹性计算框架,用户可以几分钟内...
支持MySQL、SQL Server、PostgreSQL、MongoDB、Redis等关系...
是将源站内容分发至全国所有的节点,缩短用户查看对象的延迟,提高用户访问网站的响应速度与网站的...
为您提供简单高效、处理能力可弹性伸缩的计算服务,帮助您快速构建更稳定、安全的应用,提升运维效...
阿里中间件云大使Linux 系统下查看硬件信息命令大全_Linux教程_Linux公社-Linux系统门户网站
你好,游客
Linux 系统下查看硬件信息命令大全
来源:Linux中国&
作者:Linux
有许多命令可以用来查看 Linux 系统上的硬件信息。有些命令只能够打印出像 CPU 和内存这一特定的硬件组件信息,另外一些命令可以查看多种硬件组件的信息。
这个教程可以带大家快速了解一下查看各种硬件设备的信息和配置详情的最常用的命令。
lscpu命令能够查看 CPU 和处理单元的信息。该命令没有任何其他选项或者别的功能。
运行该命令会看到下面输出:
hdd_info_lscpu
lspci是另一个命令行工具,可以用来列出所有的 PCI 总线,还有与 PCI 总线相连的设备的详细信息,比如 VGA 适配器、显卡、网络适配器、usb 端口、SATA 控制器等。
你可以看到类似下图的输出信息。
hdd_info_lspci
可以通过运行下面的命令来过滤出特定设备的信息:
lspci -v | grep "VGA" -A 12
运行上面的命令可以看到类似下图的关于显卡的信息。
hdd_info_lspci_vga
lshw是一个通用的工具,可以列出多种硬件单元的详细或者概要的信息,比如 CPU、内存、usb 控制器、硬盘等。lshw能够从各个&/proc&文件中提取出相关的信息。
lshw -short
通过运行上面的命令可以看到下面的信息。
hdd_info_lshw
通过运行下面的命令可以列出像硬盘和光驱等 scsi/sata 设备的信息:
会得到类似下面的输出。
hdd_info_lsscsi
lsusb命令能够列出 USB 控制器和与 USB 控制器相连的设备的详细信息。默认情况下,lsusb命令只打印出概要信息。可以通过使用-v参数打印每一个usb端口的详细信息。
可以看到下面输出。
hdd_info_lsusb
Inxi是一个 bash 脚本,能够从系统的多个来源和命令获取硬件信息,并打印出一个非技术人员也能看懂的友好的报告。
默认情况下, 上没有安装inxi。可以通过运行下面命令来安装Inxi:
sudoapt-get install inxi
安装完Inxi之后,通过运行下面命令能够得到硬件相关的信息:
能够得到类似下图的输出。
hdd_info_inxi
df命令能够列出不同分区的概要信息、挂载点、已用的和可用的空间。
可以在使用df命令的时候加上-H参数。
会得到下面的输出。
hdd_info_df
通过使用free命令可以查看系统中使用的、闲置的和 RAM 的总体数量。
会看到下面输出。
hdd_info_free
dmidecode命令与其他命令不同。该命令是从硬件中的 DMI 表中读取信息的。
要查看处理器的信息,运行下面命令:
sudo dmidecode -t processor
hdd_info_dmi_processor
要查看内存的信息,运行下面命令:
sudo dmidecode -t memory
hdd_info_dmi_memory
要查看 bios 的信息,运行下面命令:
sudo dmidecode -t bios
hdd_info_dmi_bios
hdparm命令可以用来显示像硬盘这样的 sata 设备的信息。
sudohdparm
可以看到下面的输出。
hdd_info_hdparm
每个命令都有不同的方式来获取硬件的信息。在查看特定的硬件信息的时候,可以尝试使用不同的方式。上面所有的命令行工具在大部分的 Linux 发行版本中都是可以使用的,可以很容易的从仓库中获取安装。
作者: 译者: 校对:
原创编译, 荣誉推出
本文永久更新链接地址:
相关资讯 & & &
   同意评论声明
   发表
尊重网上道德,遵守中华人民共和国的各项有关法律法规
承担一切因您的行为而直接或间接导致的民事或刑事法律责任
本站管理人员有权保留或删除其管辖留言中的任意内容
本站有权在网站内转载或引用您的评论
参与本评论即表明您已经阅读并接受上述条款linux中如何去查看显卡硬件的信息作者:课课家教育&http://www.kokojia.com点击数:15651发布时间: 08:19:11  关于的显卡是显示卡的简称。GPU是图形处理器。GPU的全称是GraphicProcessingUnit,中文翻译为&图形处理器&。一般GPU就是焊接在显卡上的,所以GPU就是显卡上的核心零部件,这就是它们的关系。GPU和显卡是GPU寄生在显卡上的关系。
  GPU是显示卡的&心脏&,也就相当于CPU在电脑中的作用,它决定了该显卡的档次和大部分性能,现在还没有出现GPU插在主板上的,因为GPU功耗很高,相信很多用户都会对这些概念有一点的混淆。
  专业上的解释图形处理器(GPU)又称视觉处理单元(VPU),它又称显示核心、视觉处理器、显示芯片,它是一种专门在个人电脑、工作站、游戏机和一些移动设备(如平板电脑、智能手机等)上运行绘图运算工作的微处理器。
  使用的时候需要安装相关的驱动才可以工作,用户如果要安装相应的显卡驱动程序让显卡正常工作,首先是必需要知道显卡厂商及其正确的型号。现在的大多数发行版,它都可以是检测出显卡品牌,但并不总能正确识别型号。因此我们可能需要手动查看显卡型号/序列号,下面将会是给大家演示一下在linux中如何查看显卡的型号等相关的信息。
  它和不一样,需要操作的命令有很多,这就是最大的不同点。
  怎样获取显卡硬件信息
  其实在Linux中目前有几个命令可以用来获取硬件信息,其中lspic命令行工具便可用来获取显卡的硬件信息。
  用户是可使用如下命令来获取系统上的显卡信息:
  lspci-vnn|grepVGA-A12
  执行该命令之后,可以看到下图的信息所示:
  看到图中所示的信息,第一行输出便有硬件厂商、型号名称/序列号和PCIID。图中所示的,其中冒号前半部分的8086表示厂商ID(这里是Intel),后半部分0416表示PCIID,表示用于指示图形单元模型。
  除此之外,还可以使用lshw命令来获取上述信息:
  lshw-Cdisplay
  执行该命令之后,可以看到下图的信息所示:
  查看当前使用的显卡驱动
  要查看当前上所使用的显卡驱动名称,同样可以使用lshw命令,但是需要加的命令符号就曾多了
  sudolshw-cvideo|grepconfiguration
  在上图中可以看到输出的显卡驱动名称有两条,其中一条为driver=i915,
  实际上我们则可以使用如下命令来检查显卡驱动的详情:
  modinfoi915
  如何检查硬件加速
  可以启用基于硬件的3D加速可以在绘制3D图形时直接使用硬件进行处理,这也会是大大加快了3D的速度。要使用该功能,必需显卡支持硬件加速并安装了正确的驱动。
  使用glxinfo命令来获查看得OpenGL的详细信息:
  glxinfo|grepOpenGL
  结语:相信看完本文的你,肯定会觉得linux系统非常的高大上,操起来也比较麻烦一点,你会发现它的命令比windows复杂,这也就是它的魅力所在了。标签:赞(25)踩(0)分享到:上一篇:下一篇:最新教程热门教程评论()您需要登录后才可以评论请[][]最新评论暂无评论~系统/运维为你推荐推荐查看热门资讯热门图书}

我要回帖

更多关于 linux查看硬件设备 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信