1, the preface

During server o&M or deployment, you often need to check the system version and CPU information of the server.

2, methods,

1, the uname -a

Linux View the kernel information of the current operating system

2, the cat/proc/version

Linux View the version of the current operating system

3. Cat /etc/issue or cat /etc/redhat-release

Linux View version Information about the current operating system release

4, the cat/proc/cpuinfo

View CPU information,

Processor INDICATES the ID of a logical processor.

Physical ID Indicates the id of the formal physical processor.

Core ID Indicates the ID of each core in the CPU.

CPU Cores Number of cores per CPU physical processor.

Siblings Number of logical processors in a CPU physical processor.

Online for an example, the reference (blog.csdn.net/sycflash/ar…).

On this server, ‘CPU cores’ are 4, physical ids are 2, core ids are 8, and siblings are 8, giving a total of 16 processors.

So the server’s host CPU is two physically packaged processors, with four CPU cores per processor, and two logical processors per core (hyperthreading technology), so there are eight logical processors on each physical processor for a total of 16 processors. There you have it. The general structure is shown as follows:

For personal VMS

cat /proc/cpuinfo |grep "physical id"|sort
cat /proc/cpuinfo |grep "cpu cores"|sort
cat /proc/cpuinfo |grep "processor"|sort
Copy the code

My VM uses two physical cpus, one core for each CPU, and two logical processors in total, the same configuration as Vmware.

5, getconf LONG_BIT

View version Description The CURRENT CPU runs in 32-bit mode, but this does not mean that the CPU does not support 64-bit

6, lsb_release – a