2020-03-24

hard-info

 
1. Windows下查看硬件信息
2. Linux系统查看硬件信息GUI
3. Linux命令行查看硬件设备
 3.1 查看PCI设备
 3.2 查看CPU
 3.3 查看内存
 3.4 查看显卡
 3.5 查看硬盘
 3.6 查看网络
 3.7 综合

1. Windows下查看硬件信息

cpu-z 查看CPU,GPU,MB,RAM等主要部件。
https://www.cpuid.com/softwares.html

更加详细专业的有: AIDA64...
http://www.aida64.com/downloads/latesta64xe
安装后有1个月试用期。可以导出非常详细的系统信息,比如下面这样:
https://szosoft.blogspot.com/p/tom-pc2008.html

2. Linux系统查看硬件信息GUI

使用命令或快捷方式打开:
$ lstopo
打开后还有快捷键提示,如下图,可以看到2个硬盘分别接入那个地址,网卡使用那个PCI地址。

$ sudo hardinfo
可以看到硬件及操作系统软件的详细信息,如下图,可以看到这个x1的PCIe最大速率2.5GT/s

$ sudo lshw -X
打开若不显示任何内容,点一下Refresh刷新即可,如下图,可以看到USB的版本及速率

lshw的多种输出格式
$ lshw –help
 -html   output hardware tree as HTML 将硬件树输出为HTML
 -xml    output hardware tree as XML 将硬件树输出为XML
 -short  output hardware paths    输出硬件路径
 -businfo output bus information   输出总线信息
 -X      use graphical interface  使用图形界面
$ sudo lshw -html > lshw-html.html

3. Linux命令行查看硬件设备

3.1 查看PCI设备

$ lspci          PCI设备列表,第一列就是设备的[ids]
$ lspci -tvnn    PCI设备树状列表,可以看到PCIe端口被那些设备占用$ lspci -vvvnn -s [ids] 根据上面列表的[ids]查询详细信息
$ lsusb.py -i            查看USB端口及设备,可以看到USB版本及速率,电流$ ls -l /dev/disk/by-path/ 查看硬盘使用了那些端口
根据上面这些查询就能列出类似如下这张PCI设备的整体列表了
$ lspci简述$ lspci -tvnn$ lspci -vvvnn -s [ids] // 00:02.0
[ids]nameIntel Corporationtype补充树状显示pinIRQKernel driverKernel modulesBridgeCtl:
00:00.0Host bridge:Mobile PM965/GM965/GL960 Memory Controller HubHostbridge



intel_agp
00:02.0VGA compatible controller:Mobile GM965/GL960 Integrated Graphics Controller (primary)VGA板载显卡
A16i915i915
00:02.1Display controller:Mobile GM965/GL960 Integrated Graphics Controller (secondary)Display






00:19.0Ethernet controller:82562GT 10/100 Network ConnectionEthernet以太网卡
A28e1000ee1000e
10:00.0Network controller:PRO/Wireless 3945ABG [Golan] Network ConnectionWireless无线网卡-- PCIe Port 2A30iwl3945iwl3945
00:1b.0Audio device:82801H (ICH8 Family) HD Audio ControllerAudio声卡
A29snd_hda_intelsnd_hda_intel
00:1e.0PCI bridge:82801 Mobile PCI BridgePCIbridge02 --



Parity- SERR+ NoISA+ VGA- VGA16- MAbort- >Reset- FastB2B- PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
00:1c.0PCI bridge:82801H (ICH8 Family) PCI Express Port 1PCIePort 1 bridge08 --A24pcieport
00:1c.1PCI bridge:82801H (ICH8 Family) PCI Express Port 2PCIePort 2 bridge10 WirelessB25pcieport
00:1c.4PCI bridge:82801H (ICH8 Family) PCI Express Port 5PCIePort 5 bridge28 USB3.0A26pcieport
00:1a.0USB controller:82801H (ICH8 Family) USB UHCI Controller #4USB#4usb3A16uhci_hcduhci_hcd
00:1a.7USB controller:82801H (ICH8 Family) USB2 EHCI Controller #2USB2#2usb1C18ehci-pciehci-pci
00:1d.0USB controller:82801H (ICH8 Family) USB UHCI Controller #1USB#1usb4A20uhci_hcduhci_hcd
00:1d.1USB controller:82801H (ICH8 Family) USB UHCI Controller #2USB#2usb5B21uhci_hcduhci_hcd
00:1d.2USB controller:82801H (ICH8 Family) USB UHCI Controller #3USB#3usb6C18uhci_hcduhci_hcd
00:1d.7USB controller:82801H (ICH8 Family) USB2 EHCI Controller #1USB2#1usb2 SDA20ehci-pciehci-pci
28:00.0USB controller:Renesas Technology Corp.
uPD720202 USB 3.0 Host Controller
USB 3.0ExpressCardusb7,8 PCIe P5A16xhci_hcdxhci_hcd
00:1f.0ISA bridge:82801HM (ICH8M) LPC Interface ControllerISAbridge


