Free-m memory information query, cat/proc/cpuinfo cpu Information Query instance explanation, proccpuinfo

Source: Internet
Author: User

Free-m memory information query, cat/proc/cpuinfo cpu Information Query instance explanation, proccpuinfo

Free cpu Information Query reference information

Free
[root@VM_0_16_centos ~]# free -m             total       used       free     shared    buffers     cachedMem:           996        824        172         10         32        501-/+ buffers/cache:        289        706 Swap:            0          0          0 [root@VM_0_16_centos ~]# 

Formula:

Total1 = used1 + free1-> 996 = 824 + 172 total1 = used2 + free2-> 996 = 289 + 706 used1 = buffers1 + cached1 + used2-> 824 = 32 + 501 + 289 free2 = buffers1 + cached1 + free1-> 706 = 32 + 501 + 172

Here, the first line is represented by 1, and the second line is represented by 2; used1 = 824, used2 = 289

Description:

Code Description
Mem Physical memory statistics
-/+ Buffers/cached Indicates the cache statistics of physical memory.
Swap The usage of swap partitions on the hard disk is 0.
Total Total physical memory: 996 MB
Used1 Indicates the total number of used2 + not actually used (buffer1 + cached1) allocated to the cache (including buffers and cache)
Used2 The actual amount of buffers and cache used is also the actual total amount of memory used.
Free1 Unallocated memory
Free2 The sum of unused buffers, cache, and unallocated memory, which is the actual available memory of the system.
Shared Shared memory, which is not used by the general system and will not be discussed here
Buffers Number of buffers allocated by the system but not used
Cached Number of cache allocated but not used by the System
Buffer

A buffer is something thatHas yet to be"Written" to disk.

Buffer isNotBuffer for writing data to the disk (write bufffer ).

Cache

A cache is something that has been "read" from the disk and stored for later use.

The cache is what is "read" from the disk and stored for future use (read cache ).

Cpu Information Query

Top-H viewing thread

Cat/proc/cpuinfo

I. First, we need to clarify the concept of the number of physical CPUs, the number of cores, and the number of logical CPUs.

1. Number of physical CPUs: the number of CPUs actually inserted on the motherboard. You can specify the number of unique physical IDS (physical id)

2. Number of cpu cores: Number of chipsets that can process data on a single CPU, such as dual-core and quad-core (cpu cores)

3. Number of logical CPUs: Generally,Logical cpu = number of physical CPUs X number of each coreIf not, it indicates that the CPU of the server supports hyper-Threading Technology (HT: in simple words, it can make one kernel in the processor play a role in the operating system as two kernels. In this way, the execution resources available for the operating system are doubled, greatly improving the overall performance of the system.Logical cpu = number of physical CPUs X number of each core x 2) (Processer 0-n)

2. View cpu information by viewing/proc/cpuinfo

1. Number of physical CPUs: [root @ server ~] # Grep 'physical id'/proc/cpuinfo | sort | uniq | wc-l

2. Number of cpu cores: [root @ server ~] # Grep 'cpu cores'/proc/cpuinfo | uniq | awk-F': ''{print $2 }'

3. Logical cpu: [root @ server ~] # Cat/proc/cpuinfo | grep "processor" | wc-l

4. Enable hyper-threading: [root @ server ~] # Cat/proc/cpuinfo | grep-e "cpu cores"-e "siblings" | sort | uniq

cpu cores    : 4siblings    : 4

Assume that cpu cores = siblings indicates that it is not enabled.

