First, view the CPU
- View the number of physical CPUs
#cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc -l
- See how the CPU is a few cores
#cat /proc/cpuinfo |grep "cores"|uniq
- View the number of logical CPUs
#cat /proc/cpuinfo |grep "processor"|wc -l
- See if the CPU supports 64-bit
#cat /proc/cpuinfo | grep flags | grep ‘ lm ‘ | wc -l
8
(The result is greater than 0, indicating support for 64bit calculations. LM refers to long mode, which supports LM is 64bit)
Second, check the system boot and hardware information
- View server boot Information
#dmesg
Additional note: The kernel will store the boot information in ring buffer. If you are too late to view the information, you can use DMESG to view it. The boot information is also stored in the/var/log directory, in the file named DMESG.
Parameters
-C Clears the contents of the ring buffer after displaying the information.
-s< buffer size > pre-set to 8196, just equal to the size of the ring buffer.
-N Set the level of logging information
- View server hardware Information
View service Tag only
#dmidecode -s system-serial-number
View model, version, UUID, etc.
#dmidecode -t1
Common Linux Commands