当前位置:首页> 正文

linux查看cpu型号命令的方法(linux如何查看cpu命令)

linux查看cpu型号命令的方法(linux如何查看cpu命令)

  CPU总核数=物理CPU个数 * 每颗物理CPU的核数

  总逻辑CPU数=物理CPU个数 * 每颗物理CPU的核数 * 超线程数

  查看CPU信息

  ls

  dmidecode -t processor

  查看CPU型号

  cat /proc/cpuinfo | grep “model name” | uniq

  查看物理CPU个数

  cat /proc/cpuinfo| grep “physical id”| sort| uniq| wc -l

  查看物理CPU超线程

  cat /proc/cpuinfo| grep “physical id” | uniq

  注意:出现相同ID值表示具有超级线程,相同2个表示每个物理CPU具有2个超线程数;

  cat /proc/cpuinfo| grep “siblings”| uniq / CPU核数 #值大于1表示具有超线程,

  查看物理CPU核数

  cat /proc/cpuinfo| grep “cpu cores”| uniq

  查看CPU逻辑总核数

  cat /proc/cpuinfo| grep “processor”| wc -l

  查看CPU温度

  cat /sys/class/thermal/thermal_zone0/temp

  echo $[$(cat /sys/class/thermal/thermal_zone0/temp)/1000]°

  查看CPU频率

  cat /proc/cpuinfo | grep “cpu MHz” | uniq

  查看CPU是否超频

  cat /proc/cpuinfo | grep -e “cpu cores” -e “siblings” | sort | uniq

  实时查看

  watch -n 0.1 echo CPU: $[$(cat /sys/class/thermal/thermal_zone0/temp)/1000]°

  或者

  yum install -y lm_sensors

  sensors

  查看内存使用情况

  free -m

  cat /proc/meminfo

  查看主板内存槽信息

  dmidecode |grep -A16 “Memory Device$”

  dmidecode -t memory

  查看主板支持最大内存数和插槽数

  dmidecode -t 16

  或者

  dmidecode |grep ‘Maximum Capacity’

  dmidecode |grep ‘Number Of Devices’

  查看内存条速率

  dmidecode |grep -A16 ‘Memory Device’|grep ‘Speed’

  查看内存厂商

  dmidecode -t memory | grep Manufacturer

  注意:可以判断插了几根内粗;

  查看内存条类型

  dmidecode -t memory | grep “Type: D”

  查看内存条大小

  dmidecode -t memory | grep Size

  查看BIOS信息

  dmidecode -t bios

  查看插槽信息

  dmidecode -t slot

  查看接口连接信息

  dmidecode -t connector

  查看主板信息

  dmidecode |grep -A16 “System Information$”

  查看主板型号

  dmidecode | grep -A 5 ‘Base Board Information’ |grep ‘Product Name’

  查看主板序列号

  dmidecode | grep -i “serial number”

  查看磁盘个数及分区情况

  lsblk

  df -Th

  查看磁盘信息

  fdisk -l | grep “Disk /dev/sd”

  统计相同容量磁盘数量

  fdisk -l | grep 4000.8 | wc -l

  查看逻辑分区(dm-x)

  lvdisplay|awk ‘/LV Name/{n=$3} /Block device/{d=$3; sub(“.*:”,”dm-“,d); print d,n;}’

  查看网络型号

  lspci | grep Ethernet

  查看详细信息

  lspci -s 06:00.0 -vv

  查看网卡接口信息

  ethtool enp4s0

  查看是否连接网线

  ethtool enp6s0 |grep “Link detected”

  查看网卡MAC

  cat /sys/class/net/enp6s0

  cat /sys/class/net/enp7s0

  安装lspci:yum -y install pciutils

  安装lshw:yum -y iinstall lshw-gui

  查看显卡信息

  lspci -vnn | grep VGA -A 18

  lspci -v -s 01:00.0

  lshw -C display

  查看显卡运行情况

  nvidia-smi

  watch -n 2 nvidia-smi

  查看显卡驱动

  lshw -c video | grep configuration

  查看驱动详细信息

  modinfo nvidia

展开全文阅读

相关内容