Commands for viewing hardware information under Linux system

lscpu The
lscpu command can view CPU and processing unit information. This command does not have any other options or other functions.

lscpu
运行该命令会看到下面输出:

write picture description here
lspci
lspci is another command line tool that can be used to list all PCI buses, along with details of devices connected to the PCI bus, such as VGA adapters, graphics cards, network adapters, usb ports, SATA controllers, etc.

lspci -v | grep "VGA" -A 12
Run the above command to see information about the graphics card similar to the following figure
write picture description here

lshw
lshw is a general tool that can list detailed or summary information of various hardware units, such as CPU, memory, usb controller, hard disk, etc. lshw can extract relevant information from each "/proc" file.

lshw -short

lsscsi
can list information about scsi/sata devices like hard disks and CD-ROMs by running the following command:

lsscsi
will get output similar to the following.
write picture description here

df
The df command can list the general information, mount points, used and available space of different partitions.

You can add the -H parameter when using the df command.

df -H

Free
By using the free command you can view the total amount of used, free and RAM in the system.

free -m
will see the following output.
write picture description here

View CPU usage
top
or: top -bn 1 -i -c

%us: Indicates the cpu usage of the user space program (not scheduled by nice)

%sy: Indicates the cpu usage of the system space, mainly the kernel program.

%ni: Indicates the cpu usage of programs in user space and scheduled by nice.

%id: idle cpu

%wa: the time the cpu is waiting for io when it is running

%hi: the number of hard interrupts handled by the cpu

%si: the number of soft interrupts processed by the cpu

%st: CPU stolen by virtual machine

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325653554&siteId=291194637