adb shell top 命令
原文地址https://blog.csdn.net/kittyboy0001/article/details/38562515
原文地址https://blog.csdn.net/u010503912/article/details/51518705
adb shell top
top命令提供了实时的对系统处理器的状态监视.它将显示系统中CPU最“敏感”的任务列表.该命令可以按CPU使用.内存使用和执行时间对任务进行排序.
top 用法
>adb shell top -h
Usage: top [ -m max_procs ] [ -n iterations ] [ -d delay ] [ -s sort_column ] [-t ] [ -h ]
-m num Maximum number of processes to display. 最多显示多少个进程
-n num Updates to show before exiting. 刷新次数
-d num Seconds to wait between updates. 刷新间隔时间(默认5秒)
-s col Column to sort by (cpu,vss,rss,thr). 按哪列排序
-t Show threads instead of processes. 显示线程信息而不是进程
-h Display this help screen. 显示帮助文档
adb shell top
> adb shell top User %, System %, IOW %, IRQ %
User + Nice + Sys + Idle + IOW + IRQ + SIRQ = PID PR CPU% S #THR VSS RSS PCY UID Name
% S 423416K 88160K fg u0_a92 com.tmall.wireless
% R 1232K 536K root top
% S 341712K 40872K fg u0_a90 com.wandoujia.phoenix2.usbproxy
% S 319976K 33284K fg u0_a74 com.android.Chinpower
% S 67320K 20552K fg system /system/bin/surfaceflinger
% S 445876K 80304K fg system system_server
...
% S 0K 0K root watchdog/
% S 0K 0K root khelper
% S 0K 0K root suspend_sys_syn
% S 0K 0K root suspend
第一组数据的含义: User 处于用户态的运行时间,不包含优先值为负进程
Nice 优先值为负的进程所占用的CPU时间
Sys 处于核心态的运行时间
Idle 除IO等待时间以外的其它等待时间
IOW IO等待时间
IRQ 硬中断时间
SIRQ 软中断时间
第二组数据的含义: PID 进程id
PR 优先级
CPU% 当前瞬时CPU占用率
S 进程状态:D=不可中断的睡眠状态, R=运行, S=睡眠, T=跟踪/停止, Z=僵尸进程
#THR 程序当前所用的线程数
VSS Virtual Set Size 虚拟耗用内存(包含共享库占用的内存)
RSS Resident Set Size 实际使用物理内存(包含共享库占用的内存)
PCY 调度策略优先级,SP_BACKGROUND/SP_FOREGROUND
UID 进程所有者的用户id
Name 进程的名称
具体信息可以查看源代码中: xx\system\core\toolbox\top.c
监控CPU的命令使用实战
>adb shell top | findstr tmall > d:\cpu.txt
打印 top命令,并查找 包含 tmall的命令行,输出至 d:\cpu.txt result: % S 304728K 28900K bg u0_a92 com.tmall.wireless:push % S 322944K 38236K bg u0_a92 com.tmall.wireless % R 345304K 49396K fg u0_a92 com.tmall.wireless % S 303704K 29380K bg u0_a92 com.tmall.wireless:containerprocess1 % S 304728K 28900K bg u0_a92 com.tmall.wireless:push % S 302600K 28596K fg u0_a92 com.tmall.wireless:notify % R 365500K 56708K fg u0_a92 com.tmall.wireless % S 325476K 40868K bg u0_a92 com.tmall.wireless:notify % S 308944K 31320K fg u0_a92 com.tmall.wireless:push % S 305892K 29888K bg u0_a92 com.tmall.wireless:containerprocess1 % S 323080K 39696K bg u0_a92 com.tmall.wireless:push % S 327656K 41556K bg u0_a92 com.tmall.wireless:notify % S 366420K 59700K fg u0_a92 com.tmall.wireless % S 305892K 29888K bg u0_a92 com.tmall.wireless:containerprocess1 % R 278424K 21936K fg u0_a92 com.tmall.wireless:utremote % S 304180K 30964K bg u0_a92 com.tmall.wireless:utremote % R 367456K 59612K fg u0_a92 com.tmall.wireless
======================================================================================================
android调试之top指令查看系统资源
adb shell top 命令的更多相关文章
- 移动端测试===adb shell top命令解释
adb shell top top命令提供了实时的对系统处理器的状态监视.它将显示系统中CPU最“敏感”的任务列表.该命令可以按CPU使用.内存使用和执行时间对任务进行排序. top 用法 >a ...
- adb shell top 命令详解
[?25l[0m[H[J 当前系统时间 Tasks: 552 total, 1 running, 510 sleeping, 0 stopped, 0 zombie 任务(进程) 系统现在共有552个 ...
- adb shell常用命令
一.文件操作相关命令 1.文件操作命令 子命令 参数 说明 cd 无 进入目录 cat [-beflnstuv] [-B bsize] [file...] 查看文件内容-n:显示行号-b:显示行号,但 ...
- 移动端 - adb shell常用命令
一.文件操作相关命令 //进入设备 adb shell //进入指定目录"/data/local/tmp" cd /data/local/tmp //查看目录 ls //进入根目录 ...
- adb shell常用命令总结
一.文件操作相关命令 1.文件操作命令 子命令 参数 说明 cd 无 进入目录 cat [-beflnstuv] [-B bsize] [file...] 查看文件内容-n:显示行号-b:显示行号,但 ...
- adb shell top 使用
adb shell top 一.其中相关参数: >adb shell top -h Usage: top [ -m max_procs ] [ -n iterations ] [ -d del ...
- win7 cmd终端连接android手机运行adb shell脚本命令
win7 cmd终端连接android手机运行adb shell脚本命令 (2013-03-22 20:13:57) 转载▼ 标签: android it shell 连接 linux 分类: 嵌入式 ...
- adb shell am命令
adb shell am命令是在cmd命令行可以通过命令来启动Activity,Boradcast,Service等,更多使用可以参考下面附件. 比如在cmd串口我们发送广播,广播action是&qu ...
- 【转】adb shell dumpsys 命令
adb shell dumpsys,默认打印出当前系统所有service信息,在后面可加上具体的服务名 需要列出当前运行的服务,可运行: adb shell dumpsys | findstr DUM ...
随机推荐
- nginx配置语法
http://baijiahao.baidu.com/s?id=1604485941272024493&wfr=spider&for=pc http://blog.csdn.net/h ...
- 超全面的JavaWeb笔记day05<xml&dtd&jaxp>
0.表单提交方式(*****) button提交 超链接提交 事件 1.xml简介和应用(了解) 2.xml文档声明和乱码解决(*****) 文档声明 必须放在第一行第一列 设置xml编码和保存编码一 ...
- 走进ELK原理
日志的分析在联调和后期维护是非常重要. 今天让我们进入ELK...让我们一起感受这个强大的日志收集,日志分析存储,日志查询界面化显示的震撼效果吧. Elasticsearch是个开源分布式搜索引擎,它 ...
- PHP防止跨站表单提交与同站跨页伪造表单的攻击
在以前的防止跨站攻击的时候,使用了验证提交的页面是否是同一个站点,这样可以防止普通的攻击,ereg("blog.qita.in",$_SERVER['HTTP_REFERER']) ...
- 应用程序挂起、复原与终止— IOS开发
本文转载至 http://justcoding.iteye.com/blog/1473350 一.挂起 当有电话进来或者锁屏,这时你的应用程会挂起,在这时,UIApplicationDelegate委 ...
- 关于Ethread的一些研究
环境 win764 以TP为例 ring3保护 它会在windbg断下 这个时候我们需要拿到当前线程对象 应该到 当前使用的CPU的地址 _KPRCB-> CurrentThread 就是当前线 ...
- 【LINUX】SVN 代码提交之后。同步到web目录下
1 当你使用svn在成功提交一个新版本的时候,svn仓库目录下的hook文件夹下的post-commit脚本会运行 用shell写一个脚本,在提交完版本后,自动在web目录运行一下svn updat ...
- LeetCode——Reverse Linked List
反转链表,用了一个比较笨的方法. public class Solution { public ListNode reverseList(ListNode head) { if(head == nul ...
- Fragments (官方文档中文版)
转 http://blog.sina.com.cn/s/blog_69a4fbd70100r5j4.html 概述 Fragment表现Activity中UI的一个行为或者一部分.可以将多个f ...
- python小项目练习之转换像素图片为字符图
实例来源实验楼网站,没事可以多逛逛,在此多谢实验楼的无私分享 from PIL import Image import argparse """ description: ...