CentOS7查看CPU和内存情况

2023-05-16

  本文简单介绍在CentOS7上查看CPU和内存情况。

查看CPU情况

  以下是个人工作会经常使用到的服务器的信息。

查看所有CPU信息

  可以通过如下命令查看所有CPU信息:


# cat /proc/cpuinfo  

[starnight@344eeb24-3fac-11e9-b49d-0014101d20c6 ~]$ cat /proc/cpuinfo 
processor    : 0
vendor_id    : GenuineIntel
cpu family    : 6
model        : 94
model name    : Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
stepping    : 3
microcode    : 0x7c
cpu MHz        : 3699.890
cache size    : 8192 KB
physical id    : 0
siblings    : 8
core id        : 0
cpu cores    : 4
apicid        : 0
initial apicid    : 0
fpu        : yes
fpu_exception    : yes
cpuid level    : 22
wp        : yes
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 arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb pln pts dtherm hwp hwp_noitfy hwp_act_window hwp_epp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves
bogomips    : 6816.08
clflush size    : 64
cache_alignment    : 64
address sizes    : 39 bits physical, 48 bits virtual
power management:

processor    : 1
vendor_id    : GenuineIntel
cpu family    : 6
model        : 94
model name    : Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
stepping    : 3
microcode    : 0x7c
cpu MHz        : 3699.890
cache size    : 8192 KB
physical id    : 0
siblings    : 8
core id        : 1
cpu cores    : 4
apicid        : 2
initial apicid    : 2
fpu        : yes
fpu_exception    : yes
cpuid level    : 22
wp        : yes
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 arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb pln pts dtherm hwp hwp_noitfy hwp_act_window hwp_epp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves
bogomips    : 6816.08
clflush size    : 64
cache_alignment    : 64
address sizes    : 39 bits physical, 48 bits virtual
power management:

processor    : 2
vendor_id    : GenuineIntel
cpu family    : 6
model        : 94
model name    : Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
stepping    : 3
microcode    : 0x7c
cpu MHz        : 3699.890
cache size    : 8192 KB
physical id    : 0
siblings    : 8
core id        : 2
cpu cores    : 4
apicid        : 4
initial apicid    : 4
fpu        : yes
fpu_exception    : yes
cpuid level    : 22
wp        : yes
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 arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb pln pts dtherm hwp hwp_noitfy hwp_act_window hwp_epp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves
bogomips    : 6816.08
clflush size    : 64
cache_alignment    : 64
address sizes    : 39 bits physical, 48 bits virtual
power management:

processor    : 3
vendor_id    : GenuineIntel
cpu family    : 6
model        : 94
model name    : Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
stepping    : 3
microcode    : 0x7c
cpu MHz        : 3699.890
cache size    : 8192 KB
physical id    : 0
siblings    : 8
core id        : 3
cpu cores    : 4
apicid        : 6
initial apicid    : 6
fpu        : yes
fpu_exception    : yes
cpuid level    : 22
wp        : yes
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 arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb pln pts dtherm hwp hwp_noitfy hwp_act_window hwp_epp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves
bogomips    : 6816.08
clflush size    : 64
cache_alignment    : 64
address sizes    : 39 bits physical, 48 bits virtual
power management:

processor    : 4
vendor_id    : GenuineIntel
cpu family    : 6
model        : 94
model name    : Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
stepping    : 3
microcode    : 0x7c
cpu MHz        : 3699.890
cache size    : 8192 KB
physical id    : 0
siblings    : 8
core id        : 0
cpu cores    : 4
apicid        : 1
initial apicid    : 1
fpu        : yes
fpu_exception    : yes
cpuid level    : 22
wp        : yes
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 arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb pln pts dtherm hwp hwp_noitfy hwp_act_window hwp_epp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves
bogomips    : 6816.08
clflush size    : 64
cache_alignment    : 64
address sizes    : 39 bits physical, 48 bits virtual
power management:

