Chinaunix首页 | 论坛 | 博客
  • 博客访问: 217090
  • 博文数量: 112
  • 博客积分: 275
  • 博客等级: 二等列兵
  • 技术积分: 565
  • 用 户 组: 普通用户
  • 注册时间: 2011-12-20 10:52
文章分类

全部博文(112)

文章存档

2014年(3)

2013年(2)

2012年(64)

2011年(43)

分类: Android平台

2014-01-15 17:35:01

    dumpsys可以用来查看android系统运行过程中的信息状态,如CPU、内存使用....
例1:查看dumpsys的“子命令”
adbshell dumpsys | grep "DUMP OF SERVICE"
output:
DUMP OF SERVICE SurfaceFlinger:
DUMP OF SERVICE accessibility:
DUMP OF SERVICE account:
DUMP OF SERVICE activity:
DUMP OF SERVICE alarm:
DUMP OF SERVICE appwidget:
DUMP OF SERVICE audio:
DUMP OF SERVICE backup:
DUMP OF SERVICE battery:
DUMP OF SERVICE batteryinfo:
DUMP OF SERVICE clipboard:
DUMP OF SERVICE connectivity:
DUMP OF SERVICE content:
DUMP OF SERVICE cpuinfo:
DUMP OF SERVICE device_policy:
DUMP OF SERVICE devicestoragemonitor:
DUMP OF SERVICE diskstats:
DUMP OF SERVICE dropbox:
DUMP OF SERVICE entropy:
DUMP OF SERVICE hardware:
DUMP OF SERVICE input_method:
DUMP OF SERVICE iphonesubinfo:
DUMP OF SERVICE isms:
DUMP OF SERVICE location:
DUMP OF SERVICE media.audio_flinger:
DUMP OF SERVICE media.audio_policy:
DUMP OF SERVICE media.player:
DUMP OF SERVICE meminfo:
DUMP OF SERVICE mount:
DUMP OF SERVICE netstat:
DUMP OF SERVICE network_management:
DUMP OF SERVICE notification:
DUMP OF SERVICE package:
DUMP OF SERVICE permission:
DUMP OF SERVICE phone:
DUMP OF SERVICE power:
DUMP OF SERVICE reboot:
DUMP OF SERVICE screenshot:
DUMP OF SERVICE search:
DUMP OF SERVICE sensor:
DUMP OF SERVICE simphonebook:
DUMP OF SERVICE statusbar:
DUMP OF SERVICE telephony.registry:
DUMP OF SERVICE throttle:
DUMP OF SERVICE usagestats:
DUMP OF SERVICE vibrator:
DUMP OF SERVICE wallpaper:
DUMP OF SERVICE wifi:
DUMP OF SERVICE window:
注:在非“posix”类操作系统中,可使用findstr代替grep


例2:查看cpu信息:
adb shell dumpsys cpuinfo
例3:查看程序的内存使用情况:
adb shell dumpsys meminfo $package_name or $pid    //使用程序的包名或者进程id
e.g. adb shell dumpsys meminfo com.google.android.apps.maps
阅读(1764) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~