本文共 5690 字,大约阅读时间需要 18 分钟。
/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 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 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
processor : 0vendor_id : AuthenticAMDcpu family : 23model : 1model name : AMD EPYC 7501 32-Core Processorstepping : 2microcode : 0x1000065cpu MHz : 1999.650cache size : 512 KBphysical id : 0siblings : 1core id : 0cpu cores : 1apicid : 0initial apicid : 0fpu : yesfpu_exception : yescpuid level : 13wp : yesflags : 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 aratbugs : fxsave_leak sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypassbogomips : 3999.30TLB size : 1024 4K pagesclflush size : 64cache_alignment : 64address sizes : 40 bits physical, 48 bits virtualpower 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核处理器。
Together all this information tells the users about the architecture of the system in use.
所有这些信息共同告诉用户正在使用的系统的体系结构。
This file contains information about the system’s memory usage. To view the file we can use the :
该文件包含有关系统内存使用情况的信息。 要查看文件,我们可以使用 :
$ cat /proc/meminfo
MemTotal: 2035428 kBMemFree: 195028 kBMemAvailable: 1692724 kBBuffers: 108020 kBCached: 1451608 kBSwapCached: 16 kBActive: 539536 kBInactive: 1072496 kBActive(anon): 33308 kBInactive(anon): 27948 kBActive(file): 506228 kBInactive(file): 1044548 kBUnevictable: 18512 kBMlocked: 18512 kBSwapTotal: 524284 kBSwapFree: 524016 kBDirty: 0 kBWriteback: 0 kBAnonPages: 70920 kBMapped: 171140 kBShmem: 676 kBKReclaimable: 134660 kBSlab: 179536 kBSReclaimable: 134660 kBSUnreclaim: 44876 kBKernelStack: 2156 kBPageTables: 2324 kBNFS_Unstable: 0 kBBounce: 0 kBWritebackTmp: 0 kBCommitLimit: 1541996 kBCommitted_AS: 383328 kBVmallocTotal: 34359738367 kBVmallocUsed: 19176 kBVmallocChunk: 0 kBPercpu: 828 kBHardwareCorrupted: 0 kBAnonHugePages: 0 kBShmemHugePages: 0 kBShmemPmdMapped: 0 kBFileHugePages: 0 kBFilePmdMapped: 0 kBCmaTotal: 0 kBCmaFree: 0 kBHugePages_Total: 0HugePages_Free: 0HugePages_Rsvd: 0HugePages_Surp: 0Hugepagesize: 2048 kBHugetlb: 0 kBDirectMap4k: 102256 kBDirectMap2M: 1994752 kBDirectMap1G: 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 :
一些重要的领域是:
/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 .
/ proc / cpuinfo和/ proc / meminfo是虚拟/ proc文件系统的一部分。 这些包含有关系统处理器和内存的重要而详细的信息。 普通用户可能不需要此类信息,但是,系统管理员可能会发现它很有用。 要了解有关proc文件的更多信息,请阅读 。
翻译自:
/proc/cpuinfo
转载地址:http://vaozd.baihongyu.com/