ADB Shell top uses

Source: Internet
Author: User
Tags cpu usage

ADB Shell Top

First, the relevant parameters:

  1. >ADB Shell Top-h
  2. Usage:top [-M Max_procs] [-N iterations] [-D delay] [-s sort_column] [-t] [-h]
  3. -M Num Maximum number of processes to display . Show up to how many processes
  4. -N num Updates to Show before exiting. Number of refreshes
  5. -D num Seconds to wait between updates. Refresh interval (default 5 seconds)
  6. -S Col column to sort by (cpu,vss,rss,thr). Sorted by which column
  7. -T show threads instead of processes. Show thread information instead of process
  8. -H Display this help screen. Show Help Document

Like what:

ADB Shell Top-m 5

Indicates the number of 5 processes printed and the percentage of CPU value consumed by the associated process running.

The first column related parameter explanation:

    1. User is in the run time of the client state and does not contain a negative process with a priority value
    2. CPU time consumed by a process with a negative priority value
    3. Sys is in the running time of the nuclear mentality
    4. Idle wait time other than IO wait time
    5. IOW io Wait Time
    6. IRQ Hard Interrupt Time
    7. SIRQ Soft Interrupt Time PID process ID

The second column related parameter explanation:

    1. pid process ID
    2.  PR priority
    3.  cpu% current instantaneous CPU utilization  
    4. s process state: d= non-interruptible sleep state, r= run, s= sleep, t= trace/stop, z= Zombie process
    5.  # The number of threads currently used by the THR program
    6.  vss virtual set Size virtual memory consumption (contains memory consumed by shared library)
    7.  rss resident set Size actual use of physical memory (contains memory consumed by shared libraries)
    8.  pcy scheduling policy priority, Sp_background/sp_foreground
    9.   UID Process owner User ID
    10.  name process name

Second, the use of the command  

    1. adb shell top-m xx view xx number of processes
    2. adb shell top-n xx refresh xx times
    3. adb shell top-d XX Refresh Frequency
    4. ......

Third, the printed data saved to the local

ADB shell top-m 5 > D:\cpu.txt data for printed 5 processes are saved to the Cpu.txt file in the local D drive

Fourth. specify to view data for an app

Example: monitoring the CPU usage of a microblog :adb shell top-n 1 | grep

10 seconds Refresh shows CPU usage:adb shell top-d | grep

Real-time monitoring of micro-blog CPU usage:adb shell top |grep

ADB Shell top uses

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.