[APP] CPUStats - simple cpu statistics (updated 06.03.2011)
This is simple app that I created to show some info about CPU frequencies and governor.
It's still in development state, but it has what I need to show how CPU governor is doing it's work! It refreshes every 2 seconds.
I tested it on CM 6.1, but it should work on others.
You need to have cpufreq_stats module loaded to get some statistics
, and it needs root permission.
Also please note, that cpufreq_stats should be loaded after defining frequencies and setting active governor, otherwise it may collect not so correct data!!
In 0.1 version I added cpufreq_stats.ko binary, so if your ROM doesn't have it, you can TRY to install it. But before you try it, NANDROID YOUR SYSTEM! This modifies 10overclock file, and if something goes wrong, you may end up in boot loop!!!!
If something is missing, or FC, please post output of this commands:
and what ROM/device are you using.
# find /sys/devices/system/cpu/
Any comments and suggestions are welcome!!
I hope you'll find it usefull!
- CyanogenMod 6.1
- MIUI 12-17
- Cronos 1.7
- TheFroyoMOD 2.1.2
Module tested on:
- CyanogenMOD 7 RC0
- The FroyoMOD 2.5
- Leaked APAC rom
This should work on any rooted rom and any device; please report back your findings, with exact version or rom and device. If you have any other device with rooted ROM, try it if you like it and report back your findings...
06.03.2011, 13:25, v0.1
- Changed startup screen, and now you can even disable it!!
- Changed logic that interacts with system, so it should have faster startup and less CPU usage. Because of this, it will ask root permission again!
- Included cpufreq_stats.ko module, for witch I hope is generic, and it should work on any 2.2 and newer rom. I didn't tested it on 2.1!!!!!
02.01.2011, 09:13, v0.05
- changed reading logic, too small change for new version. If previous 0.05 is working for you, you don't need to redownload!
01.01.2011, 17:15, v0.05
- Additional error checking, hopefully all FC's are prevented
- If module cpufreq_stats is not loaded, it will display warning but it will continue to work. So if you have custom build kernel with compiled in cpufreq_stats, it should work!
- Added welcome dialog
- Added system report generator. This will collect data about your phone that I think is needed to detect where the problem is, or to support new devices. This file will be saved to "/sdcard/CPUStats_sysprofile.txt". Please check file content and if you don't like some data inside remove it, and please report what have you removed. And if you agree, send me that file in PM or attach to this thread (I would prefer PM!).
- If some data cannot be read, it will display values -1 or 0. Usually that means that you don't have cpufreq_stats module, or you are running other device than Motorola Milestone!.
- Happy New year!!!!
22.12.2010, 19:40, v0.04
- OK, thanks to great hint from coolbho3000, finally current frequency works as it should!!! and app starts much faster!
- Refresh time reduced to 1 sec!
- On startup, app will change permission of files that needs to be read to "read to all" (a+r). I don't see that as security issue (in fact only one file doesn't have right permissions, but i decided to check all files), but if you do this that this is security issue, then DON'T INSTALL OR RUN 0.04 version!!!!!
- These files are checked and their permissions are modified as needed:
19.12.2010, 15:00, v0.03
- All frequencies are listed, no matter did they been used or not.
- Checks is cpufreq_stats module is loaded, and exists app if not
- removed few loops from code, only one left, lower CPU usage
, and possibly prevented some of FC if files are missing...
18.12.2010, 17:30, v0.02
- Added percentages to display
- Calculating deepsleep time
- NEEDS ROOT
, because only root can get current cpu frequency, it will ask you 2 or 3 times, and you will probably want to check remember because of loop...
(although it doesn't work too effectively, so you will probably get max speed)
17.12.2010, 20:35, ver 0.01
- Added vsel values to display
- Small adjustments to UI
- Added version
- Not working: current cpu freq!? (if someone is willing to help PM me)
- Changed refresh rate to 2 sec
check are required modules loaded
- ability to change refresh rate (not needed??)
better use of superuser (anyone willing to help??!) (maybe done...)
v0.03 & v0.04
P.S.: file without version name is old one, 0.01!!