Chinaunix首页 | 论坛 | 博客
  • 博客访问: 31966
  • 博文数量: 17
  • 博客积分: 55
  • 博客等级: 民兵
  • 技术积分: 10
  • 用 户 组: 普通用户
  • 注册时间: 2009-07-02 00:53
文章分类
文章存档

2017年(1)

2016年(5)

2015年(3)

2014年(7)

2013年(1)

我的朋友

分类: Android平台

2014-03-08 14:21:04

    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
阅读(1672) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~