说明:
因为种种原来,我们可能需要查看linux服务器主板型号,cpu型号,内存大小,内存条数量等。因为服务器使用raid卡,平常查看硬盘信息的命令还不能用,待后面补充!
实现:
查看主板型号
# dmidecode |grep -A 8 "System Information" System Information Manufacturer: Dell Product Name: CS24-TY Version: A00 Serial Number: 24Z1NL1 UUID: 2656CFCF-887A-0010-BBD8-00269E9C46DC Wake-up Type: Power Switch SKU Number: To Be Filled By O.E.M. Family: Server
上网查DELL CS24-TY,找到说主板型号是DELL PowerEdge C1100
查看cpu型号,主频
# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c 8 Intel(R) Xeon(R) CPU L5520 @ 2.27GHz
查看内存
# free -m total used free shared buffers cached Mem: 32103 31803 300 0 217 953 -/+ buffers/cache: 30632 1471 Swap: 16383 476 15907
查看内存条数
[root@localhost ~]# dmidecode -t memory|grep Size Size: 8192 MB Type: Other Speed: 1333 MHz Size: No Module Installed Size: No Module Installed Size: 8192 MB Size: No Module Installed Size: No Module Installed Size: No Module Installed Size: No Module Installed Size: No Module Installed Size: 8192 MB Size: No Module Installed Size: No Module Installed Size: 8192 MB Size: No Module Installed Size: No Module Installed Size: No Module Installed Size: No Module Installed Size: No Module Installed
查看硬盘大小,分区
[root@localhost ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda3 119G 17G 96G 15% / tmpfs 16G 0 16G 0% /dev/shm /dev/sda1 97M 32M 61M 35% /boot
查看raid卡,raid卡为DELL PERC 6/i
[root@localhost ~]# dmesg |grep -i raid dracut: rd_NO_DM: removing DM RAID activation dracut: rd_NO_MD: removing MD RAID activation ahci 0000:00:1f.2: AHCI 0001.0200 32 slots 6 ports 3 Gbps 0x3f impl RAID mode megaraid_sas 0000:04:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16 megaraid_sas 0000:04:00.0: setting latency timer to 64 megaraid_sas: fw state:c0000000 scsi6 : LSI SAS based MegaRAID driver [root@localhost ~]# cat /proc/scsi/scsi Attached devices: Host: scsi6 Channel: 02 Id: 00 Lun: 00 Vendor: DELL Model: PERC 6/i Rev: 1.11 Type: Direct-Access ANSI SCSI revision: 05
查看网卡
[root@localhost ~]# lspci | grep -i 'eth' 05:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01) 05:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
查看21号网络流量
# sar -n DEV -f /var/log/sa/sa21 |grep eth|less
查看板载显示信息
[root@localhost ~]# dmidecode |grep -A 5 "On Board Device Information" On Board Device Information Type: Video Status: Enabled Description: AST2050 VGA