processor    : 5
vendor_id    : GenuineIntel
cpu family    : 6
model        : 94
model name    : Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
stepping    : 3
microcode    : 0x7c
cpu MHz        : 3699.890
cache size    : 8192 KB
physical id    : 0
siblings    : 8
core id        : 1
cpu cores    : 4
apicid        : 3
initial apicid    : 3
fpu        : yes
fpu_exception    : yes
cpuid level    : 22
wp        : yes
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 arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb pln pts dtherm hwp hwp_noitfy hwp_act_window hwp_epp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves
bogomips    : 6816.08
clflush size    : 64
cache_alignment    : 64
address sizes    : 39 bits physical, 48 bits virtual
power management:

processor    : 6
vendor_id    : GenuineIntel
cpu family    : 6
model        : 94
model name    : Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
stepping    : 3
microcode    : 0x7c
cpu MHz        : 3699.890
cache size    : 8192 KB
physical id    : 0
siblings    : 8
core id        : 2
cpu cores    : 4
apicid        : 5
initial apicid    : 5
fpu        : yes
fpu_exception    : yes
cpuid level    : 22
wp        : yes
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 arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb pln pts dtherm hwp hwp_noitfy hwp_act_window hwp_epp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves
bogomips    : 6816.08
clflush size    : 64
cache_alignment    : 64
address sizes    : 39 bits physical, 48 bits virtual
power management:

processor    : 7
vendor_id    : GenuineIntel
cpu family    : 6
model        : 94
model name    : Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
stepping    : 3
microcode    : 0x7c
cpu MHz        : 3699.890
cache size    : 8192 KB
physical id    : 0
siblings    : 8
core id        : 3
cpu cores    : 4
apicid        : 7
initial apicid    : 7
fpu        : yes
fpu_exception    : yes
cpuid level    : 22
wp        : yes
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 arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb pln pts dtherm hwp hwp_noitfy hwp_act_window hwp_epp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves
bogomips    : 6816.08
clflush size    : 64
cache_alignment    : 64
address sizes    : 39 bits physical, 48 bits virtual
power management:  
View Code

  通过一些正则命令,对信息进行简单处理得到我们想要直观了解的。

查看CPU处理器个数及核心数


[starnight@344eeb24-3fac-11e9-b49d-0014101d20c6 ~]$ cat /proc/cpuinfo | grep processor
processor    : 0
processor    : 1
processor    : 2
processor    : 3
processor    : 4
processor    : 5
processor    : 6
processor    : 7
[starnight@344eeb24-3fac-11e9-b49d-0014101d20c6 ~]$ cat /proc/cpuinfo | grep processor | wc -l
8
[starnight@344eeb24-3fac-11e9-b49d-0014101d20c6 ~]$ cat /proc/cpuinfo | grep cores
cpu cores    : 4
cpu cores    : 4
cpu cores    : 4
cpu cores    : 4
cpu cores    : 4
cpu cores    : 4
cpu cores    : 4
cpu cores    : 4  

  我们可以看到总共有8个CPU处理器,每个CPU含4个核心,所以总共是32核处理器。

查看内存情况

   可以通过如下命令查看系统内存情况。


[starnight@344eeb24-3fac-11e9-b49d-0014101d20c6 ~]$ cat /proc/meminfo
MemTotal:       32702400 kB
MemFree:         3832872 kB
MemAvailable:    9085276 kB
Buffers:          581664 kB
Cached:          4648776 kB
SwapCached:            0 kB
Active:         24087688 kB
Inactive:        3200156 kB
Active(anon):   22058572 kB
Inactive(anon):    15576 kB
Active(file):    2029116 kB
Inactive(file):  3184580 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       3932156 kB
SwapFree:        3932156 kB
Dirty:              1640 kB
Writeback:             0 kB
AnonPages:      22055476 kB
Mapped:           214600 kB
Shmem:             16764 kB
Slab:             366336 kB
SReclaimable:     292124 kB
SUnreclaim:        74212 kB
KernelStack:       47264 kB
PageTables:        92440 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    20283356 kB
Committed_AS:   44230900 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      605820 kB
VmallocChunk:   34359129668 kB
HardwareCorrupted:     0 kB
AnonHugePages:  18122752 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:      100336 kB
DirectMap2M:     2965504 kB
DirectMap1G:    30408704 kB  

  关于内存,更常用的命令是free。

