随笔 - 173,  文章 - 0,  评论 - 0,  阅读 - 10万

CPU:

详细:cat /proc/cpuinfo
型号:grep "model name" /proc/cpuinfo |awk -F ':' '{print $NF}'
数量:lscpu |grep "CPU socket" |awk '{print $NF}' 或 lscpu |grep "Socket" |awk '{print $NF}'
每个CPU的核数:lscpu |grep "Core(s) per socket" |awk '{print $NF}'

 

内存:

卡槽数量:sudo dmidecode -t memory |grep "Number Of Devices" |awk '{print $NF}'或sudo dmidecode -t memory |grep "Associated Memory Slots" |awk '{print $NF}'
内存数量:sudo dmidecode -t memory |grep -A16 "Memory Device$" |grep 'Size:.*MB' |wc -l
内存型号:
内存支持类型:sudo dmidecode -t memory |grep -A16 "Memory Device$" |grep "Type:"
每个内存频率:sudo dmidecode -t memory |grep -A16 "Memory Device$" |grep "Speed:"
每个内存大小:sudo dmidecode -t memory |grep -A16 "Memory Device$" |grep "Size:"

 

硬盘:

硬盘数量、大小:sudo fdisk -l |grep "Disk /dev/sd"
硬盘型号:sudo hdparm -i /dev/sda |grep "Model"

 

查看cpu运行模式

# getconf LONG_BIT

32

(说明当前CPU运行在32bit模式下, 但不代表CPU不支持64bit)

 

查看cpu是否支持64bit

# cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l

2

(结果大于0, 说明支持64bit计算. lm指long mode, 支持lm则是64bit)

 

查看cpu信息概要

#lscpu

 

关于top命令补充

在命令界面输入:top后

按 1 后,cpu详细运行情况会出现

posted on   黑熊一只  阅读(6601)  评论(0编辑  收藏  举报
编辑推荐:
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示