/proc/cpuinfo

/proc is a directory in the Linux system that contains information about the system.

/ proc是Linux系统中的目录,其中包含有关系统的信息。

/proc is not a real file system, rather a virtual file system. It is sometimes also referred to as a process information pseudo-file system. This virtual file system is created on the fly when system boots and is dissolved at the time of system shut down.

/ proc不是真正的文件系统,而是虚拟文件系统。 有时也称为过程信息文件系统 。 该虚拟文件系统是在系统启动时动态创建的,并在系统关闭时被溶解。

It contains runtime system information instead of real files. To gain more information about the proc file read the man page.

它包含运行时系统信息,而不是实际文件。 要获取有关proc文件的更多信息,请阅读手册页。

We’ll look at two files particularly in /proc file system. /proc/cpuinfo and /proc/meminfo.

我们将研究两个文件,尤其是在/ proc文件系统中。 / proc / cpuinfo/ proc / meminfo。

/ proc / cpuinfo文件 (The /proc/cpuinfo file)

/proc/cpuinfo contains information about the processor, the Linux system is running on. It’s a read-only file.

/ proc / cpuinfo包含有关运行Linux系统的处理器的信息。 这是一个只读文件。

To view the proc/cpuinfo file use the cat command:

要查看proc / cpuinfo文件,请使用cat命令:


$ cat /proc/cpuinfo
Proccpuinfo File
Proccpuinfo文件

processor   : 0
vendor_id   : AuthenticAMD
cpu family  : 23
model       : 1
model name  : AMD EPYC 7501 32-Core Processor
stepping    : 2
microcode   : 0x1000065
cpu MHz     : 1999.650
cache size  : 512 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 mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw perfctr_core ssbd ibpb vmmcall fsgsbase tsc_adjust bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 virt_ssbd arat
bugs        : fxsave_leak sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass
bogomips    : 3999.30
TLB size    : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:

The contents of the file contain information about the processor.

该文件的内容包含有关处理器的信息。

It tells me that the model name of my processor is AMD EPYC 7501 32-Core Processor.

它告诉我处理器的型号名称是AMD EPYC 7501 32核处理器。

  • Vendor ID represents the name of the vendor that built the processor.供应商ID代表构建处理器的供应商的名称。
  • Cache size shows the amount of cache memory present.缓存大小显示存在的缓存内存量。
  • Processor value of 0 indicates a single processor system.处理器值0表示单个处理器系统。
  • Flags field shows which features are available in the CPU.标志字段显示CPU中可用的功能。

Together all this information tells the users about the architecture of the system in use.

所有这些信息共同告诉用户正在使用的系统的体系结构。

/ proc / meminfo文件 (/proc/meminfo file)

This file contains information about the system’s memory usage. To view the file we can use the cat command:

该文件包含有关系统内存使用情况的信息。 要查看文件,我们可以使用cat命令 :


$ cat /proc/meminfo

MemTotal:        2035428 kB
MemFree:          195028 kB
MemAvailable:    1692724 kB
Buffers:          108020 kB
Cached:          1451608 kB
SwapCached:           16 kB
Active:           539536 kB
Inactive:        1072496 kB
Active(anon):      33308 kB
Inactive(anon):    27948 kB
Active(file):     506228 kB
Inactive(file):  1044548 kB
Unevictable:       18512 kB
Mlocked:           18512 kB
SwapTotal:        524284 kB
SwapFree:         524016 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:         70920 kB
Mapped:           171140 kB
Shmem:               676 kB
KReclaimable:     134660 kB
Slab:             179536 kB
SReclaimable:     134660 kB
SUnreclaim:        44876 kB
KernelStack:        2156 kB
PageTables:         2324 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     1541996 kB
Committed_AS:     383328 kB
VmallocTotal:   34359738367 kB
VmallocUsed:       19176 kB
VmallocChunk:          0 kB
Percpu:              828 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
FileHugePages:         0 kB
FilePmdMapped:         0 kB
CmaTotal:              0 kB
CmaFree:               0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB
DirectMap4k:      102256 kB
DirectMap2M:     1994752 kB
DirectMap1G:           0 kB

The file contains information about free and used memory (both physical and swap) on the system as well as the shared memory and buffers used by the kernel.

该文件包含有关系统上的可用内存和已使用内存(物理内存和交换内存)以及内核使用的共享内存和缓冲区的信息。

Some of the important fields are :

一些重要的领域是:

  • MemTotal — Total amount of physical RAM in the system, in kilobytes.MemTotal-系统中物理RAM的总量,以千字节为单位。
  • MemFree — The amount of physical RAM, in kilobytes, left unused by the system.MemFree-系统未使用的物理RAM量(以千字节为单位)。
  • Buffers — The amount of physical RAM, in kilobytes, used for file buffers.缓冲区 -用于文件缓冲区的物理RAM量(以千字节为单位)。
  • Cached — The amount of physical RAM, in kilobytes, used as cache memory.缓存 -用作缓存的物理RAM量(以千字节为单位)。
  • SwapCached — The amount of swap space, in kilobytes, used as cache memory.SwapCached —用作缓存的交换空间量(以千字节为单位)。

结论 (Conclusion )

