In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will share with you about the commands to view hardware information in Linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
1. Lscpu is used to query CPU information.
[root@devops ~] # lscpu Architecture: x86 / 64 CPU op-mode (s): 32-bit 64-bit Byte Order: Little Endian CPU (s): 1 On-line CPU (s) list: 0 Thread (s) per core: 1 Core (s) per socket: 1 CPU socket (s): 1 NUMA node (s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 45 Stepping: 7 CPU MHz: 2194.842 BogoMIPS: 4389.68 Hypervisor vendor: Xen Virtualization type: full L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 15360K NUMA node0 CPU (s): 0
2. Lshw display hardware information table
This command is widely used, it can list a variety of different hardware parameters according to personal needs: CPU, memory, hard disk, USB controller, LSHW card, etc., in essence, it is to extract the corresponding hardware information from different files in / proc directory.
Follow the steps below to install the lshw tool, and then you can use it.
Wget http://ezix.org/software/files/lshw-B.02.14.tar.gz tar-zxvf lshw-B.02.14.tar.gz cd lshw-B.02.14 make & & make install example: [root@devops lshw-B.02.14] # lshw- short bus Motherboard W path Device Class Description = system HVM domU / 0 bus Motherboard / 0 Band 0 Memory 96KiB BIOS / 0Unip 1 processor Intel (R) Xeon (R) CPU E5-2430 0 @ 2.20GHz / 0Acer 2 memory System Memory / 0Unip 0 memory 512MiB DIMM RAM / 0lap 2max 1 memory 512MiB DIMM RAM / 0/3 memory 96KiB BIOS / 0/4 processor CPU / 0/5 memory System Memory / 0/6 memory / 0/7 memory / 0/100 bridge 440FX -82441FX PMC [Natoma] / 0 bus 82371SB PIIX3 USB 100 bus 82371SB PIIX3 USB 1 bridge 82371SB PIIX3 ISA [Natoma/Triton II] / 0 bus 82371SB PIIX3 USB 100 bus 82371SB PIIX3 USB 1.1 [Natoma/Triton II] / 0 bus 82371SB PIIX3 USB 1.1 bus 82371SB PIIX3 USB / 0 bus 82371SB PIIX3 USB 1.1 bus 82371SB PIIX3 USB / 0 bus 82371SB PIIX3 USB 1.1 bus 82371SB PIIX3 USB / 0 bus 82371SB PIIX3 USB [Natoma/Triton] II] / 0/100/1.2/1 usb1 bus UHCI Host Controller / 0/100/1.2/1/2 input QEMU USB Tablet / 0/100/1.3 bridge 82371AB/EB/MB PIIX4 ACPI / 0/100/2 display GD 5446 / 0/100/3 generic Xen Platform Device / 1 eth0 network Ethernet interface / 2 eth2 network Ethernet interface [root@devops lshw-B.02.14] #
3. Hwinfo- hardware information
Hwinfo is similar to lshw, it can also query hardware information, and it is widely used.
By default, the hwinfo tool is not installed on the Linux system, so you need to install it yourself by following these steps:
CentOS 6
# rpm-Uvh http://mirror.symnds.com/distributions/gf/el/6/gf/x86_64/gf-release-6-6.gf.el6.noarch.rpm # yum list hwinfo # yum install hwinfo
CentOS 5
# rpm-Uvh http://mirror.symnds.com/distributions/gf/el/5/gf/x86_64/gf-release-5-6.gf.el5.noarch.rpm # yum list hwinfo # yum install hwinfo [root@devops tmp] # rpm-Uvh http://mirror.symnds.com/distributions/gf/el/6/gf/x86_64/gf-release-6-6.gf.el6.noarch.rpm Retrieving http://mirror.symnds.com/distributions/gf/el/6/gf / x86_64/gf-release-6-6.gf.el6.noarch.rpm warning: / var/tmp/rpm-tmp.m2mMAO: Header V4 RSA/SHA1 Signature Key ID 13a4d2a9: NOKEY Preparing... Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com gf 00:00 gf/primary_db
Example:
[root@devops tmp] # hwinfo-short oops: don' T know what to do with "short" [root@devops tmp] # hwinfo-- short cpu: Intel (R) Xeon (R) CPU E5-2430 0 @ 2.20GHz 2194 MHz keyboard: / dev/input/event3 AT Translated Set 2 keyboard / dev/ttyS0 serial console mouse: / dev/input/mice Adomax QEMU USB Tablet / dev/input/mice Macintosh mouse button emulation / dev/input/mice ImExPS/2 Generic Explorer Mouse graphics card: Cirrus Logic GD 5446 storage: Intel 82371SB PIIX3 IDE [Natoma/Triton II] Xen Virtual Storage 0 Xen Virtual Storage 1 Xen Virtual Storage 2 network: eth0 Xen Virtual Ethernet Card 0 eth2 Xen Virtual Ethernet Card 1 network interface: lo Loopback network interface eth0 Ethernet network interface eth2 Ethernet network interface disk: / dev/xvda Disk / dev/xvdb Disk partition: / dev/xvda1 Partition / dev/xvdb1 Partition cdrom: / dev/sr0 QEMU DVD-ROM usb controller: Qumranet Qemu virtual machine bios: BIOS bridge: Qumranet Qemu virtual machine Qumranet Qemu virtual machine Qumranet Qemu virtual machine hub: Linux 2.6.32-279.el6.x86_64 uhci_hcd UHCI Host Controller memory: Main Memory unknown: FPU DMA controller PIC Timer Keyboard controller XenSource Xen Platform Device [root@devops tmp] #
4. Lspci
The lsppci command lists information about the PCI bus and devices connected to the PCI bus, such as VGA adapters, SATA controllers, other modules, and so on. The lspci tool is part of the pciutils package, so you need to install the pciutils package before installing lspci.
Install the pciutils package using the following command:
# yum install pciutils [root@devops tmp] # yum install pciutils Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com Setting up Install Process Resolving Dependencies-> Running transaction check-> Package pciutils.x86_64 0pur3.1.10-2.el6 will be installed-> Processing Dependency: pciutils-libs = 3.1.10-2.el6 for package: pciutils-3.1.10-2.el6 .x86 _ 64-- > Running transaction check-> Package pciutils-libs.x86_64 0Package pciutils-libs.x86_64 3.1.4-11.el6 will be updated-- > Package pciutils-libs.x86_64 0vir 3.1.10-2.el6 will be an update-- > Finished Dependency Resolution Dependencies Resolved Installing: pciutils x86 * 64 3.1.10-2.el6 85k Updating for dependencies: pciutils-libs x86-64 3.1.10-2.el6 34k. Dependency Updated: pciutils-libs.x86_64 0VR 3.1.10-2.el6 Complete!
Example:
[root@devops tmp] # lspci 00Host bridge 00.0 Host bridge: Intel Corporation 440FX-82441FX PMC [Natoma] (rev 02) 00Host bridge 01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II] 00Rod 01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II] 00RH 01.2 USB controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] (rev 01) 00RH 01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 01) 00Rule 02.0 VGA compatible controller : Cirrus Logic GD 5446 00:03.0 Unassigned class [ff80]: XenSource Inc. Xen Platform Device (rev 01) [root@devops tmp] #
5. Lsusb- lists USB bus information
This command lists the device information for the USB controller.
The lsusb tool is part of the usbutils package, so you need to install it as follows:
# yum install usbutils [root@devops tmp] # yum install usbutils Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com Setting up Install Process Resolving Dependencies-- > Running transaction check-- > Package usbutils.x86_64 0pur003-4.el6 will be installed-- > Processing Dependency: libusb-1.0.so.0 () (64bit) for package: usbutils-003-4.el6.x86_64-- > Running transaction check-- > Package libusb1.x86_64 00.6.rc1.el6 will be installed 1.0.9-- > Finished Dependency Resolution Dependencies Resolved = Package Arch Version Size = Installing: usbutils x86mm 64003-4.el6 71 k Installing for dependencies: libusb1 x86 inch 64 1.0.9-0.6.rc1.el6 80 k Transaction Summary = Install 2 Package (s) Total download size: 152 k Installed size: 377 k Is this ok [y k Installing for dependencies N]: y Downloading Packages: (1) libusb1 2): .9-0.6.rc1.el6.x86_64.rpm 00:00 (2amp 2): usbutils-003-4.el6.x86_64.rpm 00:00-- -- Total 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing: libusb1-1.0.9-0.6.rc1.el6.x86_64 1 Installing 2: usbutils-003-4.el6.x86_64 2 Verifying: usbutils-003-4.el6.x86_64 1 Verifying 2 Verifying: libusb1-1.0.9-0.6.rc1.el6.x86_64 2 4.el6 2 Installed: usbutils.x86_64 0VOVA 003-4.el6 Dependency Installed: libusb1.x86_64 0VLA 1.0.9-0.6.rc1.el6 Complete!
Example:
[root@devops tmp] # lsusb Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd [root@devops tmp] #
6. Lsblk- lists information about block devices
[root@devops tmp] # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT xvda 202:0 0 20G 0 disk └─ xvda1 202:1 0 20G 0 part / xvdb 202:16 0 10G 0 disk └─ xvdb1 202:17 0 10G 0 part / alidata sr0 11:0 1 362K 0 rom
7. Lsscsi- lists the device information of SCSI
List information about SCSI/SDAT devices, such as hard drives, CD-ROMs.
[root@devops tmp] # lsscsi [1 cd/dvd QEMU QEMU DVD-ROM 0 / dev/sr0 [root@devops tmp] # Thank you for reading! This is the end of this article on "what are the commands for viewing hardware information in Linux?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.