The first step of Linux performance test --- view the hardware configuration of the device

Before performing performance testing, we often need to first confirm whether the hardware configuration of the equipment meets the testing needs, and ensure that the testing starts on the basis of no bottlenecks in hardware resources. How to get the hardware configuration of the device? Let's take the CentOS system as an example to briefly introduce:

 

1. Check the model of the physical machine

dmidecode | grep "Product Name" #View the machine model

 

Second, check the memory size

dmidecode -t memory #View memory hardware information (only part of the picture is truncated)

cat /proc/meminfo | grep MemTotal #View the total memory size

free -h #View the current memory usage

 

Three, check the CPU

lscpu #View CPU statistics

cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l #View the number of physical CPUs

cat /proc/cpuinfo | grep "processor" | wc -l #View the number of logical CPUs

cat /proc/cpuinfo | grep "cpu cores" | uniq #View the number of CPU cores

cat /proc/cpuinfo | grep processor #List all logical CPUs

cat /proc/cpuinfo | grep "model name" #View CPU model

 

Fourth, view RAID information

MegaCli -PDList aALL #View RAID information (only part of the picture is truncated)

 

Five, view the disk status

storcli /call show #View disk status, belonging raid and other information

lsblk #View the disk and distribution area

fdisk -l #View more detailed disk and distribution information (only part of the picture is truncated)

 

Six, view network card information

lspci | grep -i'eth' #View network card hardware information

ifconfig #View all network interfaces

ethtool [网口名] #View the detailed information of a certain network port

 

After confirming the hardware resources, it is not too late to determine whether to start performance testing in this environment~

If you wait for performance problems and then check the hardware resources in turn, it will waste a lot of time. It is possible that the environment and test data you have worked so hard to build before will be wasted.

 

Guess you like

Origin blog.csdn.net/wxt_hillwill/article/details/110958193