老韩Linux SRE
如何使用 Linux Cockpit 来管理系统性能,测试环境信息如下。
[root@hanyw-tomcat-springboot ~]# cat /etc/redhat-release CentOS Linux release 7.8.2003 (Core)[root@hanyw-tomcat-springboot ~]# uname -aLinux hanyw-tomcat-springboot 3.10.0-1127.el7.x86_64 #1 SMP Tue Mar 31 23:36:51 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
CPU信息如下。
[root@hanyw-tomcat-springboot ~]# cat /proc/cpuinfo processor: 0vendor_id: GenuineIntelcpu family: 6model: 63model name: Intel(R) Xeon(R) CPU E5-2678 v3 @ 2.50GHzstepping: 2microcode: 0x43cpu MHz: 2494.224cache size: 30720 KBphysical id: 0siblings: 1core id: 0cpu cores: 1apicid: 0initial apicid: 0fpu: yesfpu_exception: yescpuid level: 15wp: yesflags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc 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 invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid xsaveopt arat md_clear spec_ctrl intel_stibp flush_l1d arch_capabilitiesbogomips: 4988.44clflush size: 64cache_alignment: 64address sizes: 45 bits physical, 48 bits virtualpower management:processor: 1vendor_id: GenuineIntelcpu family: 6model: 63model name: Intel(R) Xeon(R) CPU E5-2678 v3 @ 2.50GHzstepping: 2microcode: 0x43cpu MHz: 2494.224cache size: 30720 KBphysical id: 2siblings: 1core id: 0cpu cores: 1apicid: 2initial apicid: 2fpu: yesfpu_exception: yescpuid level: 15wp: yesflags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc 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 invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid xsaveopt arat md_clear spec_ctrl intel_stibp flush_l1d arch_capabilitiesbogomips: 4988.44clflush size: 64cache_alignment: 64address sizes: 45 bits physical, 48 bits virtualpower management:processor: 2vendor_id: GenuineIntelcpu family: 6model: 63model name: Intel(R) Xeon(R) CPU E5-2678 v3 @ 2.50GHzstepping: 2microcode: 0x43cpu MHz: 2494.224cache size: 30720 KBphysical id: 4siblings: 1core id: 0cpu cores: 1apicid: 4initial apicid: 4fpu: yesfpu_exception: yescpuid level: 15wp: yesflags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc 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 invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid xsaveopt arat md_clear spec_ctrl intel_stibp flush_l1d arch_capabilitiesbogomips: 4988.44clflush size: 64cache_alignment: 64address sizes: 45 bits physical, 48 bits virtualpower management:processor: 3vendor_id: GenuineIntelcpu family: 6model: 63model name: Intel(R) Xeon(R) CPU E5-2678 v3 @ 2.50GHzstepping: 2microcode: 0x43cpu MHz: 2494.224cache size: 30720 KBphysical id: 6siblings: 1core id: 0cpu cores: 1apicid: 6initial apicid: 6fpu: yesfpu_exception: yescpuid level: 15wp: yesflags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc 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 invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid xsaveopt arat md_clear spec_ctrl intel_stibp flush_l1d arch_capabilitiesbogomips: 4988.44clflush size: 64cache_alignment: 64address sizes: 45 bits physical, 48 bits virtualpower management:processor: 4vendor_id: GenuineIntelcpu family: 6model: 63model name: Intel(R) Xeon(R) CPU E5-2678 v3 @ 2.50GHzstepping: 2microcode: 0x43cpu MHz: 2494.224cache size: 30720 KBphysical id: 8siblings: 1core id: 0cpu cores: 1apicid: 8initial apicid: 8fpu: yesfpu_exception: yescpuid level: 15wp: yesflags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc 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 invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid xsaveopt arat md_clear spec_ctrl intel_stibp flush_l1d arch_capabilitiesbogomips: 4988.44clflush size: 64cache_alignment: 64address sizes: 45 bits physical, 48 bits virtualpower management:processor: 5vendor_id: GenuineIntelcpu family: 6model: 63model name: Intel(R) Xeon(R) CPU E5-2678 v3 @ 2.50GHzstepping: 2microcode: 0x43cpu MHz: 2494.224cache size: 30720 KBphysical id: 10siblings: 1core id: 0cpu cores: 1apicid: 10initial apicid: 10fpu: yesfpu_exception: yescpuid level: 15wp: yesflags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc 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 invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid xsaveopt arat md_clear spec_ctrl intel_stibp flush_l1d arch_capabilitiesbogomips: 4988.44clflush size: 64cache_alignment: 64address sizes: 45 bits physical, 48 bits virtualpower management:processor: 6vendor_id: GenuineIntelcpu family: 6model: 63model name: Intel(R) Xeon(R) CPU E5-2678 v3 @ 2.50GHzstepping: 2microcode: 0x43cpu MHz: 2494.224cache size: 30720 KBphysical id: 12siblings: 1core id: 0cpu cores: 1apicid: 12initial apicid: 12fpu: yesfpu_exception: yescpuid level: 15wp: yesflags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc 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 invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid xsaveopt arat md_clear spec_ctrl intel_stibp flush_l1d arch_capabilitiesbogomips: 4988.44clflush size: 64cache_alignment: 64address sizes: 45 bits physical, 48 bits virtualpower management:processor: 7vendor_id: GenuineIntelcpu family: 6model: 63model name: Intel(R) Xeon(R) CPU E5-2678 v3 @ 2.50GHzstepping: 2microcode: 0x43cpu MHz: 2494.224cache size: 30720 KBphysical id: 14siblings: 1core id: 0cpu cores: 1apicid: 14initial apicid: 14fpu: yesfpu_exception: yescpuid level: 15wp: yesflags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc 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 invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid xsaveopt arat md_clear spec_ctrl intel_stibp flush_l1d arch_capabilitiesbogomips: 4988.44clflush size: 64cache_alignment: 64address sizes: 45 bits physical, 48 bits virtualpower management:processor: 8vendor_id: GenuineIntelcpu family: 6model: 63model name: Intel(R) Xeon(R) CPU E5-2678 v3 @ 2.50GHzstepping: 2microcode: 0x43cpu MHz: 2494.224cache size: 30720 KBphysical id: 16siblings: 1core id: 0cpu cores: 1apicid: 16initial apicid: 16fpu: yesfpu_exception: yescpuid level: 15wp: yesflags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc 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 invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid xsaveopt arat md_clear spec_ctrl intel_stibp flush_l1d arch_capabilitiesbogomips: 4988.44clflush size: 64cache_alignment: 64address sizes: 45 bits physical, 48 bits virtualpower management:processor: 9vendor_id: GenuineIntelcpu family: 6model: 63model name: Intel(R) Xeon(R) CPU E5-2678 v3 @ 2.50GHzstepping: 2microcode: 0x43cpu MHz: 2494.224cache size: 30720 KBphysical id: 18siblings: 1core id: 0cpu cores: 1apicid: 18initial apicid: 18fpu: yesfpu_exception: yescpuid level: 15wp: yesflags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc 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 invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid xsaveopt arat md_clear spec_ctrl intel_stibp flush_l1d arch_capabilitiesbogomips: 4988.44clflush size: 64cache_alignment: 64address sizes: 45 bits physical, 48 bits virtualpower management:processor: 10vendor_id: GenuineIntelcpu family: 6model: 63model name: Intel(R) Xeon(R) CPU E5-2678 v3 @ 2.50GHzstepping: 2microcode: 0x43cpu MHz: 2494.224cache size: 30720 KBphysical id: 20siblings: 1core id: 0cpu cores: 1apicid: 20initial apicid: 20fpu: yesfpu_exception: yescpuid level: 15wp: yesflags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc 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 invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid xsaveopt arat md_clear spec_ctrl intel_stibp flush_l1d arch_capabilitiesbogomips: 4988.44clflush size: 64cache_alignment: 64address sizes: 45 bits physical, 48 bits virtualpower management:processor: 11vendor_id: GenuineIntelcpu family: 6model: 63model name: Intel(R) Xeon(R) CPU E5-2678 v3 @ 2.50GHzstepping: 2microcode: 0x43cpu MHz: 2494.224cache size: 30720 KBphysical id: 22siblings: 1core id: 0cpu cores: 1apicid: 22initial apicid: 22fpu: yesfpu_exception: yescpuid level: 15wp: yesflags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc 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 invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid xsaveopt arat md_clear spec_ctrl intel_stibp flush_l1d arch_capabilitiesbogomips: 4988.44clflush size: 64cache_alignment: 64address sizes: 45 bits physical, 48 bits virtualpower management:processor: 12vendor_id: GenuineIntelcpu family: 6model: 63model name: Intel(R) Xeon(R) CPU E5-2678 v3 @ 2.50GHzstepping: 2microcode: 0x43cpu MHz: 2494.224cache size: 30720 KBphysical id: 24siblings: 1core id: 0cpu cores: 1apicid: 24initial apicid: 24fpu: yesfpu_exception: yescpuid level: 15wp: yesflags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc 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 invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid xsaveopt arat md_clear spec_ctrl intel_stibp flush_l1d arch_capabilitiesbogomips: 4988.44clflush size: 64cache_alignment: 64address sizes: 45 bits physical, 48 bits virtualpower management:processor: 13vendor_id: GenuineIntelcpu family: 6model: 63model name: Intel(R) Xeon(R) CPU E5-2678 v3 @ 2.50GHzstepping: 2microcode: 0x43cpu MHz: 2494.224cache size: 30720 KBphysical id: 26siblings: 1core id: 0cpu cores: 1apicid: 26initial apicid: 26fpu: yesfpu_exception: yescpuid level: 15wp: yesflags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc 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 invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid xsaveopt arat md_clear spec_ctrl intel_stibp flush_l1d arch_capabilitiesbogomips: 4988.44clflush size: 64cache_alignment: 64address sizes: 45 bits physical, 48 bits virtualpower management:processor: 14vendor_id: GenuineIntelcpu family: 6model: 63model name: Intel(R) Xeon(R) CPU E5-2678 v3 @ 2.50GHzstepping: 2microcode: 0x43cpu MHz: 2494.224cache size: 30720 KBphysical id: 28siblings: 1core id: 0cpu cores: 1apicid: 28initial apicid: 28fpu: yesfpu_exception: yescpuid level: 15wp: yesflags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc 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 invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid xsaveopt arat md_clear spec_ctrl intel_stibp flush_l1d arch_capabilitiesbogomips: 4988.44clflush size: 64cache_alignment: 64address sizes: 45 bits physical, 48 bits virtualpower management:processor: 15vendor_id: GenuineIntelcpu family: 6model: 63model name: Intel(R) Xeon(R) CPU E5-2678 v3 @ 2.50GHzstepping: 2microcode: 0x43cpu MHz: 2494.224cache size: 30720 KBphysical id: 30siblings: 1core id: 0cpu cores: 1apicid: 30initial apicid: 30fpu: yesfpu_exception: yescpuid level: 15wp: yesflags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc 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 invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid xsaveopt arat md_clear spec_ctrl intel_stibp flush_l1d arch_capabilitiesbogomips: 4988.44clflush size: 64cache_alignment: 64address sizes: 45 bits physical, 48 bits virtualpower management:
内存信息如下。
[root@hanyw-tomcat-springboot ~]# free -g total used free shared buff/cache availableMem: 15 0 14 0 0 14Swap: 0 0 0
查询cockpit信息,需安装epel源。
[root@hanyw-tomcat-springboot ~]# yum info cockpitLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * base: mirrors.bupt.edu.cn * extras: mirrors.aliyun.com * updates: mirrors.aliyun.comInstalled PackagesName : cockpitArch : x86_64Version : 195.12Release : 1.el7.centosSize : 51 kRepo : installedFrom repo : extrasSummary : Web Console for Linux serversURL : https://cockpit-project.org/License : LGPLv2+Description : The Cockpit Web Console enables users to administer GNU/Linux servers using a : web browser. : : It offers network configuration, log inspection, diagnostic reports, SELinux : troubleshooting, interactive command-line sessions, and more.
启动cockpit服务,并设置开机启动。
[root@hanyw-tomcat-springboot ~]# systemctl enable cockpit --now
查看端口
[root@hanyw-tomcat-springboot ~]# netstat -ntplActive Internet connections (only servers)Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1167/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1352/master tcp6 0 0 :::22 :::* LISTEN 1167/sshd tcp6 0 0 ::1:25 :::* LISTEN 1352/master tcp6 0 0 :::9090 :::* LISTEN 1/systemd
Web浏览器访问
老韩Linux SRE
老韩Linux SRE
留言与评论(共有 0 条评论) “” |