/proc/cpuinfo and /proc/meminfo are a part of the virtual /proc file system. These contain important and detailed information about the system’s processor and memory. Regular users might not require such information, however, system administrators might find it useful. To know more about the proc files read this.

/ proc / cpuinfo/ proc / meminfo是虚拟/ proc文件系统的一部分。 这些包含有关系统处理器和内存的重要而详细的信息。 普通用户可能不需要此类信息,但是,系统管理员可能会发现它很有用。 要了解有关proc文件的更多信息,请阅读此内容 。

翻译自: https://www.journaldev.com/41545/proc-cpuinfo-meminfo-files-linux

/proc/cpuinfo

/proc/cpuinfo_Linux中的/ proc / cpuinfo和/ proc / meminfo文件相关推荐

  1. /proc 文件系统中的文件及内容介绍

    好资料,有时间翻译. Linux System Configuration and the proc filesystem The /proc filesystem /proc文件系统是被用来存储许多 ...

  2. oracle 截取字符串中指定位置_手撕虚拟内存(1)——字符串在虚拟内存中的段位置与/proc虚拟文件系统...

    原文:Hack The Virtual Memory: C strings & /proc - Holberton 翻译:RobotCode俱乐部 介绍 这是一系列关于虚拟内存的小文章/教程中 ...

  3. 在/proc/devices中只能看见一个,请问是什么原因

    在/proc/devices中只能看见一个,请问是什么原因 #include <linux/module.h> #include <linux/types.h> #includ ...

  4. linux ruby作用域,浅谈ruby语言中的一些概念(lambda, proc, block)

    block 和 Proc ruby中的block是方法的一个重要但非必要的组成部分,任何方法后面都可以挂载一个block,如果你定义的方法想使用block做点事情.那么你需要使用yield关键字或者& ...

  5. r roc函数_如何处理R(pROC包)中的多类ROC分析?

    例如,当我在R(pROC包)中使用multiclass.roc函数时,我训练了随机森林的数据集,这是我的代码: # randomForest & pROC packages should be ...

  6. Linux挂载proc文件夹,Linux中/etc/fstab /etc/mtab /proc/mounts这三个文件的分析与比较

    本文主要讲解Linux中/etc/fstab /etc/mtab /proc/mounts这三个文件的作用以及不同之处. /etc/fstab 运维都知道的文件,若想把mount的disk和dir设置 ...

  7. linux分区表位置,Linux中/etc/fstab /etc/mtab /proc/mounts这三个文件的分析与比较 分区表位置...

    本文主要讲解Linux中/etc/fstab /etc/mtab /proc/mounts这三个文件的作用以及不同之处. 转自http://haohaozhang.blog.51cto.com/917 ...

  8. linux proc目录 是什么意思,linux 下proc目录里面有什么

    linux 下proc目录里面有什么 (2012-05-02 16:28:27) 标签: 杂谈 /proc/1 关于进程1的信息目录.每个进程在/proc 下有一个名为其进程号的目录. /proc/c ...

  9. 使用/proc/meminfo文件查看内存状态信息

    在Linux下可以使用/proc/meminfo文件查看操作系统内存的使用状态 # cat /proc/meminfo MemTotal: 16333852 kB MemFree: 1633564 k ...

最新文章

  1. c语言 石头剪刀布的小程序,C语言小程序(七)、石头剪刀布
  2. 使用Python解压zip、rar文件
  3. 尚硅谷最新版JavaWeb全套教程,java web零基础入门完整版(四)
  4. java实现js取反_特定位取反(js实现)
  5. github pages_在GitHub Pages上发布组织主页
  6. 一杯水怎么测试_每滴都是“芯”鲜好水,碧然德新款净水器实测
  7. linnux 流量控制模块tc_FS4008-40-08-CV-A气体质量流量计【汉川仪器】阿坝资讯
  8. 全国计算机 offic,全国计算机二级MSOffic选择题全.doc
  9. 关于runc漏洞CVE-2019-5736的修复公告 1
  10. vivado修改block design后更新进sdk
  11. php pmp是什么,pmp 总时差 自由时差 说明 和计算
  12. FOI2022 夏令营基础班 day1题解
  13. 如何求绝对值最小的数
  14. SSL_WRITE在断网时的表现
  15. Java 抽象类和接口,看这一篇就够了
  16. Unity的lookRotation和lookAt的区别理解,是什么意思。
  17. [激光原理与应用-17]:《激光原理与技术》-3- 激光的产生技术 与原理 - 微观粒子、能级、电子、光子、受激辐射
  18. C++for循环详解
  19. How to configure Copyright Profiles in IntelliJ IDEA
  20. 走好每一步,基于C实现机器人运动学建模与标定、运动规划、轨迹规划算法

热门文章

  1. 谷歌技术quot;三宝quot;之MapReduce
  2. 将Sphinx的日志放置到/dev/shm里需要注意的事情
  3. 浅析foreach原理
  4. [转载] python数学编程书推荐_图书推荐:《Python数学编程》
  5. [转载] python自带sqlite库_Python内置库SQlite3使用指南
  6. [转载] Java中方法不可以有默认参数
  7. [转载] XStream的分析
  8. JSP学习 三大指令、九个内置对象、JavaBean、EL表达式
  9. linux centos 系统php支持jpeg的安装方法
  10. ExtFrame的特点与缺点