1

How to detect the frequency when running a program on android? I want detect the CPU usage using the top -m command, but since android kernel by default does frequency scaling, I am afraid the result from "top -m " command is not correct. So I want to disable the frequency scaling for android. Any solution to this problem?

Welcome any comments!

behe
  • 199
  • 3
  • 16
  • 1
    To have frequency on Android, just read these special files in /sys directory: #cat "/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq" #cat "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq" #cat "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq" You will have current, min and max Frequency allowed. – behe May 11 '12 at 10:03
  • This is a useful solution for me. Hope it can help someone who encounters similar problem. – behe May 11 '12 at 10:04
  • The solution is from http://stackoverflow.com/questions/3021054/how-to-read-cpu-frequency-on-android-device – behe May 11 '12 at 10:04

0 Answers0