aboutsummaryrefslogtreecommitdiff
path: root/en/devices/tech/debug/dumpsys.html
blob: 80f93e54eef11db7fe5f0828353a7974013bfc56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<html devsite>
  <head>
    <title>Dumpsys System Diagnostics</title>
    <meta name="project_path" value="/_project.yaml" />
    <meta name="book_path" value="/_book.yaml" />
  </head>
  <body>
  <!--
      Copyright 2017 The Android Open Source Project

      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.
  -->



<p>The <code>dumpsys</code> tool runs on the device and provides information about the status
of system services.  </p>

<h2 id=how_to_use_dumpsys>How to use dumpsys</h2>

<p>If you run <code>adb shell dumpsys</code>, you’ll get diagnostic output for
all system services, which is usually more than you want.  For more manageable
output, specify the service you would like to examine.  </p>

<p>For example, the following command:</p>

<pre>
$ adb shell dumpsys input
</pre>

<p>provides system data for input components such as touchscreens or built-in
keyboards.</p>

<h2 id=list_of_system_services>List of system services</h2>


<p>For a complete list of system services that you can use with dumpsys, try the
following command:</p>

<pre class="no-pretty-print">
$ adb shell dumpsys -l
Currently running services:
  DockObserver
  SurfaceFlinger
  accessibility
  account
  activity
  alarm
  android.security.keystore
  appops
  appwidget
  assetatlas
  audio
  backup
  battery
  batteryproperties
  batterystats
  bluetooth_manager
  clipboard
  connectivity
  consumer_ir
  content
  country_detector
  cpuinfo
  dbinfo
...
</pre>

<h2 id=dumpsys_command-line_options>Dumpsys command-line options</h2>

<p>Command-line options are different for different services.  Here are a few
common ones:</p>

<ul>
  <li> For many services, you can append <code>-h</code> to see the help
text.
  <li> For some services, you can append <code>-c</code> to view the data in
a machine-friendly format.  </ul>

<h2 id=understanding_diagnostic_output>Understanding diagnostic output</h2>

<p>For details on some of the most commonly used  dumpsys services, see the
following articles:</p>

<ul>
  <li> <a
  href="/devices/input/diagnostics.html">Viewing Input Diagnostics (dumpsys input)</a>
  <li> <a href="procstats.html">Viewing RAM Usage Data (dumpsys procstats)</a>
  <li> <a href="netstats.html">Viewing Network Data (dumpsys netstats)</a>
  <li> <a href="/devices/tech/power/batterystats.html">Viewing Battery Usage Data (dumpsys batterystats)</a>
</ul>


  </body>
</html>