0 环境信息
CentOS 7.6.1810(虚拟机)
1 查看内核信息
-
cat /proc/version
cat /proc/version
显示运行中的内核版本。
# cat /proc/version
Linux version 3.10.0-957.27.2.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) ) #1 SMP Mon Jul 29 17:46:05 UTC 2019
-
uname -a
显示计算机以及操作系统的相关信息。
# uname -a
Linux 10-46-5-230 3.10.0-957.27.2.el7.x86_64 #1 SMP Mon Jul 29 17:46:05 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
2 系统版本命令
-
lsb_release -a
需要安装lsb
# yum install lsb
# lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.6.1810 (Core)
Release: 7.6.1810
Codename: Core
-
cat /etc/redhat-release
(RedHat系列发布版本)
# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
3 查看CPU信息
cat /proc/cpuinfo
# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 61
model name : Intel Core Processor (Broadwell, no TSX)
stepping : 2
microcode : 0x1
cpu MHz : 2194.916
cache size : 16384 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
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 mmx fxsr sse sse2 syscall nx rdtscp lm constant_tsc rep_good nopl xtopology eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap xsaveopt arat
bogomips : 4389.83
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 61
model name : Intel Core Processor (Broadwell, no TSX)
stepping : 2
microcode : 0x1
cpu MHz : 2194.916
cache size : 16384 KB
physical id : 1
siblings : 1
core id : 0
cpu cores : 1
apicid : 1
initial apicid : 1
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 mmx fxsr sse sse2 syscall nx rdtscp lm constant_tsc rep_good nopl xtopology eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap xsaveopt arat
bogomips : 4389.83
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
4 查看内存信息
cat /proc/meminfo
# cat /proc/meminfo
MemTotal: 1896268 kB
MemFree: 354056 kB
MemAvailable: 1432588 kB
Buffers: 2068 kB
Cached: 1260980 kB
SwapCached: 108 kB
Active: 696112 kB
Inactive: 609936 kB
Active(anon): 99732 kB
Inactive(anon): 50540 kB
Active(file): 596380 kB
Inactive(file): 559396 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 524284 kB
SwapFree: 523508 kB
Dirty: 24 kB
Writeback: 0 kB
AnonPages: 42796 kB
Mapped: 22584 kB
Shmem: 107272 kB
Slab: 165736 kB
SReclaimable: 107952 kB
SUnreclaim: 57784 kB
KernelStack: 3728 kB
PageTables: 5072 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 1472416 kB
Committed_AS: 300956 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 44664 kB
VmallocChunk: 34359684860 kB
HardwareCorrupted: 0 kB
AnonHugePages: 6144 kB
CmaTotal: 0 kB
CmaFree: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 63344 kB
DirectMap2M: 2033664 kB