1, view CPU information
Cat/proc/meminfo
This file gives information about the state of memory. It shows the total amount of free memory in the system, physical memory and swap memory. It also shows the total amount of shared memory and buffers used by the kernel. The format of this information is similar to the result shown by the free command.
2, Cat/proc/cpuinfo
In the Linux operating system, the CPU information is loaded into the Cpuinfo file in the virtual directory/proc under the boot process
Here are some of the more important indicators to analyze:
ID of the processor logical processor.
ID of the processor that is physically encapsulated by the physical ID.
ID of each core ID
The number of cores in the CPU core that are in the same physical package.
Siblings the number of logical processors in processors in the same physical package.
The physical ID in the above figure is 0, indicating that there is only one physical processor;
If the processor has two different numbers and belongs to a phsical ID, and the CPU core value is 2, that means the CPU is dual-core, and each core has only one logical processor.
On this server, ' CPU cores ' has a 4,physical ID, a core ID of 4, a siblings value of 8, and a total of 8 processor.
So this server host's CPU is 1 physically packaged processors, each processor has 4 processing cores (CPU cores), each core of the CPU can be divided into 2 logical processors (Hyper-Threading technology), so There are 8 logical processors (that is, 8 processor) on each physical processor.
http://hanjian861202.iteye.com/blog/964735
To get the logical number of CPUs:
#cat/proc/cpuinfo | grep "Processor" | Wc-l
Get the number of physical CPUs:
#cat/proc/cpuinfo | grep "Physical ID" | Sort | Uniq | Wc-l
Number of core in each physical CPU:
#cat/proc/cpuinfo | grep "CPU Cores" | Wc-l
Is a Hyper-threading.
If there are two logical CPUs with the same "core ID", then the Hyper-threading is turned on.
The number of logical CPUs (possibly core, threads, or both) per physical CPU:
# Cat/proc/cpuinfo | grep "Siblings"