CentOS   发布时间:2022-04-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Centos 查看内存和CPU大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

概述

查看内存使用   free -mh 读出的内核信息进行解释   cat /proc/meminfo Mem@R_100_10586@l: 16438852 kB #所有可用RAM大小 (即物理内存减去一些预留位和内核的二进制代码大小) MemFree: 10980184 kB #LowFree与HighFree的总和,被系统留着未使用的内存 Buffers: 95884 kB #用来给文件做缓冲大小 Cached:
  • 查看内存使用
  •   free -mh

    1. 读出的内核信息进行解释

      cat /proc/meminfo

    @H_380_20@mem@R_100_10586@l: 16438852 kB #所有可用RAM大小 (即物理内存减去一些预留位和内核的二进制代码大小)@H_816_29@memFree: 10980184 kB #LowFree与HighFree的总和,被系统留着未使用的内存
    Buffers: 95884 kB #用来给文件做缓冲大小
    Cached: 224108 kB #被高速缓冲存储器(cache memory)用的内存的大小(等于 diskcache minus SwapCachE)
    SwapCached: 0 kB #被高速缓冲存储器(cache memory)用的交换空间的大小 已经被交换出来的内存,但仍然被存放在swapfile中。用来在需要的时候很快的被替换而不需要再次打开I/O端口。
    Active: 5161616 kB #在活跃使用中的缓冲或高速缓冲存储器页面文件的大小,除非非常必要否则不会被移作他用.
    Inactive: 217660 kB #在不经常使用中的缓冲或高速缓冲存储器页面文件的大小,可能被用于其他途径.
    High@R_100_10586@l: 0 kB
    HighFree: 0 kB
    Low@R_100_10586@l: 16438852 kB
    LowFree: 10980184 kB
    Swap@R_100_10586@l: 1048536 kB
    SwapFree: 1048536 kB
    Dirty: 424 kB
    WriteBACk: 0 kB
    AnonPages: 5059312 kB@H_816_29@mapped: 20424 kB
    Slab: 38176 kB
    PageTables: 13480 kB
    NFS_Unstable: 0 kB
    Bounce: 0 kB
    CommitLimit: 9267960 kB
    Committed_AS: 10073960 kB
    Vmalloc@R_100_10586@l: 34359738367 kB
    VmallocUsed: 263672 kB
    VmallocChunk: 34359473751 kB
    HugePages_@R_100_10586@l: 0
    HugePages_Free: 0
    HugePages_Rsvd: 0
    Hugepagesize: 2048 kB

    查看cpu内核数,physical id不同数字的数量是几个就是几个cpu,cpu cores : 2代表是2核,如下是一个2核的cpu

    [[email protected] ~]# cat /proc/cpuinfo
    processor : 0
    vendor_id : GenuineIntel
    cpu family : 6@H_816_29@model : 45@H_816_29@model name : Intel(R) Xeon(R) cpu E5-2620 0 @ 2.00GHz
    stepping : 7@H_816_29@microcode : 0x714
    cpu MHz : 1999.999
    cache size : 15360 KB
    physical id : 0
    siblings : 2
    core id : 0
    cpu cores : 2
    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 dts mmx fxsr sse sse2 ss ht syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology tsc_reliable nonstop_tsc aperfmperf eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm tsc_adjust dtherm ida arat pln pts
    bogomips : 3999.99
    clflush size : 64
    cache_alignment : 64
    address sizes : 42 bits physical,48 bits virtual
    power management:

    processor : 1vendor_id : GenuineIntelcpu family : 6model : 45model name : Intel(R) Xeon(R) cpu E5-2620 0 @ 2.00GHzstepping : 7microcode : 0x714cpu MHz : 1999.999cache size : 15360 KBphysical id : 0siblings : 2core id : 1cpu cores : 2apicid : 1initial apicid : 1fpu : yesfpu_exception : yescpuid level : 13wp : yesflags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss ht syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology tsc_reliable nonstop_tsc aperfmperf eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm tsc_adjust dtherm ida arat pln ptsbogomips : 3999.99clflush size : 64cache_alignment : 64address sizes : 42 bits physical,48 bits virtual

    大佬总结

    以上是大佬教程为你收集整理的Centos 查看内存和CPU全部内容,希望文章能够帮你解决Centos 查看内存和CPU所遇到的程序开发问题。

    如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

    本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
    如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。