lpc_ichlpc_ich
00:1f.1IDE interface:82801HM/HEM (ICH8M/ICH8M-E) IDE ControllerIDEHDD$ ls -l /dev/disk/by-path/A16ata_piixata_piix, pata_acpi, ata_generic
00:1f.2SATA controller:82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode]SATASSDB27ahciahci

3.2 查看CPU

$ cat /proc/cpuinfo | grep model\ name
model name: Intel(R) Core(TM)2 Duo CPU  T8300  @ 2.40GHz
model name: Intel(R) Core(TM)2 Duo CPU  T8300  @ 2.40GHz

3.3 查看内存

$ cat /proc/meminfo | grep MemTotal
MemTotal:        8146664 kB

3.4 查看显卡

$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (primary) (rev 0c)
找到显卡的ids,再查看详细内容
$ lspci -vvvnn -s 00:02.0
查看详细内容,除了用上面的ids,也可以用简单的关键字VGA
$ lspci -vnn | grep VGA -A 12

$ sudo lshw -c video | grep configuration
       configuration: driver=i915 latency=0
       configuration: latency=0

使用 glxinfo 命令查看 OpenGL 的详细信息:
$ glxinfo |grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) 965GM
OpenGL version string: 2.1 Mesa 19.3.4
OpenGL shading language version string: 1.20
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 2.0 Mesa 19.3.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
OpenGL ES profile extensions:
$ pacman -Qo glxinfo
/usr/bin/glxinfo is owned by mesa-demos 8.4.0-2
  •   Arch 下安装 pacman S mesa-demos
  •   Ubuntu下安装 apt install mesa-utils
Mesa是一个开源的3D计算机图形库,它提供了一个通用的OpenGL实现,用于在多个平台上渲染三维图形。
http://www.mesa3d.org/

和GPU 相关的 Linux 命令
$ glxinfo | grep rendering 查看3D加速是否有效
$ glxgears -info         Testing
$ nvidia-smi             Nvidia自带一个命令行工具可以查看显存的使用情况
$ watch -n 10 nvidia-smi 周期性的输出显卡的使用情况,可以用watch指令实现
$ grep -i --color vga /var/log/Xorg.0.log
https://zhuanlan.zhihu.com/p/37640419

3.5 查看硬盘

$ lsblk -f
# blkid
df(disk free)
du(disk usage)

3.6 查看网络

ip, iw...
https://szosoft.blogspot.com/2020/02/ip-show.html
https://szosoft.blogspot.com/2020/03/busybox.html#205
https://www.cnblogs.com/sztom/articles/10764994.html

3.7 综合


设备\命令$ lshw -c [class]# dmidecode -t [type]$ lspci -s [ids]$ cat /proc/更多命令
CPUprocessorprocessor-cpuinfo$ lscpu
内存memorymemory-meminfo$ lsmem
显卡display, video-[ids]
$ lsgpu
声卡multimedia-[ids]./asound/
系统systemsystem


总线bus, bridge-[ids]./bus/$ lspci
网卡network-[ids]

存储storage-[ids]./scsi/lsblk, blkid,
Du, df, fdisk
可用项:$ lshw -short输错类型便会列出可用项lspci 返回的第一列



没有评论:

发表评论

Diode

导航 (返回顶部) 1. Diode 1.1 Diode 概述 1.2 肖克利二极管方程 1.3 缩写 Abbreviations 2. 主要功能 2.1 单向电流 (Unidirectional current flow) 2.2 阈值电压 (Threshold...