title: A more indepth explaniton of procstats for Android
body: <p>I am doing some memory testing and I came across procstats in my research - before I start using it though I would like to fully understand everything before I start relying on its data.</p>
  
  <p>Here is a condensed file of what I am trying to work with:</p>
  
  <pre><code>CURRENT STATS:
  * com.samsung.android.providers.context / u0a6:
         TOTAL: 100% (4.2MB-4.2MB-4.2MB/3.3MB-3.3MB-3.3MB over 1)
         Service: 100% (4.2MB-4.2MB-4.2MB/3.3MB-3.3MB-3.3MB over 1)
  * com.sec.android.inputmethod / 1000:
         TOTAL: 100% (28MB-28MB-28MB/27MB-27MB-27MB over 2)
        Imp Fg: 100% (28MB-28MB-28MB/27MB-27MB-27MB over 2)
  * com.google.android.googlequicksearchbox / u0a54:
         TOTAL: 0.05%
         Imp Bg: 0.05%
        (Cached): 100% (4.8MB-4.9MB-5.0MB/3.2MB-3.3MB-3.4MB over 2)
  * com.google.android.talk / u0a98:
         TOTAL: 0.03%
         Imp Bg: 0.03%
         Receiver: 0.00%
         (Cached): 100% (8.8MB-8.8MB-8.8MB/7.4MB-7.4MB-7.4MB over 2)
        (Home): 100% (20MB-20MB-20MB/18MB-18MB-18MB over 1)
  Run time Stats:
  
  SOff/Norm: +24m36s393ms (running)
   TOTAL: +24m36s393ms
        Start time: 2014-12-08 14:22:50
        Total elapsed time: +24m36s508ms (partial) libdvm.so chromeview
  </code></pre>
  
  <p>Here are the questions:</p>
  
  <ol>
  <li>What does "over 1" / "over 2" mean?</li>
  <li>What is the difference between Service, Imp Bg, Receiver, and Imp Fg?</li>
  <li>Why doesn't every total list the RAM usage (com.google.android.talk for example) </li>
  <li>What does 100% mean and what does .03% mean?</li>
  <li>Why do only some have (Cached)/(Home)? </li>
  <li>What does 100% (Cached)/(Home) mean?</li>
  <li>What does "(partial) libdvm.so chromeview" mean?</li>
  <li>Lastly, am I correct in assuming that (4.8MB-4.9MB-5.0MB/3.2MB-3.3MB-3.4MB) is (low pss - avg pss - high pss / low uss - avg uss - high uss)?</li>
  </ol>
  
  <p>If anyone could shed any light on this is would be greatly appreciated. Thanks.</p>
  
  <p>As a heads up, I've already read these two links.... android-developers.blogspot.com/2014/01/ and android.googlesource.com/platform/frameworks/base/+/master/core/ .... and a few other pages - these are still the questions that I have left over. Can anyone go into detail about all 8 questions? </p>
  
  <p><strong>Edit</strong></p>
  
  <p>So I have been trying to compare numbers between procstats and meminfo and it really only adds more questions.</p>
  
  <p>Here is an excerpt from procstats</p>
  
  <pre><code>CURRENT STATS:
    * com.dropbox.android:crash_uploader / u0a87:
       TOTAL: 100% (4.8MB-4.8MB-4.9MB/3.9MB-3.9MB-3.9MB over 6)
       Service: 100% (4.8MB-4.8MB-4.9MB/3.9MB-3.9MB-3.9MB over 6)
    * com.mobileposse.client / u0a22:
       TOTAL: 0.16%
       Service: 0.13%
      Receiver: 0.03%
      (Cached): 98% (7.2MB-8.4MB-9.3MB/6.1MB-7.2MB-8.1MB over 7)
    * com.android.chrome / u0a79:
       TOTAL: 0.01%
      Receiver: 0.01%
      (Cached): 86% (5.2MB-5.2MB-5.4MB/4.4MB-4.4MB-4.4MB over 3)
  </code></pre>
  
  <p>Here is an excerpt from meminfo</p>
  
  <pre><code>Total PSS by process:
   5524 kB: com.android.chrome (pid 7334)
   4969 kB: com.dropbox.android:crash_uploader (pid 5617)
  </code></pre>
  
  <p>Now dropbox makes sense, and I would say 80% of the processes follow dropbox's lead with having matching numbers between meminfo and pocstats. What I don't get - why does chrome not have any totals in the procstats but is listed in the meminfo and why does mobileposse have higher stats than chrome in the procstats but is not listed in the meminfo?</p>