查看服务器配置命令

服务器型号

dmidecode|grep "System Information" -A9|egrep "Manufacturer|Product"
        Manufacturer: Gigabyte Technology Co., Ltd.
        Product Name: Z370 AORUS ULTRA GAMING 2.0

操作系统内核信息

uname -a
Linux sf 4.15.0-47-generic #50~16.04.1-Ubuntu SMP Fri Mar 15 16:06:21 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

CPU性能

CPU型号

cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c 
 12  Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz

CPU详细信息

cat /proc/cpuinfo 
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 158
model name      : Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
stepping        : 10
microcode       : 0xaa
cpu MHz         : 4299.997
cache size      : 12288 KB
physical id     : 0
siblings        : 12
core id         : 0
cpu cores       : 6
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 22
wp              : yes

CPU统计信息

lscpu 
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                12
On-line CPU(s) list:   0-11
Thread(s) per core:    2
Core(s) per socket:    6
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 158
Model name:            Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
Stepping:              10
CPU MHz:               4299.846
CPU max MHz:           4600.0000
CPU min MHz:           800.0000
BogoMIPS:              6384.00
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              12288K
NUMA node0 CPU(s):     0-11
Flags:                 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 pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp flush_l1d

物理CPU个数

cat /proc/cpuinfo |grep "physical id"|sort|uniq|wc -l
1

每个物理CPU中core的个数

cat /proc/cpuinfo |grep "cpu cores"|wc -l
12

逻辑CPU个数

物理CPU个数*核数=逻辑CPU个数(不支持超线程技术的情况下)

cat /proc/cpuinfo |grep "processor"|wc -l
12

内存

内存插槽数及每个内存条大小

dmidecode|grep -A5 "Memory Device"|grep Size|grep -v Range
 Size: No Module Installed
 Size: 8192 MB
 Size: No Module Installed
  Size: 8192 M

参考资料

  1. 常用的Linux下查看服务器配置的命令
  2. linux 查看服务器配置
  3. linux服务器性能查看

你可能感兴趣的:(查看服务器配置命令)