Linux環境下檢視伺服器硬體資訊

2021-08-27 23:04:01 字數 3233 閱讀 6949

檢視cpu型號

cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c 

16  intel(r) xeon(r) cpu           x5560  @ 2.80ghz

檢視物理cpu個數

cat /proc/cpuinfo | grep physical | uniq -c

1 physical id     : 1

1 physical id     : 0

檢視cpu執行模式:32位或者64位,如果是32位的話並不代表不能執行在64位下

getconf long_bit 

64檢視是否cpu支援64位系統,如果值大於0,則支援64位運算,lm指long mode

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

檢視記憶體資訊

cat /proc/meminfo

memtotal:     74175052 kb

memfree:       4242856 kb

buffers:        675664 kb

cached:       65423884 kb

swapcached:         16 kb

active:       46231212 kb

inactive:     20719936 kb

hightotal:           0 kb

highfree:            0 kb

lowtotal:     74175052 kb

lowfree:       4242856 kb

swaptotal:    75778596 kb

swapfree:     75778384 kb

dirty:              60 kb

writeback:           0 kb

anonpages:      851416 kb

slab:          1495940 kb

pagetables:    1372180 kb

nfs_unstable:        0 kb

bounce:              0 kb

commitlimit:  112866120 kb

committed_as: 21125340 kb

vmalloctotal: 34359738367 kb

vmallocused:    299916 kb

vmallocchunk: 34359438111 kb

hugepages_total:     0

hugepages_free:      0

hugepages_rsvd:      0

hugepagesize:     2048 kb

檢視當前系統核心資訊

uname -a

linux hostname 2.6.18-164.el5 #1 smp tue aug 18 15:51:48 edt 2009 x86_64 x86_64 x86_64 gnu/linux

檢視當前作業系統核心資訊

cat /etc/issue | grep linux 

red hat enterprise linux server release 5.4 (tikanga)

檢視伺服器型號

dmidecode | grep "product name"  

product name: poweredge r710

product name: 0vwn1r

檢視網絡卡資訊

dmesg | grep -i eth 

broadcom netxtreme ii gigabit ethernet driver bnx2 v1.9.3 (march 17, 2009)

eth0: broadcom netxtreme ii bcm5709 1000base-t (c0) pci express found at mem d6000000, irq 106, node addr a4badb28c33d

eth1: broadcom netxtreme ii bcm5709 1000base-t (c0) pci express found at mem d8000000, irq 114, node addr a4badb28c33f

eth2: broadcom netxtreme ii bcm5709 1000base-t (c0) pci express found at mem da000000, irq 122, node addr a4badb28c341

eth3: broadcom netxtreme ii bcm5709 1000base-t (c0) pci express found at mem dc000000, irq 130, node addr a4badb28c343

cnic: added cnic device: eth0

cnic: added cnic device: eth1

cnic: added cnic device: eth2

cnic: added cnic device: eth3

bnx2: eth0: using msix

addrconf(netdev_up): eth0: link is not ready

bnx2i: iscsi not supported, dev=eth0

bnx2i: iscsi not supported, dev=eth0

bnx2: eth0 nic copper link is up, 1000 mbps full duplex

addrconf(netdev_change): eth0: link becomes ready

eth0: no ipv6 routers present

process `sysctl' is using deprecated sysctl (syscall) net.ipv6.neigh.eth0.base_reachable_time; usenet.ipv6.neigh.eth0.base_reachable_time_ms instead.

Linux下檢視伺服器各硬體資訊

記憶體 free m cat proc meminfo dmidecode t memory cpu lscpu cat proc cpuinfo dmidecode t processor dmidecode grep cpu 獲取cpu資訊 硬碟 df lhp lsblk fdisk l dme...

Linux 檢視伺服器硬體配置

檢視cpu配置 cat proc cpuinfo grep name cut f2 d uniq c檢視記憶體配置 檢視硬碟大小 fdisk l grep disk lspci v s 00 02.0 輸入顯示卡序號,獲得某塊顯示卡的詳細資訊 cat sys block 磁碟名字 queue rot...

linux 檢視所在伺服器硬體情況

檢視計算機硬體資訊 proc下主要檔案介紹 對於 proc 中檔案可使用檔案檢視命令瀏覽其內容,檔案中包含系統特定資訊 cpuinfo 主機cpu資訊 dma 主機dma通道資訊 filesystems 檔案系統資訊 interrupts 主機中斷資訊 ioprots 主機i o埠號資訊 memin...