View System configuration under Linux

Source: Internet
Author: User

Cpu

1. LSCPU: Display CPU Architecture information

[[Email protected] ~]$ lscpuarchitecture:x86_64cpu op-mode (s): +-bit, --bitbyte order:little endiancpu (s):4 #总处理器核心数量 on-line CPU (s) List:0-3Thread (s) per core:1 #每个核心支持的线程数量. 1 means only one thread is supported, that is, hyper-threading is not supportedCore (s) per socket:1 #每个处理器的核心数量Socket (s):4 #处理器数量NUMA Node (s):1Vendor id:genuineintelcpu Family:6Model: theStepping:0CPU MHz:2599.998bogomips:5199.99Hypervisor vendor:vmware #管理程序供应商Virtualization type:fulll1d cache:32kl1i cache: 32KL2 cache:256kl3 Cache:30720knuma node0 CPU (s):0-3

Total Processor cores = number of processors * Number of cores per processor * Number of threads supported per core. That is: CPU (s) = Socket (s) * Core (s) * Thread (s).

Let's look at how the man describes it:

Mans lscpu   COLUMNS CPU The logical CPU number of    a CPU as used by the Linux kernel. #逻辑CPU数量       Core The   logical core number.      A core can contain several CPUs. #逻辑核心数量       Socket The logical socket number.   A socket can contain several cores. Number of #逻辑插槽 (road)

2. Cat/proc/cpuinfo: View CPU Details

[Email protected] ~]$Cat/proc/Cpuinfo Processor:0VENDOR_ID:GENUINEINTELCPU Family:6Model: theModel Name:intel (R) Xeon (r) CPU E5-2690V3 @2. 60GHzstepping:0CPU MHz:2599.998Cache Size:30720KBfpu:yesfpu_exception:yescpuid Level: -wp:yesflags:fpu vme de PSE TSC MSR PAE MCE cx8 APIC Sep MTRR PGE MCA cmov Pat PSE36 Clflush DTS MMX FXSR SSE SSE2 SS Syscall NX rdtscp LM constant_tsc Arch_perfmon pebs BTS xtopology tsc_reliable nonstop_tsc aperf Mperf unfair_spinlock pni pclmulqdq ssse3 FMA cx16 sse4_1 sse4_2 movbe popcnt AES Xsave AVX hypervisor lahf_lm Ida Arat EP b PLN pts dtsbogomips:5199.99Clflush Size: -cache_alignment: -Address sizes: +Bits physical, -bits virtualpower management:processor:1VENDOR_ID:GENUINEINTELCPU Family:6Model: theModel Name:intel (R) Xeon (r) CPU E5-2690V3 @2. 60GHzstepping:0CPU MHz:2599.998Cache Size:30720KBfpu:yesfpu_exception:yescpuid Level: -wp:yesflags:fpu vme de PSE TSC MSR PAE MCE cx8 APIC Sep MTRR PGE MCA cmov Pat PSE36 Clflush DTS MMX FXSR SSE SSE2 SS Syscall NX rdtscp LM constant_tsc Arch_perfmon pebs BTS xtopology tsc_reliable nonstop_tsc aperf Mperf unfair_spinlock pni pclmulqdq ssse3 FMA cx16 sse4_1 sse4_2 movbe popcnt AES Xsave AVX hypervisor lahf_lm Ida Arat EP b PLN pts dtsbogomips:5199.99Clflush Size: -cache_alignment: -Address sizes: +Bits physical, -bits virtualpower management:processor:2VENDOR_ID:GENUINEINTELCPU Family:6Model: theModel Name:intel (R) Xeon (r) CPU E5-2690V3 @2. 60GHzstepping:0CPU MHz:2599.998Cache Size:30720KBfpu:yesfpu_exception:yescpuid Level: -wp:yesflags:fpu vme de PSE TSC MSR PAE MCE cx8 APIC Sep MTRR PGE MCA cmov Pat PSE36 Clflush DTS MMX FXSR SSE SSE2 SS Syscall NX rdtscp LM constant_tsc Arch_perfmon pebs BTS xtopology tsc_reliable nonstop_tsc aperf Mperf unfair_spinlock pni pclmulqdq ssse3 FMA cx16 sse4_1 sse4_2 movbe popcnt AES Xsave AVX hypervisor lahf_lm Ida Arat EP b PLN pts dtsbogomips:5199.99Clflush Size: -cache_alignment: -Address sizes: +Bits physical, -bits virtualpower management:processor:3VENDOR_ID:GENUINEINTELCPU Family:6Model: theModel Name:intel (R) Xeon (r) CPU E5-2690V3 @2. 60GHzstepping:0CPU MHz:2599.998Cache Size:30720KBfpu:yesfpu_exception:yescpuid Level: -wp:yesflags:fpu vme de PSE TSC MSR PAE MCE cx8 APIC Sep MTRR PGE MCA cmov Pat PSE36 Clflush DTS MMX FXSR SSE SSE2 SS Syscall NX rdtscp LM constant_tsc Arch_perfmon pebs BTS xtopology tsc_reliable nonstop_tsc aperf Mperf unfair_spinlock pni pclmulqdq ssse3 FMA cx16 sse4_1 sse4_2 movbe popcnt AES Xsave AVX hypervisor lahf_lm Ida Arat EP b PLN pts dtsbogomips:5199.99Clflush Size: -cache_alignment: -Address sizes: +Bits physical, -bits Virtualpower Management:

