The centos system checks the system version, kernel version, system bits, number of CPUs, number of cores, number of threads

centos view system version

cat /etc/redhat-release

CentOS Linux release 7.2.1511 (Core) 

 

1) Check the version of the centos kernel:

[root@localhost ~]#  cat  /proc/version

Linux version 2.6.18-194.el5 ([email protected]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48))

# 1 SMP Fri Apr 2 14:58:14 EDT 2010

 

2) Display the system name, node name, release version number of the operating system, operating system version, machine ID number of the operating system

[root@localhost ~]# uname -a

Linux localhost.localdomain 2.6.18-194.el5 

# 1 SMP Fri Apr 2 14:58:14 EDT 2010 x86_64 x86_64 x86_64 GNU / Linux

 

3) Display the release number of the operating system

[root@localhost ~]# uname -r

2.6.18-194.el5

 

Check the linux version:

  1. list all version information,
[root@localhost ~]# lsb_release -a

LSB Version:     core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch

Distributor ID:   CentOS

Description:      CentOS release 5.5 (Final)

Release:          5.5

Codename:      Final

 

Note: This command works on all linux including Redhat, SuSE, Debian and other distributions.

  1. Execute cat /etc/issue, for example as follows:
[root@localhost ~]# cat /etc/issue

CentOS release 5.5 (Final)

Kernel r on an m

 

  1. Execute cat /etc/redhat-release , for example as follows:
[root@localhost ~]# cat /etc/redhat-release

CentOS release 5.5 (Final)

 

Check if the system is 64-bit or 32-bit:

[root@localhost ~]#  getconf LONG_BIT

64

 

2、file /bin/ls

[root@localhost ~]# file /bin/ls

/bin/ls: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped

 

3、lsb_release -a

[root@localhost ~]# lsb_release -a

LSB Version:    :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch

Distributor ID: CentOS

Description:    CentOS release 5.5 (Final)

Release:        5.5

Codename:       Final

 

centos查看系统cpu个数、核心数、线程数

1.查看物理cpu个数

grep 'physical id' /proc/cpuinfo | sort -u | wc -l    

2

 

2.查看核心数量,即每个物理CPU中core的个数(即核数)

grep 'core id' /proc/cpuinfo | sort -u | wc -l

6

 

3.查看线程数(逻辑CPU的个数)

grep 'processor' /proc/cpuinfo | sort -u | wc -l 

24

 

4.查看cpu型号

dmidecode -s processor-version

 

5.查看内存方法

grep MemTotal /proc/meminfo

# 总核数 = 物理CPU个数 X 每颗物理CPU的核数 
# 总逻辑CPU数 = 物理CPU个数 X 每颗物理CPU的核数 X 超线程数

# 查看物理CPU个数
cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l
   2

# 查看每个物理CPU中core的个数(即核数)
cat /proc/cpuinfo| grep "cpu cores"| uniq
   6

# 查看逻辑CPU的个数
cat /proc/cpuinfo| grep "processor"| wc -l
  24

 

详细物理cpu,核数,逻辑cpu说明

http://blog.csdn.net/u011630575/article/details/61194094

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325892677&siteId=291194637