最後更新: 2015-05-19
目錄
lspci
yum install pciutils
Usage: lspci [Opts]
lspci
.. 05:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd Device a80a
# 查看 Device 的 ClassID VendorID:DeviceID
lspci -n
... 05:00.0 0108: 144d:a80a
# Show only devices with specified bus:device.func
-s [[[[<domain>]:]<bus>]:][<device>][.[<func>]]
lspci -s 03:00.0
03:00.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 41)
# Show only devices with specified VendorID:DeviceID
lspci -d 144d:a80a
05:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd Device a80a
# 多一點資料
# Be verbose: -v, -vv, -vvv
lspci -v -s 03:00.0
03:00.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 41) (prog-if 01 [Subtractive decode]) Flags: bus master, fast devsel, latency 0, IRQ 4 Bus: primary=03, secondary=04, subordinate=04, sec-latency=32 Capabilities: [90] Power Management version 2 Capabilities: [a0] Subsystem: Gigabyte Technology Co., Ltd 82801 PCI Bridge
# 查看如何駁
# Show a tree-like diagram
lspci -t
-[0000:00]-+-00.0 +-02.0 +-03.0 +-14.0 +-16.0 +-1a.0 +-1c.0-[01]-- +-1c.2-[02]----00.0 +-1c.3-[03-04]----00.0-[04]-- +-1c.4-[05]----00.0 +-1d.0 +-1f.0 +-1f.2 \-1f.3
查看 Bus 的 PCIe Version
lspci -vv -s 05:00.0 | grep -i width
LnkCap: Port #0, Speed 16GT/s, Width x4, ASPM L1, Exit Latency L0s unlimited, L1 <64us LnkSta: Speed 5GT/s, Width x4, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
說明:
- LnkCap: 裝置能提供的最高頻寬
- LnkSta: 目前該裝置跑的速度
lshw
Install
yum install lshw # From repo: base
apt-get install lshw
i.e.
# class can be found using lshw -short
H/W path Device Class Description =========================================================== ...
- system, bus, memory, processor, bridge, display
- storage, volume, disk
- input, communication, network
lshw -short -class system
lshw -class system
# Lists all disks and storage controllers in the system.
lshw -class disk -class storage
*-cdrom description: DVD-RAM writer product: DVD+-RW ???? vendor: HL-DT-ST physical id: 0.0.0 bus info: scsi@13:0.0.0 logical name: /dev/cdrom logical name: /dev/cdrw logical name: /dev/dvd logical name: /dev/dvdrw logical name: /dev/scd0 logical name: /dev/sr0 version: A3C1 capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram configuration: ansiversion=5 status=nodisc *-disk:0 description: ATA Disk product: TOSHIBA ???? vendor: Toshiba physical id: 0.5.0 bus info: scsi@14:0.5.0 logical name: /dev/sda version: FK5D serial: 69EAK91QF7DE size: 3726GiB (4TB) capacity: 3726GiB (4TB) capabilities: 7200rpm gpt-1.00 partitioned partitioned:gpt configuration: ansiversion=6 guid=... logicalsectorsize=512 sectorsize=512
Other class
- network
- memory
hwinfo
Install
apt-get install hwinfo
Usage
hwinfo [Opts]
--HARDWARE_ITEM
HARDWARE_ITEM
all, arch, bios, block, bluetooth, braille, bridge, camera, cdrom, chipcard, cpu, disk, dsl, dvb, fingerprint, floppy, framebuffer, gfxcard, hub, ide, isapnp, isdn, joystick, keyboard, memory, mmc-ctrl, modem, monitor, mouse, netcard, network, partition, pci, pcmcia, pcmcia-ctrl, pppoe, printer, redasd, reall
hwinfo --bridge
lsdev
Displays data about all devices of which the system is aware.
apt-get install procinfo
Device DMA IRQ I/O Ports ------------------------------------------------ ...... ehci_hcd:usb2 17 ohci_hcd:usb5 18 eth0 55 radeon 56 rtc0 8 0070-0071 serial 4 03f8-03ff vesafb 03c0-03df
lshal
............ udi = '/org/freedesktop/Hal/devices/storage_model_LD_0_RAID5_1430G' block.storage_device = '/org/freedesktop/Hal/devices/storage_model_LD_0_RAID5_1430G' (string) info.udi = '/org/freedesktop/Hal/devices/storage_model_LD_0_RAID5_1430G' (string) storage.requires_eject = false (bool) storage.hotpluggable = false (bool) info.capabilities = {'storage', 'block'} (string list) info.category = 'storage' (string) info.product = 'LD 0 RAID5 1430G' (string) info.vendor = 'MegaRAID' (string) storage.removable = false (bool) storage.physical_device = '/org/freedesktop/Hal/devices/pci_1028_13_scsi_host_scsi_device_lun0' (string) storage.lun = 0 (0x0) (int) storage.firmware_version = '521S' (string) storage.vendor = 'MegaRAID' (string) storage.model = 'LD 0 RAID5 1430G' (string) storage.drive_type = 'disk' (string) storage.automount_enabled_hint = true (bool) storage.media_check_enabled = false (bool) storage.no_partitions_hint = false (bool) storage.bus = 'scsi' (string) block.is_volume = false (bool) block.minor = 0 (0x0) (int) block.major = 8 (0x8) (int) block.device = '/dev/sda' (string) linux.hotplug_type = 3 (0x3) (int) info.parent = '/org/freedesktop/Hal/devices/pci_1028_13_scsi_host_scsi_device_lun0' (string) linux.sysfs_path_device = '/sys/block/sda' (string) linux.sysfs_path = '/sys/block/sda' (string)