FORUMS
Remove All Ads from XDA

[HOWTO] install compcache configuration/status tool: rzscontrol

235 posts
Thanks Meter: 409
 
Post Reply Email Thread
Hi!

For those of you who have compcache on their ROMs enabled: Maybe you noticed that in previous versions of compcache there used to be a special file in /proc from which you could read stats about compcache and its usage (by simply doing "cat /proc/ramzswap").

In newer version this has been removed in favour to a userspace tool for the commandline named "rzscontrol". Some ROMs may have already included it. I missed it on my ROM so I grabbed the current sources from http://code.google.com/p/compcache/ and compiled it against Android 2.1 tree.

If you want to install it:
Attached you find 2 zip-files for 2 alternate ways of installing it:


METHOD 1: Install manually with ADB:

The file "compcache-rzscontrol_just-binary.zip" just contains the compiled binary. Unzip the file and perform the followinf steps to install it manually:
Code:
adb remount
adb push rzscontrol /system/xbin/
adb shell chmod 0755 /system/xbin/rzscontrol
That's all.


METHOD 2: Install as update.zip via recovery:

Download the other zip-file "update-install-compcache-rzscontrol-signed.zip". Place it in root of your sd-card, reboot into recovery and apply it as update.zip.

The result is the same for both ways.


TEST IT:
After you installed it, you can test it (of course you need to have compcache enabled):

Code:
adb shell rzscontrol /dev/block/ramzswap0 --stats
This should produce output similiar to this:
Code:
DiskSize:	   65536 kB
NumReads:	     214
NumWrites:	     919
FailedReads:	       0
FailedWrites:	       0
InvalidIO:	       0
NotifyFree:	       0
ZeroPages:	      37
GoodCompress:	      62 %
NoCompress:	       5 %
PagesStored:	     882
PagesUsed:	     385
OrigDataSize:	    3528 kB
ComprDataSize:	    1329 kB
MemUsedTotal:	    1540 kB
Of course you can do much more with this tool. It enables you to configure your compcache blockdevice and other things. For full manpage look here: Manpage of rzscontrol on compcache.googlecode.com


Have fun!
 
 
27th May 2010, 11:39 AM |#2  
Hi again!

For those of you who have "GScript" or "GScript Lite" installed (free app from the Market which allows you to start shell-scripts simply on your phone):

I made a script for gscript, which allows you to start rzscontrol and print out the compcache stats with one touch.

Instructions:
  • Unzip the file.
  • Place it on your scard into the folder "gscript".
  • Run GScript Lite and select "Add script" from the menu.

Enjoy!
Attached Files
File Type: zip compcache_status.zip - [Click for QR Code] (278 Bytes, 216 views)
27th May 2010, 12:58 PM |#3  
Senior Member
Flag Auckland
Thanks Meter: 155
 
More
Thanks very much for this useful info.

If I can get Swype to work with Compcache enabled, I'll try these tools out.
27th May 2010, 01:40 PM |#4  
kendong2's Avatar
Inactive Recognized Developer
Thanks Meter: 74
 
More
hehe this is already implemented in VR6.1... my own work though, i did the same what you did two days ago. also included will be a script to turn on and off compcache on the fly
27th May 2010, 09:09 PM |#5  
heyodee's Avatar
Senior Member
Thanks Meter: 114
 
More
i get this error
stats: Not a typewriter
Geochelone
28th May 2010, 01:44 AM |#6  
Guest
Thanks Meter: 0
 
More
I ran your code with GScript, and I have this error:

Failed to open /dev/block/ramzswap0: No such file or directory

Edit: I guess I don't have compcache in my ROM then.
28th May 2010, 11:45 AM |#7  
Senior Member
Thanks Meter: 160
 
More
My question is , why does (my own compiled, ahem) rzscontrol crash / coredump / segfaul when I try to give the initial size on the command line. According to the help-output my version only supports --init, and if I give any other one, it crashes. This way I don't really have control over my ramzswap on Androbin. With 'free' I can see swap active and it's being full (so it helps I think ) but more is impossible.

While I'm typing this: I compiled compcache and rzscontrol from the version in Cyanogen's github, maybe I should try the official site version
4th December 2012, 11:18 AM |#8  
savie's Avatar
Senior Member
Thanks Meter: 637
 
More
hello sir..

how to compile integrate with p1000 kernel?

thank you before..
Post Reply Subscribe to Thread

Tags
compcache, ramzswap, rzscontrol

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes