==作者:cybsky==
CPU
x# 总核数 = 物理CPU个数 X 每颗物理CPU的核数 # 总逻辑CPU数 = 物理CPU个数 X 每颗物理CPU的核数 X 超线程数# 查看物理CPU个数cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l# 查看每个物理CPU中core的个数(即核数)cat /proc/cpuinfo| grep "cpu cores"| uniq# 查看逻辑CPU的个数cat /proc/cpuinfo| grep "processor"| wc -l# 查看CPU信息(型号)cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -cMEM
xxxxxxxxxx# 每个内存插槽上的详细信息dmidecode | grep -A16 "Memory Device$"# 总内存free -hDISK
xxxxxxxxxxlsblkfdisk -l# io信息iostat -x 10Network
xxxxxxxxxxifconfig# 网关netstat -rnip route show# 路由route -n# DNSdig |grep SERVERMegaCli
安装
x
# raid信息依赖MegaCli去查看# 下载MegaCli包https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/8-07-10_MegaCLI_Linux.zip# 解压后传到服务器上rpm -ivh MegaCli-8.07.10-1.noarch.rpm# 默认安装到opt下,做个软链ln -s /opt/MegaRAID/MegaCli/MegaCli64 /usr/bin/MegaCli64 -v使用
x
# 查raid卡信息MegaCli64 -AdpAllInfo -aALL# 查看raid信息及raid组成磁盘信息MegaCli64 -LdPdInfo -aALLAdapter #0Number of Virtual Disks: 2Virtual Drive: 0 (Target Id: 0)Name :system# Primary为raid等级RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0Size : 837.258 GBSector Size : 512Is VD emulated : NoMirror Data : 837.258 GBState : OptimalStrip Size : 256 KB# 该raid组磁盘数Number Of Drives : 2Span Depth : 1Default Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBUCurrent Cache Policy: WriteThrough, ReadAhead, Direct, No Write Cache if Bad BBUDefault Access Policy: Read/WriteCurrent Access Policy: Read/WriteDisk Cache Policy : Disk's DefaultEncryption Type : NonePI type: No PIIs VD Cached: NoNumber of Spans: 1Span: 0 - Number of PDs: 2PD: 0 InformationEnclosure Device ID: 252# 盘位Slot Number: 0Drive's position: DiskGroup: 0, Span: 0, Arm: 0Enclosure position: N/ADevice Id: 11WWN: 5000C50099965DBCSequence Number: 2Media Error Count: 0Other Error Count: 0Predictive Failure Count: 0Last Predictive Failure Event Seq Number: 0PD Type: SASRaw Size: 838.362 GB [0x68cb9e30 Sectors]Non Coerced Size: 837.862 GB [0x68bb9e30 Sectors]Coerced Size: 837.258 GB [0x68a84800 Sectors]Sector Size: 512Logical Sector Size: 512Physical Sector Size: 512Firmware state: Online, Spun UpCommissioned Spare : NoEmergency Spare : NoDevice Firmware Level: N003Shield Counter: 0Successful diagnostics completion on : N/ASAS Address(0): 0x5000c50099965dbdSAS Address(1): 0x0Connected Port Number: 0(path0) Inquiry Data: SEAGATE ST900MM0168 N003S403CAWV FDE Capable: Not CapableFDE Enable: DisableSecured: UnsecuredLocked: UnlockedNeeds EKM Attention: NoForeign State: None Device Speed: 12.0Gb/s Link Speed: 12.0Gb/s Media Type: Hard Disk DeviceDrive: Not CertifiedDrive Temperature :32C (89.60 F)PI Eligibility: No Drive is formatted for PI information: NoPI: No PIPort-0 :Port status: ActivePort's Linkspeed: 12.0Gb/s Port-1 :Port status: ActivePort's Linkspeed: 12.0Gb/s Drive has flagged a S.M.A.R.T alert : NoPD: 1 InformationEnclosure Device ID: 252Slot Number: 1Drive's position: DiskGroup: 0, Span: 0, Arm: 1Enclosure position: N/ADevice Id: 9WWN: 5000C50099978624Sequence Number: 2Media Error Count: 0Other Error Count: 0Predictive Failure Count: 0Last Predictive Failure Event Seq Number: 0PD Type: SASRaw Size: 838.362 GB [0x68cb9e30 Sectors]Non Coerced Size: 837.862 GB [0x68bb9e30 Sectors]Coerced Size: 837.258 GB [0x68a84800 Sectors]Sector Size: 512Logical Sector Size: 512Physical Sector Size: 512Firmware state: Online, Spun UpCommissioned Spare : NoEmergency Spare : NoDevice Firmware Level: N003Shield Counter: 0Successful diagnostics completion on : N/ASAS Address(0): 0x5000c50099978625SAS Address(1): 0x0Connected Port Number: 1(path0) Inquiry Data: SEAGATE ST900MM0168 N003S403C74P FDE Capable: Not CapableFDE Enable: DisableSecured: UnsecuredLocked: UnlockedNeeds EKM Attention: NoForeign State: None Device Speed: 12.0Gb/s Link Speed: 12.0Gb/s Media Type: Hard Disk DeviceDrive: Not CertifiedDrive Temperature :35C (95.00 F)PI Eligibility: No Drive is formatted for PI information: NoPI: No PIPort-0 :Port status: ActivePort's Linkspeed: 12.0Gb/s Port-1 :Port status: ActivePort's Linkspeed: 12.0Gb/s Drive has flagged a S.M.A.R.T alert : NoVirtual Drive: 1 (Target Id: 1)Name :dataRAID Level : Primary-0, Secondary-0, RAID Level Qualifier-0Size : 837.258 GBSector Size : 512Is VD emulated : NoParity Size : 0State : OptimalStrip Size : 256 KBNumber Of Drives : 1Span Depth : 1Default Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBUCurrent Cache Policy: WriteThrough, ReadAhead, Direct, No Write Cache if Bad BBUDefault Access Policy: Read/WriteCurrent Access Policy: Read/WriteDisk Cache Policy : Disk's DefaultEncryption Type : NonePI type: No PIIs VD Cached: NoNumber of Spans: 1Span: 0 - Number of PDs: 1PD: 0 InformationEnclosure Device ID: 252Slot Number: 2Drive's position: DiskGroup: 1, Span: 0, Arm: 0Enclosure position: N/ADevice Id: 10WWN: 5000C50099972CC0Sequence Number: 2Media Error Count: 0Other Error Count: 0Predictive Failure Count: 0Last Predictive Failure Event Seq Number: 0PD Type: SASRaw Size: 838.362 GB [0x68cb9e30 Sectors]Non Coerced Size: 837.862 GB [0x68bb9e30 Sectors]Coerced Size: 837.258 GB [0x68a84800 Sectors]Sector Size: 512Logical Sector Size: 512Physical Sector Size: 512Firmware state: Online, Spun UpCommissioned Spare : NoEmergency Spare : NoDevice Firmware Level: N003Shield Counter: 0Successful diagnostics completion on : N/ASAS Address(0): 0x5000c50099972cc1SAS Address(1): 0x0Connected Port Number: 2(path0) Inquiry Data: SEAGATE ST900MM0168 N003S403CX3Q FDE Capable: Not CapableFDE Enable: DisableSecured: UnsecuredLocked: UnlockedNeeds EKM Attention: NoForeign State: None Device Speed: 12.0Gb/s Link Speed: 12.0Gb/s Media Type: Hard Disk DeviceDrive: Not CertifiedDrive Temperature :30C (86.00 F)PI Eligibility: No Drive is formatted for PI information: NoPI: No PIPort-0 :Port status: ActivePort's Linkspeed: 12.0Gb/s Port-1 :Port status: ActivePort's Linkspeed: 12.0Gb/s Drive has flagged a S.M.A.R.T alert : NoExit Code: 0x00