收集服务器配置资源信息
?
?
?
收集服務(wù)端和數(shù)據(jù)庫層操作系統(tǒng)的配置;方便后期按系統(tǒng)比例配置進(jìn)行估算
1.cpu資源收集1)查看cpu型號(hào) cat /etc/issue cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c2)物理cpu個(gè)數(shù) grep "physical id" /proc/cpuinfo | sort |uniq | wc -l cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l3)查看cpu的core即核數(shù) grep "cpu cores" /proc/cpuinfo | uniq | awk -F ‘:’ "{print $2}" cat /proc/cpuinfo| grep "cpu cores"| uniq4)邏輯cpu cat /proc/cpuinfo| grep "processor"| wc -l邏輯cpu=物理CPU個(gè)數(shù)×每顆核數(shù),如果不相等的話,則表示服務(wù)器的CPU支持超線程技術(shù); 此時(shí)邏輯cpu=物理CPU個(gè)數(shù)×每顆核數(shù)x2\5)是否開啟intel的超線程技術(shù)(HT) cat /proc/cpuinfo |grep "sibling"|uniq cat /proc/cpuinfo | grep "cpu cores"|uniq 如果有兩個(gè)邏輯CPU具有相同的"core id",那么超線程是打開的。可以根據(jù)以下原則,來判斷是否支持HT技術(shù)。 如果"siblings"和"cpu cores"一致,則說明不支持超線程,或者超線程未打開。 如果"siblings"是"cpu cores"的兩倍,則說明支持超線程,并且超線程已打開。邏輯CPU數(shù)量=物理cpu數(shù)量 x cpu cores x 2(如果支持并開啟ht)2.內(nèi)存 free -g3.網(wǎng)絡(luò) /sbin/ethtool # lspci -vvv | grep Ethernet# ethtool eth1 4.磁盤 df -h
[root@weblogic ~]# ethtool eth1
Settings for eth1:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 1000Mb/s? //千兆網(wǎng)
Duplex: Full? //表示了當(dāng)前網(wǎng)絡(luò)支持全雙工
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
MDI-X: Unknown
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes? //顯示當(dāng)前網(wǎng)卡和網(wǎng)絡(luò)的物理連接正常
轉(zhuǎn)載于:https://www.cnblogs.com/Alexr/p/9360726.html
與50位技術(shù)專家面對(duì)面20年技術(shù)見證,附贈(zèng)技術(shù)全景圖總結(jié)
以上是生活随笔為你收集整理的收集服务器配置资源信息的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【深度学习框架】
- 下一篇: Javascript中 toFixed