free查看内存使用情况


[starnight@344eeb24-3fac-11e9-b49d-0014101d20c6 ~]$ free
              total        used        free      shared  buff/cache   available
Mem:       32702400    23234672     3867356       16812     5600372     9123264
Swap:       3932156           0     3932156
[starnight@344eeb24-3fac-11e9-b49d-0014101d20c6 ~]$ free -m    # 以M为单位显示
              total        used        free      shared  buff/cache   available
Mem:          31935       22690        3776          16        5469        8908
Swap:          3839           0        3839
[starnight@344eeb24-3fac-11e9-b49d-0014101d20c6 ~]$ free -h    # 以人可读的方式显示,单位G
              total        used        free      shared  buff/cache   available
Mem:            31G         22G        3.7G         16M        5.3G        8.7G
Swap:          3.7G          0B        3.7G  

  可以看到内存总共31G左右,可用8.7G。

查看CPU和内存使用情况

   Linux下可以使用Top命令查看系统CPU和内存的使用情况。

top命令详解


进程列表部分:
  PID:进程的ID   USER:进程所有者   PR:进程的优先级别,越小越优先被执行   NInice:值   VIRT:进程占用的虚拟内存   RES:进程占用的物理内存   SHR:进程使用的共享内存   S:进程的状态。S表示休眠,R表示正在运行,Z表示僵死状态,N表示该进程优先值为负数   %CPU:进程占用CPU的使用率   %MEM:进程使用的物理内存和总内存的百分比   TIME+:该进程启动后占用的总的CPU时间,即占用CPU使用时间的累加值。   COMMAND:进程启动命令名称

系统信息栏:  
  第一行(top):     系统当前时刻;     系统启动后到现在的运作时间;     当前登录到系统的用户,更确切的说是登录到用户的终端数;     当前系统负载的平均值,三个值分别为1分钟前、5分钟前、15分钟前进程的平均数;   第二行(Tasks):     total:当前系统进程总数;     running:当前运行中的进程数;     sleeping:当前处于睡眠状态中的进程数;     stopped:被停止的系统进程数;     zombie:僵尸进程数;   第三行(Cpus):     分别表示了 CPU 当前的使用率;   第四行(Mem):     分别表示了内存总量、当前使用量、空闲内存量、以及缓冲使用中的内存量;   第五行(Swap):     表示类别同第四行(Mem),但此处反映着交换分区(Swap)的使用情况。

参考:

  Linux查看CPU和内存使用情况

转载于:https://www.cnblogs.com/Hi-blog/p/How-To-Check-CPU-And-Memory-On-CentOS7-Linux-System.html

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

