# cat cpuinfo.sh
#!/bin/bash
echo " the `hostname` cpuinfo "
echo "the cpu stype:"
echo "`dmidecode -s processor-version | head -n 1`"
echo "the physical cpu is:"
cat /proc/cpuinfo | grep "physical id"| sort |uniq |wc -l
echo "the cores is:"
cat /proc/cpuinfo | grep "cpu core" |awk '{print $4}'|head -n 1
echo "the siblings is:"
cat /proc/cpuinfo | grep siblings |awk '{print $3}'|head -n 1
echo "the logic cpu is:"
cat /proc/cpuinfo | grep processor|wc -l
echo "if the logic is not physical x cores, the cpu is super-threading."
echo "the cpu support:"
cat /proc/cpuinfo | grep flags | awk -F: '{print $2}'|sort|uniq
[root@bjicqh910 ~]# ./cpuinfo.sh
the server cpuinfo
the cpu stype:
Intel(R) Xeon(R) CPU X5690 @ 3.47GHz
the physical cpu is:
2
the cores is:
6
the siblings is:
12
the logic cpu is:
24
if the logic is not physical x cores, the cpu is super-threading.
the cpu support:
fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx pdpe1gb rdtscp lm constant_tsc ida nonstop_tsc arat pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
阅读(2430) | 评论(0) | 转发(0) |