- 浏览: 164772 次
- 性别:
- 来自: 杭州
文章分类
最新评论
-
natan:
和楼主问题一样 添加动画后 总是从屏幕的最上或最底部 出现
PopupWindow的显示隐藏配置动画 -
shenya2:
...
js的this指针理解 -
jonson:
就是用了它的判空函数而已,直接 判断也是可以的。oldFile ...
JAVA高效文件内容比较 -
jonson:
我的是android的项目,这个类是属于android.jar ...
JAVA高效文件内容比较 -
wangh8:
TextUtils这个类提示找不到
JAVA高效文件内容比较
top | grep app名称
ps | grep app名称
procrank | grep app名称
dumpsys meminfo app名称
前两个命令只能查到VSS RSS内存占用信息
而后面两个命令可以查出 PSS USS内存占用.
dumpsys meminfo 可以查出native和dalvik分别占用多少内存
dumpsys 用来给出手机中所有应用程序的信息,并且也会给出现在手机的状态。
dumpsys [Option]
meminfo 显示内存信息
cpuinfo 显示CPU信息
account 显示accounts信息
activity 显示所有的activities的信息
window 显示键盘,窗口和它们的关系
wifi 显示wifi信息
Terms
- VSS - Virtual Set Size 虚拟耗用内存(包含共享库占用的内存)
- RSS - Resident Set Size 实际使用物理内存(包含共享库占用的内存)
- PSS - Proportional Set Size 实际使用的物理内存(比例分配共享库占用的内存)
- USS - Unique Set Size 进程独自占用的物理内存(不包含共享库占用的内存)
一般来说内存占用大小有如下规律:VSS >= RSS >= PSS >= USS
Overview
The aim of this post is to provide information that will assist in interpreting memory reports from various tools so the true memory usage for Linux processes and the system can be determined.
Android has a tool called procrank (/system/xbin/procrank), which lists out the memory usage of Linux processes in order from highest to lowest usage. The sizes reported per process are VSS, RSS, PSS, and USS.
For the sake of simplicity in this description, memory will be expressed in terms of pages, rather than bytes. Linux systems like ours manage memory in 4096 byte pages at the lowest level.
VSS (reported as VSZ from ps) is . This size also includes memory that may not be resident in RAM like mallocs that have been allocated but not written to. VSS is of very little use for determing real memory usage of a process.
RSS is the. RSS can be misleading, because it reports the total all of the shared libraries that the process uses, even though a shared library is only loaded into memory once regardless of how many processes use it. RSS is not an accurate representation of the memory usage for a single process.
PSS , i.e. if three processes all use a shared library that has 30 pages, that library will only contribute 10 pages to the PSS that is reported for each of the three processes. PSS is a very useful number because when the PSS for all processes in the system are summed together, that is a good representation for the total memory usage in the system. When a process is killed, the shared libraries that contributed to its PSS will be proportionally distributed to the PSS totals for the remaining processes still using that library. In this way PSS can be slightly misleading, because when a process is killed, PSS does not accurately represent the memory returned to the overall system.
USS is . USS is an extremely useful number because it indicates the true incremental cost of running a particular process. When a process is killed, the USS is the total memory that is actually returned to the system. USS is the best number to watch when initially suspicious of memory leaks in a process.
For systems that have Python available, there is also a nice tool called smem that will report memory statistics including all of these categories.
# procrank
procrank
PID Vss Rss Pss Uss cmdline
481 31536K 30936K 14337K 9956K system_server
475 26128K 26128K 10046K 5992K zygote
526 25108K 25108K 9225K 5384K android.process.acore
523 22388K 22388K 7166K 3432K com.android.phone
574 21632K 21632K 6109K 2468K com.android.settings
521 20816K 20816K 6050K 2776K jp.co.omronsoft.openwnn
474 3304K 3304K 1097K 624K /system/bin/mediaserver
37 304K 304K 289K 288K /sbin/adbd
29 720K 720K 261K 212K /system/bin/rild
601 412K 412K 225K 216K procrank
1 204K 204K 185K 184K /init
35 388K 388K 182K 172K /system/bin/qemud
284 384K 384K 160K 148K top
27 376K 376K 148K 136K /system/bin/vold
261 332K 332K 123K 112K logcat
33 396K 396K 105K 80K /system/bin/keystore
32 316K 316K 100K 88K /system/bin/installd
269 328K 328K 95K 72K /system/bin/sh
26 280K 280K 93K 84K /system/bin/servicemanager
45 304K 304K 91K 80K /system/bin/qemu-props
34 324K 324K 91K 68K /system/bin/sh
260 324K 324K 91K 68K /system/bin/sh
600 324K 324K 91K 68K /system/bin/sh
25 308K 308K 88K 68K /system/bin/sh
28 232K 232K 67K 60K /system/bin/debuggerd
发表评论
-
密钥散列生成命令
2018-09-05 21:37 1713密钥散列生成命令 keytool -exportce ... -
JavaDoc命令使用
2018-07-26 20:43 588为了规范项目的文档化,要求组员编写规范的javadoc,最终打 ... -
Java反射demo
2018-01-10 09:33 494java反射学习代码 反射调用类的静态私有成员变量的一个方法 ... -
android 语言简写对应表
2015-06-08 14:40 1131Language / Locale ... -
PMD usage
2015-05-18 19:06 0D:\java-static-analysis\pmd-bin ... -
java 分割字符串
2014-12-30 19:57 1019碰到一个字符串 “A|B” 需要通过'|'来分割这个字符串 调 ... -
google广告封装类
2014-12-18 17:02 1434最近在接入google广告模块,封装了一个广告的Fragmen ... -
工程加入google service无法生成dex
2014-12-15 20:47 1594需要接入google广告,碰到一系列问题。 加入之后编apk包 ... -
MediaPlayer 错误码(1,-19)
2014-10-27 15:32 3077我在使用MediaPlayer + SurfaceView ... -
如何在做转屏的时候不销毁当前Activity
2014-10-23 14:00 629For API 12 and below: add an ... -
Using HTML in TextView
2014-08-23 18:54 0There is exact question Using H ... -
启动google play并进入指定app主界面
2014-08-23 14:25 3649如何通过INTENT调用启动google play商店并且 ... -
PopupWindow的显示隐藏配置动画
2014-08-16 17:23 3348如果对PopupWindow的显示隐藏过程配置动画。 有几 ... -
android strings.xml转义字符收集
2014-08-15 16:41 1256以下为XML标志符的数字和字符串转义符 " ... -
android 开发内存分析
2014-08-13 11:06 0使用MAT进行内存分析。 首先,安装MAT,可以是ecli ... -
android多国语言使用
2014-06-23 17:30 0多国语言:在res目录下建立不同名称的values文件来调用 ... -
java dump bitmap byte content
2014-06-09 18:07 1015如何dump bitmap数据到文件。有时候需要逐位分析图 ... -
android 通过intent调用短消息的正确方法
2014-04-19 23:44 732今天使用到用INTENT调用短消息,在网上搜索了都不正确。看 ... -
UCDetector: -------java代码引用静态检查工具介绍
2014-04-16 19:45 2380UCDetector: Unnecessary Code D ... -
SurfaceView receive multi surfaceChanged event problem.
2014-04-14 16:20 693Have get a problem: receive ...
相关推荐
android应用内存监控工具,
分析oom的利器,内存分析工具eclipse插件
adb连上android 设备(如手机) 运行mem_shell.bat ,再运行mem.exe,就可以获取android 设备详细内存将附件截图
使用procrank工具进行,android应用内存占用测试,写python脚本,每隔一秒打印procrank的信息
导出的html文件包含了根据bugreport数据得出的图表和分析结论,主要包括进程内存占用信息、程序ANR或crash的堆栈信息、电池信息、CPU频率信息等等。更多详细内容可以参考文章...
android内存监测之procrank Android系统中提供了两个命令行工具procrank、procmem用于查看系统中的内存使用情况。这两个工具对于我们分析内存相关问题非常有效。由于Android系统使用的是Linux内核,理论上这样的...
Android ADT自带有内存检测工具,可以查看内存的占用情况,但是无法查看内存的详细信息, 我们需要安装Eclipse的内存分析工具MAT插件,来dump 出详细的内存情况,进行分析
【android内存监测之procmem】 Android系统中提供了两个命令行工具procrank、procmem用于查看系统中的内存使用情况。这两个工具对于我们... • procmem可以针对某个特定的进程分析其堆、栈、共享库等内存占用情况。
抓内存工具,用于分析内存占用及内存泄露等问题 (Uss_Vss_Rss_Pss) PID Vss Rss Pss Uss cmdlineA 708 117204K 38304K 31315K 28956K /vendor/bin/hw/android.hardware.camera.provider@2.4-service 535 ...
前言 ...通过DDMS的APP内存占用查看工具分析发现,APP中占用内存最多的是图片,每个Activity中图片占用内存占大半,本文重点分享对图片的内存优化。 不要将Button的背景设置为selector 在布局
Android APK性能测试 procrank等工具,包括CPU,进程内存占用等各方面测试。
GDA是一款强大而轻便的交互式反编译器,也是一款综合性逆向分析利器, 本软件具有分析速度快、体积小、内存占用少等优点。 软件无需安装java环境和android环境就可以使用,支持分析apk,dex,odex,oat类型文件, ...
记录一次内存分析的简单实践,目的是找出占用内存较大的对象和无效的内存分配 2、工具 2.1、 DDMS或者Android Studio DDMS:抓取内存快照 Android Studio的Profiler:抓取内存快照并分析(支持android 5.0以上) 2.2...
经测试在MTK平台1G内存4核CPU占用比在50%左右,偶尔可能会达到70%以上。 超过3D游戏及其它任何应用。 当应用占用CPU比超过一定系统的值后,会产生大量ANR(应用 无响应)请选择等待。 如: User 63%, System 31%, ...
Emmagee是监控指定被测应用在使用过程中占用机器的CPU、内存、流量资源的性能测试小工具。
� 采用了对有限内存、电池和 CPU 优化过的虚拟机 Dalvik , Android 的运行速度比想象的要快很多。 � 运营商(中国移动等)的大力支持,产业链条的热捧。 � 良好的盈利模式( 3/7 开),产业链条的各方:运营商、...
本文实例讲述了Android开发之超强图片工具类BitmapUtil。分享给大家供大家参考,具体如下: 说明:为了方便大家使用,本人把大家常用的图片处理代码集中到这个类里 使用了LruCache与SoftReference /** * 图片加载...
利用过滤驱动自己开发的串行口抓包程序,不会占用用户态的串口句柄。 使用方法: 1: 解包 2:运行SerSpyInst.exe安装监控设备 3:运行SerialSpy.exe即可. <br>同类的程序有PortMon,SerialMonitor, ...
此外,资源中的代码均经过优化,以确保在性能和内存占用方面达到最佳效果。同时,我们还提供了详细的文档和示例代码,以帮助开发者快速上手和理解各项功能的使用方法。 总之,Android项目常用图片特效处理.rar是一...
具有低内存占用的本机 C/Objective-C/Java 代码。 适用于大型日志数量( 最多 65536个条目)。 完全使用本机 ios/android用户界面( 不依赖统一 GUI ) 构建。 分辨率独立( 在 highres/Retina 显示器上看起来不错)。 不...