CentOS7查看CPU和内存情况 的相关文章

  • Python 函数的 return 是否是必须的?

    Python 函数的 return 是否是必须的 xff1f return 表达式 语句用于退出函数 xff0c 选择性地向调用方返回一个表达式 不带参数值的return语句返回None 来看一段关于 return 的描述 xff1a re
  • Flutter 获取控件尺寸和位置

    1 插件必须渲染好 final RenderBox box 61 globalKey currentContext findRenderObject final size 61 box size final topLeftPosition
  • kepserver中文手册,kepserver使用教程,kepserver设置

    下面介绍一下KepServer模拟器的使用 xff0c 以下示例使用服务器随附的 Simulator 驱动程序来演示创建 配置和运行项目的过程 Simulator 驱动程序是基于内存的驱动程序 xff0c 能为演示提供静态数据和变化数据 1
  • 15 THINGS ALL GIRLS SHOULD KNOW ABOUT THEIR VAGINA

    Here are 15 facts that EVERY GIRL should know about her vagina Don t be shy Your vagina is part of your body and it will
  • 生产者/消费者模式的理解及实现

    简介 生产者消费者模式并不是GOF提出的23种设计模式之一 xff0c 23种设计模式都是建立在面向对象的基础之上的 xff0c 但其实面向过程的编程中也有很多高效的编程模式 xff0c 生产者消费者模式便是其中之一 xff0c 它是我们编
  • ios如何翻外墙_华强北版本Airpods值得入手吗?如何避坑?

    和许多同行一样 xff0c 本该还是读书的年纪就来到华强北摸爬滚打 xff0c 已然过了78个年头 今天 xff0c 我们就来谈谈华强北版的Airpodspro是否值得入手以及入手如何避坑 对于华强北Airpods网上的评价褒贬不一 有的人
  • 《大数据时代》读书笔记

    大数据时代 英国人Viktor Mayer Schonberger的著作 最重要的一点是介绍了一种思维模式的变化 主要观点 xff1a 大数据是指获取全部数据样本 xff0c 分析全部数据 xff0c 而不是只做抽样分析 大数据分析更关注相
  • Spring中Bean管理的常用注解

    在Spring中 xff0c 主要用于管理bean的注解分为四大类 xff1a 1 用于创建对象 2 用于给对象的属性注入值 3 用于改变作用的范围 4 用于定义生命周期 这几个在开发中经常接触到 xff0c 也可以说每天都会遇见 其中创建
  • 解决Duplicate class xxx found in modules编译报错的问题

    如果在Android工程编译失败 xff0c 并出现如下错误 xff1a Duplicate class com mygroup mylib MyBean found in modules jetified baselib1 1 0 1 r
  • 课后作业3:个人项目(词频统计及其效能分析)

    1 个人信息 学号 xff1a 2017 7189姓名 xff1a 李博文码云地址 xff1a https gitee com libowena9 word frequency tree ES7189 2 程序分析 读取文件到缓冲区 def
  • IdentityServer4与ocelot实现认证与客户端统一入口

    关于IdentityServer4与ocelot博客园里已经有很多介绍我这里就不再重复了 ocelot与IdentityServer4组合认证博客园里也有很多 xff0c 但大多使用ocelot内置的认证 xff0c 而且大多都是用来认证A
  • JAVA: 接入YSDK遇到的问题

    JAVA后台接口 1 腾讯开放平台 http wiki open qq com wiki E9 A6 96 E9 A1 B5 2 YSDK介绍 大概流程 http wiki open qq com wiki YSDK E4 BB 8B E7
  • 红白黑球组合问题

    从3个红球 6个白球和7个黑球中 xff0c 任意取出8个球作为一组输出 xff0c 在每组中 xff0c 可以没有黑球 xff0c 但必须要有红球和白球 求总的组数以及每组的红球 白球 黑球的数目 思路 红球取值范围为1个到3个 xff0
  • 让我持续下去的理由

    牛仔裤 格子衬衫 运动鞋和双肩包 如果把这四个词放在一个人的身上 xff0c 似乎不用描述长相 xff0c 大家就对他的职业有了猜测 八成是个程序员吧 这个被笑称 月入五万过成月入五千样子 的群体 xff0c 以 收入高 脑回路简单 一成不
  • .NET程序集

    主要内容 64 将源代码编译为托管模块 64 将模块组合为程序集 64 共享程序集 xff08 强签名 xff09 概念阐述 64 将源代码编译为托管模块 1 在 NET框架里 xff0c 我们可以用任何支持CLR xff08 Common
  • android alertdialog横竖屏旋转_如何在哔哩哔哩做横竖屏直播

    哔哩哔哩 以下简称B站 xff0c 说到这个名字 xff0c 可能有些朋友比较陌生 xff0c 对于大多数的年轻人 xff0c 尤其是喜欢二次元文化的年轻人来说 xff0c B站是他们非常钟爱的直播平台 现在的B站已经不单单是一个视频网站
  • 读书小记--<态度>

    前言 前段时间再读了吴军老师的 态度 xff0c 分享的是和女儿的日常书信 觉得收获很多 xff0c 同事推荐他的 浪潮之巅 数学之美 系列书籍 下面是个人的觉得认同或值得深入学习的一些点 xff0c 特此记录一下 态度决定命运 文中写道撒
  • Oracle大表改为分区表及表空间切换方案

    Oracle大表改为分区表及表空间切换方案 一 背景 由于之前数据库表和索引放在一个表空间导致表空间数据文件增长太快 xff0c 文件数量即将达到Oracle表空间的限制 xff0c 需要对表 没有分区 xff0c 有些表数据量多达几十亿
  • ORACLE表、索引和分区

    ORACLE 表 索引和分区 一 数据库表 每种类型的表都有不同的特性 xff0c 分别应用与不同的领域 堆组织表 聚簇表 共三种 索引组织表 嵌套表 临时表 外部表和对象表 1 行迁移 建表过程中可以指定以下两个参数 xff1a PCTF
  • ffmpeg常用命令

    之前在处理监控视频时要对视频进行抽帧压缩 xff0c 使得视频大小限制在10M左右 xff0c 所以使用ffmpeg进行视频加工处理 xff0c 因为这个工具确实很强大 下面是用到的相关命令 xff0c 可以直接跳到最后一条命令 xff0c

