Information about the CPU.
1. CPU
1.1 Physical CPU
The number of CPUs on the slot in the actual server. Number of physical CPUs, number of physical IDs that can be repeated
1.1.1 View the number of physical CPUs
Cat/proc/cpuinfo |grep "Physical id" |sort |uniq|wc-l
1.2 Logical CPU
Linux users are certainly not unfamiliar with the/proc/cpuinfo file. It is used to store CPU hardware information. The information content lists the specifications of the processor 0–n, respectively. It's important to note that if you think n is the actual number of CPUs, it's a big mistake. In general, we think that a CPU can have multicore, plus Intel's Hyper-Threading Technology (HT), can logically divide the number of CPU core out. Number of logical CPUs = number of physical CPUs x CPU cores This specification value x 2 (if HT is supported and turned on).
Note: Linux top view CPU is also the number of logical CPUs
1.2.1 View the number of logical CPUs
" Processor "
1.3 Number of cores
The number of chipsets that can process data on a CPU, such as the current i5 760, is the CPU of the dual core four thread, and i5 2250 is the CPU of the quad core four thread.
In general, the number of physical CPUs x per core should be equal to the number of logical CPUs, if not equal, it means that the server's CPU supports Hyper-Threading technology. 1.3.1 View CPU is a few cores
" cores "|uniq
1.4 The main factors that determine the performance of the CPU: architecture, cache, frequency, number of threads, number of cores.
Here are the differences between threads and processes
2. Threads and processes
What is a process?
Process is the program that is being executed
What is a thread?
1) Lightweight process
2) The process has a separate address space. Thread does not have
3) thread cannot exist independently, she is the thread created by the process (fork)
4) Relatively speaking, the thread consumes less CPU and memory than the process
3, the relationship between
CPUs can have multiple cores, such as: Single core, dual core, three cores, etc.
A core can have multiple processes
One or more threads must be selected for a process
4. Summary
Information in the Cat/proc/cpuinfo
- Processor The ID of the logical processor.
- ID of the processor that physical ID physically encapsulates.
- The ID of the core ID for each key.
- CPU cores The number of cores in the same physically encapsulated processor.
- Siblings the number of logical processors in the same physically encapsulated processor.
1 Viewing the number of physical CPUs
#cat/proc/cpuinfo |grep "Physical id" |sort |uniq|wc–l
2. View the number of logical CPUs
#cat/proc/cpuinfo |grep "Processor" |wc–l
3. View CPU is a few cores
#cat/proc/cpuinfo |grep "Cores" |uniq
4, check the CPU frequency
#cat/proc/cpuinfo |grep Mhz|uniq
5. View current operating system kernel information
# uname-a
Linux euis1 2.6.9-55.ELSMP #1 SMP Fri April 17:03:35 EDT i686 i686 i386 gnu/linux
7. View current operating system release information
# Cat/etc/issue | grep Linux
Red Hat Enterprise Linux as Release 4 (Nahant Update 5)
8. CPU Model
# Cat/proc/cpuinfo | grep name | Cut-f2-d: | Uniq-c
Intel (R) Xeon (r) CPU E5410 @ 2.33GHz
(see 8 logical CPUs, also know the CPU model)
9
# Cat/proc/cpuinfo | grep Physical | Uniq-c
4 Physical id:0
4 Physical Id:1
(Description is actually two 4-core CPUs)
# In fact, there may be hyper-threading HT technology, not necessarily 4 cores or 2 cores 4 threads;
10
# getconf Long_bit
32
(indicates that the current CPU is running in 32bit mode, but does not mean that the CPU does not support 64bit)
11.
# Cat/proc/cpuinfo | grep Flags | grep ' LM ' | Wc–l
8 (results greater than 0, description support 64bit calculation.) LM means long mode, support LM is 64bit)
12. How to get CPU details:
Linux command: Cat/proc/cpuinfo
13. Is it hyper-threading? If there are two logical CPUs with the same "core ID", then Hyper-threading is turned on. The number of logical CPUs (possibly cores, threads, or both) in each physical CPU:
# Cat/proc/cpuinfo | grep "Siblings"
Note:
1. View CPU Information commands
Cat/proc/cpuinfo
2. View memory Information commands
Cat/proc/meminfo
3. View the hard drive information command
Fdisk-l
/proc under the file is very powerful, still in the study!!!
Http://www.cnblogs.com/lliqiang/p/4143927.html
Recommend this side about the process, these 2 goods write good!
CPU-related information (process, thread, kernel ... )