blob: e87722ba90b4c912bf5dc23b64184ffbbb0fd469 [file] [log] [blame]
<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 class="devsite-terminal devsite-click-to-copy">
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="devsite-terminal devsite-click-to-copy">
adb shell dumpsys -l
</pre>
<p>Example output:</p>
<pre class="devsite-click-to-copy">
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>