With this output, there is a lot of content and it looks like a bit confusing. We can use a few commands to view the information we want to know:

# View the number of physical CPUsCat/proc/cpuinfo |grep "Physical ID"|Sort|Uniq# See the number of cores in each physical CPU (that is, the number of nuclei)Cat/proc/cpuinfo |grep "CPU Cores"|Uniq# See the number of threads per physical CPUCat/proc/cpuinfo |grep "siblings"|Uniq# View the number of logical CPUsCat/proc/cpuinfo|grep "Processor"# View CPU ModelsCat/proc/cpuinfo |grep "model name"|Uniq

Memory

View/proc/meminfo or use the free command. The free command is the information obtained from the Meminfo. In general, use free to get the information we want to know:

 free-m             total       used       free     shared    buffers     Cachedmem:           7868        954       6914                    0         619-/+ Buffers/cache:        271       7597Swap:         4031          0       4031

As you can see, the memory size is 8G.

Hard disk

1. LSBLK:BLK is the abbreviation for block. List block devices

[[Email protected] ~]$ lsblkname maj:min RM SIZE RO TYPE MOUNTPOINTsr0 One:0    11024M0ROM SDB8: -   0100G0DISK└─SDB18: -   0100G0Part/DATASDA8:0    060G0disk├─sda18:1    0500M0Part/boot└─sda28:2    0  -.5G0Part├─volgroup-lv_root (dm-0)253:0    050G0LVM/├─volgroup-lv_swap (dm-1)253:1    04G0LVM [Swap]└─volgroup-lv_home (dm-2)253:2    0  5.6G0Lvm/home

Where Type=disk represents the hard drive. It can be seen that the hard disk is divided into SDA and SDB, altogether 160G.

2. DF: View Hard Drive usage

[Email protected] ~]$DF-hfilesystem Size used Avail use%mounted on/dev/mapper/volgroup-lv_root 50G1.7G 46G4% /Tmpfs3.9G0  3.9G0%/dev/SHM/DEV/SDA1 485M 39M 421M9% /Boot/dev/mapper/volgroup-lv_home5.5G 165M5.1G4% /Home/DEV/SDB1 99G 188M 94G1%/data

The size of all the rows is added together, it can also approximate the hard disk sizes.

Reference:

1. Baidu Encyclopedia Introduction to Hyper-threading, dual-core, dual CPU in dual CPU: Dual CPU

2. CSDN Blog:View CPU information under Linux [/proc/cpuinfo]

3. CSDN Blog: Processor CPU concept and CPU multithreading

4. Blog Park Blog: Linux View System hardware information (detailed example)

View System configuration under Linux

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.