2012년 11월 8일 목요일

What is the most accurate memory usage information on adb?

I found the post about this question below and the answer is using 'adb shell procrank'.

The reply of below post is written by Dianne Hackborn the google developer.
https://groups.google.com/forum/?fromgroups=#!topic/android-developers/r9hl8-t0lO0


Q: How calculates memory usage of application

A: "adb shell procrank" is generally the most accurate memory usage information -- in particular uss is the amount of memory private to your app, and pss also includes the shared memory weighted across the number of processes it is shared in.  (Ignore the other numbers, they are pretty much useless.)

Q: Thanks for your information, this command is work on emulator, but not 
work on my HTC Magic, however it's very useful to me. 

A: Ah it may not be installed on a production device.  You could also do "adb shell dumpsys meminfo" which will spew a bunch of stuff about the memory in each process, or "adb shell dumpsys meminfo <processname>" for info about your process.



If you could use root account on adb, you could use 'adb shell procrank' but if not use .adb shell dumpsys meminfo'.

댓글 없음: