CentOS View System version
cat/etc/redhat-
1) View the version of the CentOS kernel:
[root@localhost ~]# cat /proc/version Linux version 2.6.18-194.el5 (mockbuild@builder10.centos.org) (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, the node name, the operating system's release number, the operating system version, the machine ID number
[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 operating system's release number
[[Email protected] ~] # uname-r
2.6.18-194.el5
To view the Linux version:
- 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 applies to all Linux, including Redhat, SuSE, Debian, and other distributions.
- Executecat /etc/issue, for example as follows:
[root@localhost ~]# cat /etc/issue CentOS release 5.5 (Final)
Kernel r on an m
- Executecat /etc/redhat-release, for example as follows:
[root@localhost ~]# cat /etc/redhat-release CentOS release 5.5 (Final)
To see if the system is 64-bit or 32-bit:
[[Email protected] ~] # 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, strippe
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 View System CPU number, number of cores, number of threads
1. View the number of physical CPUs
' Physical ID ' /proc/cpuinfo | Sort-u | WC-L 2
2. View the number of cores, that is, the number of cores in each physical CPU (that is, the number of nuclei)
' Core ID ' /proc/cpuinfo | Sort-u | WC-L6
3. View the number of threads (number of logical CPUs)
' Processor ' /proc/cpuinfo | Sort-u | WC-24
4. View the CPU model
Dmidecode-s processor-version
5. View Memory Methods
Grep MemTotal /proc/meminfo
# Total number of cores = Number of physical CPUs X Number of cores per physical CPU
# Total logical CPUs = Physical CPUs X Cores per physical CPU X Hyperthreads
# Viewing the number of physical CPUs
Cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l
2
# View the number of cores in each physical CPU (ie, the number of cores)
Cat /proc/cpuinfo| grep "cpu cores"| uniq
6
# View the number of logical CPUs
Cat /proc/cpuinfo| grep "processor"| wc -l
twenty four
Detailed physical CPU, number of cores, logical CPU description
http://blog.csdn.net/u011630575/article/details/61194094
CentOS System View system version, kernel version, number of system bits, number of CPUs, number of cores, number of threads