zhengweisk / aspersa

Automatically exported from code.google.com/p/aspersa
0 stars 0 forks source link

summary: add information about cpu frequency scaling #65

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Some cpu's are configured to use userpace/kernel frequency scaling. It would be 
nice if summary also displays a summary of the information available:

# Processor ##################################################
  Processors | physical = 2, cores = 8, virtual = 8, hyperthreading = no
      Speeds | 8x800.000
      Models | 8xQuad-Core AMD Opteron(tm) Processor 2374 HE

[root@mysql-P ~]# cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
userspace
userspace
userspace
userspace
userspace
userspace
userspace
userspace

[root@mysql-P ~]# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq 
800000
[root@mysql-P ~]# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq 
2200000

Original issue reported on code.google.com by gryp...@gmail.com on 2 Dec 2010 at 8:49

GoogleCodeExporter commented 9 years ago
$ for cpu in /sys/devices/system/cpu/cpu[0-9]*; do echo $cpu; cat 
$cpu/cpufreq/scaling_governor; cat $cpu/cpufreq/cpuinfo_{min,max}_freq; done | 
awk '{if( $1 ~ /devices/){n=1;d=substr($1, index($1, "/cpu/") + 5)} else {n++; 
d = d " " $1; if (n==4){print d} }}'
cpu0 ondemand 800000 1300000
cpu1 ondemand 800000 1300000

Original comment by baron.schwartz on 14 Feb 2011 at 1:44