CPU信息查看的工具
CPU信息查看的工具
背景
信创国产化如火如荼.
CPU的型号其实越来越多
lscpu出来的结果其实太抽象, 对CPU的缓存架构显示不充分
今天在看大佬的文章是看到了一个工具:
hwloc
感觉非常优秀.
想学习一下
https://plantegg.github.io/2023/12/23/几款不同的CPU一些数据--备查5/
第一步安装
yum install hwloc* -y
注意于原文不太一样, 显示图片需要安装gui组件.
另外这个软件包 base 包里面就有 安装还是比较简单的.
简单使用
lstopo
部分参数介绍
*PU P#*是处理单元处理器# - 这些是CPU核心内的处理元素,从图片中我们可以看到4个核心,每个核心有2个处理元素(超线程),总共有8个,但实际是4个。
L#i代表指令高速缓存。
L#d代表数据高速缓存。
L1代表1级缓存。
L2代表第2级高速缓存。
L3代表三级缓存。
链接:https://juejin.cn/post/7117544110856077343
可以使用 lstopo zhaobsh.png 直接转储成图片.
查看内存信息
dmidecode -t memory
其实可以如下处理:
dmidecode -t
dmidecode: option requires an argument -- 't'
Type number or keyword expected
Valid type keywords are:
bios
system
baseboard
chassis
processor
memory
cache
connector
slot
其实可以根据类型进行查看
比如dmidecode -t cache
查看缓存等信息
查看帮助
lstopo --help
Usage: lstopo [ options ] ... [ filename.format ]
See lstopo(1) for more details.
Default output is graphical (X11) if DISPLAY is set, console otherwise.
Supported output file formats: console, ascii, fig, pdf, ps, png, svg, xml, synthetic
Formatting options:
-l --logical Display hwloc logical object indexes
(default for console output)
-p --physical Display physical object indexes
(default for graphical output)
Output options:
--output-format <format>
--of <format> Force the output to use the given format
-f --force Overwrite the output file if it exists
Textual output options:
--only <type> Only show objects of the given type in the textual output
-v --verbose Include additional details
-s --silent Reduce the amount of details to show
-c --cpuset Show the cpuset of each object
-C --cpuset-only Only show the cpuset of each object
--taskset Show taskset-specific cpuset strings
Object filtering options:
--ignore <type> Ignore objects of the given type
--no-caches Do not show caches
--no-useless-caches Do not show caches which do not have a hierarchical
impact
--no-icaches Do not show instruction caches
--merge Do not show levels that do not have a hierarchical
impact
--no-collapse Do not collapse identical PCI devices
--restrict <cpuset> Restrict the topology to processors listed in <cpuset>
--restrict binding Restrict the topology to the current process binding
--restrict-flags <n> Set the flags to be used during restrict
--no-io Do not show any I/O device or bridge
--no-bridges Do not any I/O bridge except hostbridges
--whole-io Show all I/O devices and bridges
Input options:
--input <XML file>
-i <XML file> Read topology from XML file <path>
--input <directory>
-i <directory> Read topology from chroot containing the /proc and /sys
of another system
--input "node:2 2"
-i "node:2 2" Simulate a fake hierarchy, here with 2 NUMA nodes of 2
processors
--input-format <format>
--if <format> Enforce input format among xml, fsroot, synthetic
--thissystem Assume that the input topology provides the topology
for the system on which we are running
--pid <pid> Detect topology as seen by process <pid>
--whole-system Do not consider administration limitations
Graphical output options:
--fontsize 10 Set size of text font
--gridsize 10 Set size of margin between elements
--horiz[=<type,...>] Horizontal graphical layout instead of nearly 4/3 ratio
--vert[=<type,...>] Vertical graphical layout instead of nearly 4/3 ratio
--rect[=<type,...>] Rectangular graphical layout with nearly 4/3 ratio
--index=[<type,...>] Display indexes for the given object types
--no-index=[<type,.>] Do not display indexes for the given object types
--attrs=[<type,...>] Display attributes for the given object types
--no-attrs=[<type,.>] Do not display attributes for the given object types
--no-legend Remove the text legend at the bottom
--append-legend <s> Append a new line of text at the bottom of the legend
Miscellaneous options:
--export-synthetic-flags <n>
Set flags during the synthetic topology export
--ps --top Display processes within the hierarchy
--version Report version and exit
简单效果为:

