CPU
1. lscpu: display cpu architecture information
[XXX @ localhost ~ ] $ lscpu Architecture: the x86_64 the CPU OP -mode (S): 32 -bit, 64 - 'bit Byte the Order: Little Endian the CPU (S): . 4 # The total number of processor cores the On -line the CPU (S) List: 0 - 3 the thread (S) per core: 1 # number of threads per core support. 1 indicates that only one thread support, i.e., does not support Hyper Core (S) per Socket: 1 # each processor cores the Socket (S): . 4 # number of processors NUMA Node (S): 1 Vendor ID: GenuineIntel the CPU family: . 6 the Model: 63 is Stepping: 0 the CPU MHz: 2599.998 BogoMIPS: 5199.99 Hypervisor in Vendor: the VMware # hypervisor Supplier the Virtualization type: Full the L1d Cache: 32K of L1i Cache: 32K L2 of Cache: 256K L3 Cache: 30720K NUMA NODE0 the CPU (S): 0 - 3
The total number of processor cores processors * = the number of threads per processor * number of cores each core supports. Namely: CPU (s) = Socket (s) * Core (s) * Thread (s).
We look at how MAN is described:
[XXX @ localhost ~ ] $ man lscpu the COLUMNS the CPU of The Logical the CPU Number of A the CPU AS Used by The the Linux Kernel. # logical number the CPU the CORE of The Logical Core Number. A Core CAN Contain Several CPUs. # logic cores SOCKET The logical socket number. A socket can contain several cores . # logical slot (channel) number
2. cat / proc / cpuinfo: CPU View Details
[xxx@localhost ~]$ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 63 model name : Intel(R) Xeon(R) CPU E5-2690 v3 @ 2.60GHz stepping : 0 cpu MHz : 2599.998 cache size : 30720 KB fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : 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 aperfmperf unfair_spinlock pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx hypervisor lahf_lm ida arat epb pln pts dts bogomips : 5199.99 clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 63 model name : Intel(R) Xeon(R) CPU E5-2690 v3 @ 2.60GHz stepping : 0 cpu MHz : 2599.998 cache size : 30720 KB fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : 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 aperfmperf unfair_spinlock pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx hypervisor lahf_lm ida arat epb pln pts dts bogomips : 5199.99 clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: processor : 2 vendor_id : GenuineIntel cpu family : 6 model : 63 model name : Intel(R) Xeon(R) CPU E5-2690 v3 @ 2.60GHz stepping : 0 cpu MHz : 2599.998 cache size : 30720 KB fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : 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 aperfmperf unfair_spinlock pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx hypervisor lahf_lm ida arat epb pln pts dts bogomips : 5199.99 clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: processor : 3 vendor_id : GenuineIntel cpu family : 6 model : 63 model name : Intel(R) Xeon(R) CPU E5-2690 v3 @ 2.60GHz stepping : 0 cpu MHz : 2599.998 cache size : 30720 KB fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : 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 aperfmperf unfair_spinlock pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx hypervisor lahf_lm ida arat epb pln pts dts bogomips : 5199.99 clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management:
Such output, then, some more content, looks a bit confused. We can use a few commands to view the information we want to know:
# View the number of physical CPU CAT / proc / cpuinfo | grep " PHYSICAL the above mentioned id " | the Sort | uniq # view in each physical CPU core number (ie audit) CAT / proc / cpuinfo | grep " the CPU Cores " | uniq # Check each physical CPU threads in the number of CAT / proc / cpuinfo | grep " SIBLINGS " | uniq # view the logical CPU number of CAT / proc / cpuinfo | grep " Processor " # View CPU model CAT / proc / cpuinfo | grep " Model name " | uniq
RAM
View / proc / meminfo or use the free command. free command information is obtained from the meminfo. Under normal circumstances, you can get free use of the information we want to know:
free -h
[xxx@localhost ~]$ free -m total used free shared buffers cached Mem: 7868 954 6914 0 64 619 -/+ buffers/cache: 271 7597 Swap: 4031 0 4031
As can be seen, the memory size is 8G.
hard disk
1. lsblk: blk is an abbreviation of the block. List block device
[xxx@localhost ~]$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sr0 11:0 1 1024M 0 rom sdb 8:16 0 100G 0 disk └─sdb1 8:17 0 100G 0 part /data sda 8:0 0 60G 0 disk ├─sda1 8:1 0 500M 0 part /boot └─sda2 8:2 0 59.5G 0 part ├─VolGroup-lv_root (dm-0) 253:0 0 50G 0 lvm / ├─VolGroup-lv_swap (dm-1) 253:1 0 4G 0 lvm [SWAP] └─VolGroup-lv_home (dm-2) 253:2 0 5.6G 0 lvm /home
Wherein, TYPE = disk indicates the hard drive. As can be seen, the hard disk is divided into sda and sdb, a total of 160G.
2. df: View disk usage
[xxx@localhost ~]$ df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup-lv_root 50G 1.7G 46G 4% / tmpfs 3.9G 0 3.9G 0% /dev/shm /dev/sda1 485M 39M 421M 9% /boot /dev/mapper/VolGroup-lv_home 5.5G 165M 5.1G 4% /home /dev/sdb1 99G 188M 94G 1% /data
Size for all rows add up to the whole, you can probably calculate the hard disk size.
reference:
1. Baidu Encyclopedia introduction of dual-CPU, Hyper-Threading, dual-core, dual-CPU: Dual CPU
2. CSDN blog: View CPU information under Linux [/ proc / cpuinfo]
3. CSDN blog: processor CPU and multi-threading CPU concept
4. Park blog blog: Linux View system hardware information (example explanation)
Transfer: https://www.cnblogs.com/alwu007/p/6024631.html