linux 下檢視主機板 CPU 記憶體 硬碟等資訊

2021-08-20 04:33:05 字數 3260 閱讀 8792

1. 檢視主機板資訊:

dmidecode |grep -a16 "system information$"
2. 檢視cpu資訊:

cpu總核數 = 物理cpu個數 * 每顆物理cpu的核數 

總邏輯cpu數 = 物理cpu個數 * 每顆物理cpu的核數 * 超執行緒數

檢視cpu資訊(型號)

[root@esggy-clu-n003 ~]# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c

24  intel(r) xeon(r) cpu e5-2620 v2 @ 2.10ghz

# 檢視物理cpu個數

[root@esggy-clu-n003 ~]# cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l

2# 檢視每個物理cpu中core的個數(即核數)

[root@esggy-clu-n003 ~]# cat /proc/cpuinfo| grep "cpu cores"| uniq

cpu cores       : 6

# 檢視邏輯cpu的個數

[root@esggy-clu-n003 ~]# cat /proc/cpuinfo| grep "processor"| wc -l

24

3. 檢視記憶體資訊:(需要安裝rpm -qa|grep dmidecode)

檢視伺服器型號、序列號:

[root@esggy-clu-n003 ~]# dmidecode|grep "system information" -a9|egrep "manufacturer|product|serial"

manufacturer: dell inc.

product name: poweredge r720

serial number: 9nlh422

linux 檢視記憶體的插槽數,已經使用多少插槽.每條記憶體多大:

[root@esggy-clu-n003 ~]# dmidecode|grep -a5 "memory device"|grep size|grep -v range

size: 16384 mb

size: 16384 mb

size: 16384 mb

size: 16384 mb

size: no module installed

size: no module installed

size: no module installed

size: no module installed

size: no module installed

size: no module installed

size: no module installed

size: no module installed

size: 16384 mb

size: 16384 mb

size: 16384 mb

size: 16384 mb

size: no module installed

size: no module installed

size: no module installed

size: no module installed

size: no module installed

size: no module installed

size: no module installed

size: no module installed

linux 檢視記憶體的頻率:

[root@esggy-clu-n003 ~]# dmidecode|grep -a16 "memory device"|grep 'speed'

speed: 1600 mhz

speed: 1600 mhz

speed: 1600 mhz

speed: 1600 mhz

speed: unknown

speed: unknown

speed: unknown

speed: unknown

speed: unknown

speed: unknown

speed: unknown

speed: unknown

speed: 1600 mhz

speed: 1600 mhz

speed: 1600 mhz

speed: 1600 mhz

speed: unknown

speed: unknown

speed: unknown

speed: unknown

speed: unknown

speed: unknown

speed: unknown

speed: unknown

在linux檢視記憶體型號的命令:

dmidecode -t memory

檢視主機板型號:

dmidecode |grep -a16 "system information$"

記憶體槽及記憶體條:

dmidecode |grep -a16 "memory device$"

硬碟:fdisk -l

smartctl -a /dev/sda

網絡卡:mii-tool

4. 檢視硬碟資訊:

[root@esggy-clu-n003 ~]# fdisk -l | grep "disk /dev/sd"

disk /dev/sdb: 1999.8 gb, 1999844147200 bytes

disk /dev/sdc: 1999.8 gb, 1999844147200 bytes

disk /dev/sda: 1999.8 gb, 1999844147200 bytes

disk /dev/sde: 1999.8 gb, 1999844147200 bytes

disk /dev/sdf: 1999.8 gb, 1999844147200 bytes

disk /dev/sdg: 1999.8 gb, 1999844147200 bytes

disk /dev/sdd: 1999.8 gb, 1999844147200 bytes

[root@esggy-clu-n003 ~]# fdisk -l | grep 1999.8 | wc -l

7

linux下檢視CPU 記憶體 硬碟方法

一 cpu大小 cat proc cpuinfo grep model name cat proc cpuinfo grep physical id model name intel r xeon tm cpu 2.80ghz model name intel r xeon tm cpu 2.80g...

Linux下檢視CPU 記憶體 硬碟等資訊

二 記憶體大小 root r4 cat proc meminfo grep memtotal memtotal 32941268 kb 32g記憶體 三 硬碟大小 root r4 fdisk l grep disk disk dev sda 1887.4 gb,1887436800000 bytes...

Linux下檢視CPU,記憶體等引數配置

admin 伺服器相關 uname a linux euis1 2.6.9 55.elsmp 1 smp fri apr 20 17 03 35 edt 2007 i686 i686 i386 gnu linux 檢視當前作業系統核心資訊 cat etc issue grep linux red h...