随机推荐

  • 去哪儿网2015校招研发类笔试题

    从网上找到的题目 xff0c 自己做了一遍 1 二分查找 2 给定一个字符串 xff0c 得到这个字符串中首先出现两次的那个字符 方法 xff1a 可以用一个hash map或者数组来存储字符出现的次数 xff0c 一旦有一个出现了2次 x
  • WebGL学习笔记(4)

    本篇笔记加强了上篇笔记示例代码的程序 xff0c 实现了使用nodejs websocket来广播每个玩家的坐标数据并在同一个世界模型中进行多人在线交互 websocket服务端 xff1a 安装nodejs与npm xff0c 创建一个服
  • SPSS超详细操作:分层回归(hierarchical multiple regression)

    SPSS超详细操作 xff1a 分层回归 hierarchical multiple regression 1 问题与数据 最大携氧能力 maximal aerobic capacity VO2max 是评价人体健康的关键指标 xff0c
  • 6种自动化测试框架(总有一款适合你)

    不知不觉 xff0c 分享的框架已经6个了 xff08 准确说应该是4个 xff09 xff0c 仅仅是接口的 这些框架都是最基础的框架 xff0c 需要根据实际使用场景进行完善 xff0c 大家就当练手实践吧 不需要写代码的自动化框架 J
  • Selenium爬取元素下子元素方法

    Selenium提供了一下方法来定义一个页面中的元素 xff1a find element by id find element by name find element by xpath find element by link text
  • js promise中如何取到[[PromiseValue]]

    返回的值 br Promise span class hljs string PromiseStatus span class hljs string 34 resolved 34 span class hljs string Promis
  • 对比kali linux 的gnome 版本 和 xfce版本 哪个更适合荣耀magicbook锐龙版

    先说明2个点 xff1a 1 我个人使用的是荣耀magicbook锐龙版的第一代就是2018年发布的那款 xff0c BIOS版本是目前最新版1 22 额外说下magicbook这bios界面真心无力吐槽 xff0c 但还好功能基本够用 2
  • 趣味离散数学题(巧猜围棋子)

    甲手里有一个围棋子 xff0c 要乙来猜棋子的颜色是白的还是黑的 xff0e 条件是 xff1a 只允许乙问一个只能回答 是 或 否 的问题 xff0c 但甲可以说真话 xff0c 也可以说假话 xff0e 问乙可以向甲提出一个什么问题 x
  • ubuntu terminal 介绍及相关命令

    ubuntu的terminal 1 调出方法 windows键 43 T 2 终端显示内容 3 查看当前所在目录的绝对路径 pwd命令 eg1 xff1a eg2 xff1a linux严格区分大小写 4 更改 进入目录 cd命令 xff0
  • 激活Debian 7 的桌面(把图标放在桌面上)

    转 xff1a http www acyoo com archives 3017 html Debian 7的默认桌面是Gnome 3 刚装好时无法在桌面进行任何操作 xff0c 不过只需要设置一下就可以了 xff1a 左上角的Activi
  • safari浏览器打不开该网页,提示无法连接服务器如何处理

    现在一些科技类型大公司 xff0c 都自主研发APP 浏览器等 xff0c 像阿里巴巴的UC浏览器 xff0c 腾讯的QQ浏览器 xff0c 苹果公司的safari浏览器等 xff0c 最近 xff0c 苹果用户的小伙伴提到safari浏览
  • EFCore自动迁移

    2019 05 14 xff0c EFCore 2 2 4 有两种方式 xff1a 1 使用Migrate 方法 code if DbContext Database GetPendingMigrations Any DbContext D
  • ffmpeg失败 python_由于ffmpeg不可用,matplotlib动画艺术动画失败ab

    我正在打电话matplotlib animation ArtistAnimation从一系列png图像制作动画 xff0c 但是我得到了一个连接到ffmpeg的错误 我在我的ubuntu14 04上安装了Anaconda 我得到的错误消息是
  • Ubuntu18.06 Mate桌面环境下VirtuslBox打开虚拟机“全局菜单”异常退出解决办法

    在安装完Ubuntu18 06 Mate桌面环境后在VirtuslBox里打开虚拟机会出现 全局菜单 异常退出问题 产生上面问题的原因是你的虚拟机可能在 显示 61 gt 屏幕 61 gt 硬件加速里勾选了 61 gt 启用3D加速 xff
  • SQL Server on Ubuntu——Ubuntu上的SQL Server(全截图)

    本文从零开始一步一步介绍如何在Ubuntu上搭建SQL Server 2017 xff0c 包括安装系统 安装SQL等相关步骤和方法 xff08 仅供测试学习之用 xff0c 基础篇 xff09 一 xff0e 创建Ubuntu系统 xff
  • 增量式编码器计数的过零点处理问题

    在增量式编码器位置计数过程中 xff0c 每经过一个计数溢出 xff0c 根据运转方向 xff0c 在update中断里我们会对圈数加1或者减1 if TIMx gt SR amp TIM FLAG Update 61 61 TIM FLA
  • PHP处理base64编码字符串

    接收前端传过来的base64编码后的字符串 如果是json字符串 那么PHP使用file get contents 39 php input 39 来接收 本次这里是以post传参的形式传base64字符串 photo 61 Yii app
  • PHP解决h5页面跨域

    前端h5 页面请求后端接口会出现跨域 PHP 只需三行代码即可解决 解决前端跨域 h5页面 header 34 Access Control Allow Origin 34 允许访问的来源域名 header 39 Access Contro
  • Robot Framework自定义测试库的作用域的理解

    robot framework中 xff0c 强大的测试库api支持 xff0c 用户可根据实际需求定义测试库 xff0c 导入后可使用自定义库中相应的关键字 当自定义的测试库是类库 xff0c 则需要考虑一个问题 xff1a 类实例 用类
  • CentOS7查看CPU和内存情况

    本文简单介绍在CentOS7上查看CPU和内存情况 查看CPU情况 以下是个人工作会经常使用到的服务器的信息 查看所有CPU信息 可以通过如下命令查看所有CPU信息 xff1a cat proc cpuinfo starnight 64 3