查看cpu个数,核心数,型号,频率
实际cpu个数: cat /proc/cpuinfo | grep ‘physical id’ | uniq -c
4 physical id : 0 4 physical id : 1 4 physical id : 0 4 physical id : 1
实际cpu核心数及型号频率
[root@puppet124 ~]# cat /proc/cpuinfo | grep name | cut -d: -f2 | uniq -c 16 Intel(R) Xeon(R) CPU L5520 @ 2.27GHz
查看内存条数及大小
dmidecode | grep -P -A 5 “Memory Device” | grep Size | grep -v Range | grep -v No
查看物理网卡及MAC地址
ifconfig -a | grep HWaddr | awk ‘{print $5}’
查看网卡支持的速度及当前工作的状态
# ethtool eth0
脚本:
cpu and Mem:
cpu物理个数
physical cpu count: `cat /proc/cpuinfo | grep 'physical id' | uniq -c | wc -l`
cpu核心个数型号频率
processor core count: `cat /proc/cpuinfo | grep name | cut -d: -f2 | uniq -c | awk '{print $1}'`
processor model: `cat /proc/cpuinfo | grep name | cut -d':' -f 2 | uniq`
memory sock count:`dmidecode | grep -P -A 5 "Memory Device" | grep Size | grep -v Range`
total memory:`dmidecode | grep -P -A 5 "Memory Device" | grep "Range Size"`
查看序列号:
dmidecode -s system-serial-number
Leave a Reply