Disclaimer: This article may contain information about third-party products. Such information is for reference only. Alibaba Cloud does not make any guarantee, express or implied, with respect to the performance and reliability of third-party products, as well as potential impacts of operations on the products.
This article describes how to view physical CPU and memory information for ECS instances running Linux.
- Total cores = number of physical CPUs × number of cores per physical CPU
- Total number of logical CPUs = number of physical CPUs × number of cores per physical CPU × number of hyper-threading
You can run the following command to view physical CPU and memory information.
- View the number of physical CPUs.
cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l
- View the number of cores in each physical CPU, that is, the number of CPU cores.
cat /proc/cpuinfo| grep "cpu cores"| uniq
- View the number of logical CPUs.
cat /proc/cpuinfo| grep "processor"| wc -l
- View the CPU model.
cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
- View memory information.