adb command to view the device memory

With power shell easier to use than cmd

adb shell  procrank  ,

Adb shell with a top or

Look ram is probably 905M 1G memory

VSS - Virtual Set Size of virtual memory consumption (contains shared libraries occupy memory)
 RSS - Resident actually use the Set Size of physical memory (shared library that contains the memory occupied)
 PSS - Proportional Set Size of physical memory actually used (prorated shared libraries occupy memory)
 the USS - the Set of Unique Size process alone take up physical memory (does not include shared libraries occupy memory)


VSS: VSS represents the size of the entire memory address space of a process can access. This process has included the size of the application but unused memory space. In practice rarely used in this way that the process of memory occupancy, use it to represent the memory usage of a single process it is not accurate.
RSS: represents the size of the address space of a process in RAM practical use, including all the shared libraries occupy memory, this situation represents a process memory is also inaccurate.
PSS: represents the size of the address space of a process in RAM actually used, it contains proportionally shared libraries occupy memory. If there are three processes use the same shared library, then each process including PSS-third the size of the shared library memory. In this way represents the memory usage process more accurate, but when only one process using shared libraries, its exactly the same situation and RSS.
USS: process itself represents a memory space occupied size, does not contain any other ingredients, this is the best way to show process memory size!
You can see: VSS> = RSS> = PSS > = USS

Check the memory usage of a single app

adb shell dumpsys meminfo app package name --------------- If this app multiple processes, incomplete statistics will show up

Recommend the following

dumpsys meminfo --package app package name to see multi-process memory consumption app, this app contains two processes actually consume should be (50638 + 76563) / 1024 = 124M

For example dumpsys meminfo --package com.test.app

 

A more detailed description see:

http://gityuan.com/2016/01/02/memory-analysis-command/ 

Published 137 original articles · won praise 29 · views 110 000 +

Guess you like

Origin blog.csdn.net/xiexiaotian11/article/details/104995316