CPU信息查看的工具的更多相关文章
- cpu信息查看
# 总核数 = 物理CPU个数 X 每颗物理CPU的核数 # 总逻辑CPU数 = 物理CPU个数 X 每颗物理CPU的核数 X 超线程数 # 查看物理CPU个数 cat /proc/cpuinfo| ...
- linux服务器cpu信息查看详解
在linux系统中,提供了/proc目录下文件,显示系统的软硬件信息.如果想了解系统中CPU的提供商和相关配置信息,则可以查/proc/cpuinfo.但是此文件输出项较多,不易理解.例如我们想获取, ...
- linux cpu信息查看
转自:https://www.cnblogs.com/emanlee/p/3587571.html # 总核数 = 物理CPU个数 X 每颗物理CPU的核数 # 总逻辑CPU数 = 物理CPU个数 X ...
- Linux CPU信息和使用情况查看(CentOS)
一.CPU信息查看 cat /proc/cpuinfo| grep "physical id"| sort -u | wc -l #查看是物理CPU个数,-u和uniq都是去重作用 ...
- Linux系统CPU核数等信息查看
版权声明:本文为原创文章,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明. https://blog.csdn.net/fgf00/article/details/52584 ...
- Linux下查看CPU信息[/proc/cpuinfo]
最近在研究linux系统负载的时候,接触到一些关于CPU信息查看的知识,和大家分享一下.通过对/proc/cpuinfo文件中的参数的分析,也学到了不少东西. 在linux操作系统中,CPU的信息在启 ...
- linux服务器硬件信息查看
1.linux 查看服务器序列号(S/N) [root@oss20hb106 ~]# dmidecode -t 1 # dmidecode 2.11 # SMBIOS entry point at 0 ...
- ubuntu下查看cpu信息
查看CPU信息cat /proc/cpuinfo 几个cpu more /proc/cpuinfo |grep "physical id"|uniq|wc -l 每个cpu是几核( ...
- Linux 查看CPU信息、机器型号等硬件信息
测试机器的硬件信息: 查看CPU信息(型号) # cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c 8 Intel(R) Xeo ...
- Linux查看CPU信息
1. 查看物理CPU的个数 #cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc –l 2. 查看逻辑CPU的个数 #ca ...
随机推荐
- 云MSP技本功|基于OGG 实现Oracle到Kafka增量数据实时同步
简介: 在大数据时代,存在大量基于数据的业务.数据需要在不同的系统之间流动.整合.通常,核心业务系统的数据存在OLTP数据库系统中,其它业务系统需要获取OLTP系统中的数据.传统的数仓通过批量数据同步 ...
- Ribbon:Spring Cloud负载均衡与服务调用组件
Ribbon:Spring Cloud负载均衡与服务调用组件 问题总结 负载均衡? Ribbon实现服务调用? Ribbon实现负载均衡? 切换负载均衡策略? 定制负载均衡策略? 问题答案 负载均衡 ...
- CVE-2023-36025 Windows SmartScreen 安全功能绕过漏洞
CVE-2023-36025是微软于11月补丁日发布的安全更新中修复Windows SmartScreen安全功能绕过漏洞.攻击者可以通过诱导用户单击特制的URL来利用该漏洞,对目标系统进行攻击.成功 ...
- .NET Web应用配置本地IIS(实现Visual Studio离线运行与调试)
前言: 因为项目程序需要频繁的修改,然后每次修改以后都要重新编译才能查看到修改的效果.而且有时候前端也需要及时的对接我们的接口,导致每次修改一点东西都要发布一次,这样子对于开发者而言是十分的浪费时间, ...
- 打通Rasa Action Server和LLM接口的尝试方法
本文使用最简单的方法对打通 Rasa Action Server 和 LLM 接口进行了尝试,即当 Rasa 对话 intent 为 out_of_scope 时,调用 action_gpt_fa ...
- Java 将PPT转为OFD
本文以Java后端程序代码展示如何实现将PPT幻灯片转成OFD格式.下面是具体步骤. 步骤1:安装PPT库-Spire.Presentation for Java 方法一.通过Maven仓库安装.在p ...
- 神经网络基础篇:详解logistic 损失函数(Explanation of logistic regression cost function)
详解 logistic 损失函数 在本篇博客中,将给出一个简洁的证明来说明逻辑回归的损失函数为什么是这种形式. 回想一下,在逻辑回归中,需要预测的结果\(\hat{y}\),可以表示为\(\hat{y ...
- ROMA Connect: 5大联接能力+4大集成能力,推进企业数字化转型
摘要:ROMA Connect是一个全栈式的应用与数据集成平台,源自华为数字化转型集成实践,聚焦应用和数据连接,适配多种企业常见的使用场景. 本文分享自华为云社区<数据融合集成平台ROMA Co ...
- 聊聊LiteOS中生成的Bin、HEX、ELF三种文件格式
摘要:我们在使用编译器在编译工程后会要求生成可执行文件,将这些文件烧录到MCU进行运行,达到我们测试和使用程序的目的,再使用工具链进行编译的时候往往生成.bin..hex ..elf ..alf等文件 ...
- AI论文解读:基于Transformer的多目标跟踪方法TrackFormer
摘要:多目标跟踪这个具有挑战性的任务需要同时完成跟踪目标的初始化.定位并构建时空上的跟踪轨迹.本文将这个任务构建为一个帧到帧的集合预测问题,并提出了一个基于transformer的端到端的多目标跟踪方 ...