processor    : 0vendor_id  : GenuineIntelcpu famil  : 6model     : 15model name  : Intel(R) Xeon(R) CPU           X5355  @ 2.66GHzstepping   : 7cpu MHz   : 2666.766cache size : 4096 KBphysical id    : 0siblings    : 4core id    : 0cpu cores    : 4fpu      : yesfpu_exception  : yescpuid level   : 10wp      : yesflags    : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr dca lahf_lmbogomips    : 5338.26clflush size    : 64cache_alignment : 64address sizes   : 36 bits physical, 48 bits virtualpower management:processor    : 1vendor_id    : GenuineIntelcpu family    : 6model        : 15model name    : Intel(R) Xeon(R) CPU           X5355  @ 2.66GHzstepping    : 7cpu MHz        : 2666.766cache size    : 4096 KBphysical id    : 1siblings    : 4core id        : 0cpu cores    : 4fpu        : yesfpu_exception    : yescpuid level    : 10wp        : yesflags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr dca lahf_lmbogomips    : 5333.75clflush size    : 64cache_alignment    : 64address sizes    : 36 bits physical, 48 bits virtualpower management:processor    : 2vendor_id    : GenuineIntelcpu family    : 6model        : 15model name    : Intel(R) Xeon(R) CPU           X5355  @ 2.66GHzstepping    : 7cpu MHz        : 2666.766cache size    : 4096 KBphysical id    : 0siblings    : 4core id        : 2cpu cores    : 4fpu        : yesfpu_exception    : yescpuid level    : 10wp        : yesflags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr dca lahf_lmbogomips    : 5333.67clflush size    : 64cache_alignment    : 64address sizes    : 36 bits physical, 48 bits virtualpower management:processor    : 3vendor_id    : GenuineIntelcpu family    : 6model        : 15model name    : Intel(R) Xeon(R) CPU           X5355  @ 2.66GHzstepping    : 7cpu MHz        : 2666.766cache size    : 4096 KBphysical id    : 1siblings    : 4core id        : 2cpu cores    : 4fpu        : yesfpu_exception    : yescpuid level    : 10wp        : yesflags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr dca lahf_lmbogomips    : 5333.68clflush size    : 64cache_alignment    : 64address sizes    : 36 bits physical, 48 bits virtualpower management:processor    : 4vendor_id    : GenuineIntelcpu family    : 6model        : 15model name    : Intel(R) Xeon(R) CPU           X5355  @ 2.66GHzstepping    : 7cpu MHz        : 2666.766cache size    : 4096 KBphysical id    : 0siblings    : 4core id        : 1cpu cores    : 4fpu        : yesfpu_exception    : yescpuid level    : 10wp        : yesflags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr dca lahf_lmbogomips    : 5333.67clflush size    : 64cache_alignment    : 64address sizes    : 36 bits physical, 48 bits virtualpower management:processor    : 5vendor_id    : GenuineIntelcpu family    : 6model        : 15model name    : Intel(R) Xeon(R) CPU           X5355  @ 2.66GHzstepping    : 7cpu MHz        : 2666.766cache size    : 4096 KBphysical id    : 1siblings    : 4core id        : 1cpu cores    : 4fpu        : yesfpu_exception    : yescpuid level    : 10wp        : yesflags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr dca lahf_lmbogomips    : 5333.68clflush size    : 64cache_alignment    : 64address sizes    : 36 bits physical, 48 bits virtualpower management:processor    : 6vendor_id    : GenuineIntelcpu family    : 6model        : 15model name    : Intel(R) Xeon(R) CPU           X5355  @ 2.66GHzstepping    : 7cpu MHz        : 2666.766cache size    : 4096 KBphysical id    : 0siblings    : 4core id        : 3cpu cores    : 4fpu        : yesfpu_exception    : yescpuid level    : 10wp        : yesflags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr dca lahf_lmbogomips    : 5333.69clflush size    : 64cache_alignment    : 64address sizes    : 36 bits physical, 48 bits virtualpower management:processor    : 7vendor_id    : GenuineIntelcpu family    : 6model        : 15model name    : Intel(R) Xeon(R) CPU           X5355  @ 2.66GHzstepping    : 7cpu MHz        : 2666.766cache size    : 4096 KBphysical id    : 1siblings    : 4core id        : 3cpu cores    : 4fpu        : yesfpu_exception    : yescpuid level    : 10wp        : yesflags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr dca lahf_lmbogomips    : 5333.68clflush size    : 64cache_alignment    : 64address sizes    : 36 bits physical, 48 bits virtualpower management:

For example, create a file cpuinfo for analysis as follows:

[Root @ server ~] # Grep 'physical id' cpuinfo | sort | uniq | wc-l2 ① # physical cpu is 2, that is, two CPUs are inserted on the motherboard [root @ server ~] # Grep 'cpu cores' cpuinfo | uniq | awk-F': ''{print $2} '4 ② # logical cpu of a single cpu is 4 [root @ server ~] # Cat cpuinfo | grep "processor" | wc-l8 ③ # The total processor is 8 [root @ server ~] # Cat cpuinfo | grep-e "cpu cores"-e "siblings" | sort | uniqcpu cores: 4 siblings: 4 # cpu cores = siblings, hyperthreading technology is not enabled # The above processor = physical cpu * single logic cpu # That is, ③ = ② * ① was set up in this output, and multithreading technology is not enabled. [Root @ server ~] #
References

Some content references

Some content references

Free-m

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.