==作者:YB-Chi==
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 -c
MEM
xxxxxxxxxx
# 每个内存插槽上的详细信息
dmidecode | grep -A16 "Memory Device$"
# 总内存
free -h
DISK
xxxxxxxxxx
lsblk
fdisk -l
# io信息
iostat -x 10
Network
xxxxxxxxxx
ifconfig
# 网关
netstat -rn
ip route show
# 路由
route -n
# DNS
dig |grep SERVER
MegaCli
安装
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 -aALL
Adapter #0
Number of Virtual Disks: 2
Virtual Drive: 0 (Target Id: 0)
Name :system
# Primary为raid等级
RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0
Size : 837.258 GB
Sector Size : 512
Is VD emulated : No
Mirror Data : 837.258 GB
State : Optimal
Strip Size : 256 KB
# 该raid组磁盘数
Number Of Drives : 2
Span Depth : 1
Default Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteThrough, ReadAhead, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy : Disk's Default
Encryption Type : None
PI type: No PI
Is VD Cached: No
Number of Spans: 1
Span: 0 - Number of PDs: 2
PD: 0 Information
Enclosure Device ID: 252
# 盘位
Slot Number: 0
Drive's position: DiskGroup: 0, Span: 0, Arm: 0
Enclosure position: N/A
Device Id: 11
WWN: 5000C50099965DBC
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
Raw Size: 838.362 GB [0x68cb9e30 Sectors]
Non Coerced Size: 837.862 GB [0x68bb9e30 Sectors]
Coerced Size: 837.258 GB [0x68a84800 Sectors]
Sector Size: 512
Logical Sector Size: 512
Physical Sector Size: 512
Firmware state: Online, Spun Up
Commissioned Spare : No
Emergency Spare : No
Device Firmware Level: N003
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x5000c50099965dbd
SAS Address(1): 0x0
Connected Port Number: 0(path0)
Inquiry Data: SEAGATE ST900MM0168 N003S403CAWV
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 12.0Gb/s
Link Speed: 12.0Gb/s
Media Type: Hard Disk Device
Drive: Not Certified
Drive Temperature :32C (89.60 F)
PI Eligibility: No
Drive is formatted for PI information: No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: 12.0Gb/s
Port-1 :
Port status: Active
Port's Linkspeed: 12.0Gb/s
Drive has flagged a S.M.A.R.T alert : No
PD: 1 Information
Enclosure Device ID: 252
Slot Number: 1
Drive's position: DiskGroup: 0, Span: 0, Arm: 1
Enclosure position: N/A
Device Id: 9
WWN: 5000C50099978624
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
Raw Size: 838.362 GB [0x68cb9e30 Sectors]
Non Coerced Size: 837.862 GB [0x68bb9e30 Sectors]
Coerced Size: 837.258 GB [0x68a84800 Sectors]
Sector Size: 512
Logical Sector Size: 512
Physical Sector Size: 512
Firmware state: Online, Spun Up
Commissioned Spare : No
Emergency Spare : No
Device Firmware Level: N003
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x5000c50099978625
SAS Address(1): 0x0
Connected Port Number: 1(path0)
Inquiry Data: SEAGATE ST900MM0168 N003S403C74P
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 12.0Gb/s
Link Speed: 12.0Gb/s
Media Type: Hard Disk Device
Drive: Not Certified
Drive Temperature :35C (95.00 F)
PI Eligibility: No
Drive is formatted for PI information: No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: 12.0Gb/s
Port-1 :
Port status: Active
Port's Linkspeed: 12.0Gb/s
Drive has flagged a S.M.A.R.T alert : No
Virtual Drive: 1 (Target Id: 1)
Name :data
RAID Level : Primary-0, Secondary-0, RAID Level Qualifier-0
Size : 837.258 GB
Sector Size : 512
Is VD emulated : No
Parity Size : 0
State : Optimal
Strip Size : 256 KB
Number Of Drives : 1
Span Depth : 1
Default Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteThrough, ReadAhead, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy : Disk's Default
Encryption Type : None
PI type: No PI
Is VD Cached: No
Number of Spans: 1
Span: 0 - Number of PDs: 1
PD: 0 Information
Enclosure Device ID: 252
Slot Number: 2
Drive's position: DiskGroup: 1, Span: 0, Arm: 0
Enclosure position: N/A
Device Id: 10
WWN: 5000C50099972CC0
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
Raw Size: 838.362 GB [0x68cb9e30 Sectors]
Non Coerced Size: 837.862 GB [0x68bb9e30 Sectors]
Coerced Size: 837.258 GB [0x68a84800 Sectors]
Sector Size: 512
Logical Sector Size: 512
Physical Sector Size: 512
Firmware state: Online, Spun Up
Commissioned Spare : No
Emergency Spare : No
Device Firmware Level: N003
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x5000c50099972cc1
SAS Address(1): 0x0
Connected Port Number: 2(path0)
Inquiry Data: SEAGATE ST900MM0168 N003S403CX3Q
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 12.0Gb/s
Link Speed: 12.0Gb/s
Media Type: Hard Disk Device
Drive: Not Certified
Drive Temperature :30C (86.00 F)
PI Eligibility: No
Drive is formatted for PI information: No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: 12.0Gb/s
Port-1 :
Port status: Active
Port's Linkspeed: 12.0Gb/s
Drive has flagged a S.M.A.R.T alert : No
Exit Code: 0x00