Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1596959
  • 博文数量: 101
  • 博客积分: 2465
  • 博客等级: 中尉
  • 技术积分: 2126
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-09 15:39
个人简介

https://minminmsn.com/

文章分类

全部博文(101)

文章存档

2018年(2)

2017年(2)

2016年(11)

2015年(14)

2014年(9)

2013年(16)

2012年(47)

分类: LINUX

2012-12-14 18:01:40

# 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
阅读(2380) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~